i ran the same code on two system configured with php and on 1 system it was ruunig smoothly but on the other it is not printing variable value but it print rest of the string.
code for first page i.e form is<html>
<form action="eg9.3.php" method="GET">
<input type="text" name="user">
<br>
<textarea name="address" rows="5" cols="40">
</textarea>
<br>
<input type="submit" value="hit it!">
</form>
and the code for recieving page is
6: <?php
7: print "Welcome <b>$user</b><P>\n\n";
8: print "Your address is:<P>\n\n<b>$address</b>";
9: ?>
this code works well on one system but not on other it is not printing the values of the variables. so the problem is with php..kan anyboy tell me wat actually the problm is
?>
variables passed from form are not printed in next page
Moderator: General Moderators
-
bugthefixer
- Forum Contributor
- Posts: 118
- Joined: Mon Mar 22, 2004 2:35 am
Hi,
Try:
Also, make sure you try "post"
Hope this helps you in some way 
Try:
Code: Select all
$user = $_GETї'user'];
$address = $_GETїaddress];
Print "Welcome $user<br>"
Print "Your address is $address"Code: Select all
$user= $_POSTї'user'];
$address = $_POSTї'address'];
echo "Welcome $user<br>"
echo "Your address is $address"- softsolvers
- Forum Commoner
- Posts: 75
- Joined: Fri Feb 13, 2004 4:26 am
- Location: India