johnshanahan
02-24-2011, 12:12 AM
new to php, cant get the forms next to a: and b: to appear in the html portion of my code:
[CODE]
2 <?php
3 if (isset($_POST['submit']))
4 {
5 $a = $_POST['a'];
6 $b = $_POST['b'];
7 if ($a == $b) {
8 echo "a is equal to b.";
9 }
10 }
11
12 ?>
13 <HTML>
14 <BODY>
15 <center><br /><br />
16 <form method="post" action=" <?PHP echo $_SERVER['PHP_SELF']; ?> " >
17 a: <insert type="text" name="a"> <br />
18 b: <insert type="text" name="b"> <br />
19 <input type="submit" name"submit">
20 </form>
21 </BODY>
22 </HTML>
[CODE]
[CODE]
2 <?php
3 if (isset($_POST['submit']))
4 {
5 $a = $_POST['a'];
6 $b = $_POST['b'];
7 if ($a == $b) {
8 echo "a is equal to b.";
9 }
10 }
11
12 ?>
13 <HTML>
14 <BODY>
15 <center><br /><br />
16 <form method="post" action=" <?PHP echo $_SERVER['PHP_SELF']; ?> " >
17 a: <insert type="text" name="a"> <br />
18 b: <insert type="text" name="b"> <br />
19 <input type="submit" name"submit">
20 </form>
21 </BODY>
22 </HTML>
[CODE]