Hello I was wondering who can help me with this…. I am trying to make to make the correct code in php…. Is a simple Form you will type a number from 1 to 10 and I want as a result to open a popup window with googles site for example, type a number from 11 to 20 and open a popup window with yahoos site, and so on….
I was able to make the form with $quantity in simple form html:
<form action="result.php" method="post">
Number: <input name="quantity" type="text" />
<input type="submit" />
</form>
Result PHP page:
<?php
$quantity = $_REQUEST["quantity"];
if ($quantity >= 1 && $quantity <= 10) {
echo "Write example 1";
} else if ($quantity >= 11 && $quantity <= 20) {
echo " Write example ";
} else if ($quantity >= 21 && $quantity <= 30) {
echo " Write example ";
} else {
echo "Does not exist";
}
Well my question I guess is how can I make echo open a href in a new window depending on the imput? Seen Javascript used however I can´t seem to make it work where and how could I do this…
Any help will greatly appreciate it…
Total noob ;o)