on my wamp it doesn't show any errors but when it was uploaded to the to my testing site it redirects me to to somewhere and when a friend tested on his pc it showed this kind of error http://piclair.com/data/i0fwr.jpg
Here is my code:
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>Assign5-PHP_Prog_Assign</title>
</head>
<body>
<center>
<br>
<i>the quick "brown" "fox" "jumps" over the lazy dog.</i>
<br>
<br>
<form method="post" action="assign5-PHP_Prog_Assign.php" name="form1">
<!--Here is Basic one 3 inputs tags will be used and submit button will be used t trigger the changes. -->
Color:<input type="text" value="" name="color" ><br>
<input type="checkbox" value="red" name="red1">Red<br>
Animal:<input type="text" value="" name="animal" ><br>
<input type="checkbox" value="hawk" name="hawk1">Hawk<br>
Action taken:<input type="text" name="action" ><br>
<input type="checkbox" value="flew" name="flew1">flew<br>
<br>
<input type="submit" value="Insert thru typing" name="AI"><input type="submit" value="Insert thru checkboxes" name="AI1">
<br><input type="submit" value="Insert Both" name="AI2">
</form>
<b>Sentence will Change depending on the given inputs above will be shown below:</b><br>
<?php
//regular type in
if(isset($_POST['AI']))
{
$c = $_POST["color"];
$a = $_POST["animal"];
$at = $_POST["action"];
echo "<i>the quick $c $a $at over the lazy dog.</i><br>";
}
//for check boxes & radio buttons but on
//radio boxes you usually have 2 things to pick on and only choose 1 unlike check boxes which can choose more than 1
if(isset($_POST['AI1']))
{
$c1 = $_POST["red1"];
$a1 = $_POST["hawk1"];
$at1 = $_POST["flew1"];
echo "<i>the quick $c1 $a1 $at1 over the lazy dog.</i><br>";
}
//both will echo out the two options
if(isset($_POST['AI2']))
{
$var_c = $_POST["color"];
$a = $_POST["animal"];
$at = $_POST["action"];
$c1 = $_POST["red1"];
$a1 = $_POST["hawk1"];
$at1 = $_POST["flew1"];
echo "<i>the quick $c $a $at over the lazy dog.</i><br>";
echo "<i>the quick $c1 $a1 $at1 over the lazy dog.</i>";
}
?>
</center>
</body>
</html>
after giving the input and clicking the any of the buttons from it goes to http://xlsearch.org/ with random search result.
I'm using WAMP 5.3.0 at my Desk top while on the testing site I have PHP5.2.13, could this be the problem; why I'm having errors on my testing site?
Here is my code:
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>Assign5-PHP_Prog_Assign</title>
</head>
<body>
<center>
<br>
<i>the quick "brown" "fox" "jumps" over the lazy dog.</i>
<br>
<br>
<form method="post" action="assign5-PHP_Prog_Assign.php" name="form1">
<!--Here is Basic one 3 inputs tags will be used and submit button will be used t trigger the changes. -->
Color:<input type="text" value="" name="color" ><br>
<input type="checkbox" value="red" name="red1">Red<br>
Animal:<input type="text" value="" name="animal" ><br>
<input type="checkbox" value="hawk" name="hawk1">Hawk<br>
Action taken:<input type="text" name="action" ><br>
<input type="checkbox" value="flew" name="flew1">flew<br>
<br>
<input type="submit" value="Insert thru typing" name="AI"><input type="submit" value="Insert thru checkboxes" name="AI1">
<br><input type="submit" value="Insert Both" name="AI2">
</form>
<b>Sentence will Change depending on the given inputs above will be shown below:</b><br>
<?php
//regular type in
if(isset($_POST['AI']))
{
$c = $_POST["color"];
$a = $_POST["animal"];
$at = $_POST["action"];
echo "<i>the quick $c $a $at over the lazy dog.</i><br>";
}
//for check boxes & radio buttons but on
//radio boxes you usually have 2 things to pick on and only choose 1 unlike check boxes which can choose more than 1
if(isset($_POST['AI1']))
{
$c1 = $_POST["red1"];
$a1 = $_POST["hawk1"];
$at1 = $_POST["flew1"];
echo "<i>the quick $c1 $a1 $at1 over the lazy dog.</i><br>";
}
//both will echo out the two options
if(isset($_POST['AI2']))
{
$var_c = $_POST["color"];
$a = $_POST["animal"];
$at = $_POST["action"];
$c1 = $_POST["red1"];
$a1 = $_POST["hawk1"];
$at1 = $_POST["flew1"];
echo "<i>the quick $c $a $at over the lazy dog.</i><br>";
echo "<i>the quick $c1 $a1 $at1 over the lazy dog.</i>";
}
?>
</center>
</body>
</html>
after giving the input and clicking the any of the buttons from it goes to http://xlsearch.org/ with random search result.
I'm using WAMP 5.3.0 at my Desk top while on the testing site I have PHP5.2.13, could this be the problem; why I'm having errors on my testing site?