Need some HELP
| From: | Adam Farid | Date: | Mon, 10 May 2004 18:36:42 +0000 |
| Subject: | Need some HELP | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-34345@lists.php.net to get a copy of this message | ||
Hi,
I am a new to php. I am using php ver 4.0.3 and MySQL.
I have wrote two files and I'd like to pass some varaibles from first file to use them in the second file.
but the values did not displayed in the second file(nothing print out). and also I want to pass them to anothr file ... here is what I've wrote :
******** file1.php**********
<?php
.....
$username="AAAAAAAAA";
$user_num="123";
$user_addres="User Address";
print "<FORM action='file2.php' method=post>";
print "<input type=submit value='send'>";
print "<INPUT TYPE='hidden' NAME='UserName' VALUE='$username'>\n";
print "<input type=hidden name=UserNum' value='$user_num'>";
print "<input type=hidden name='Addrress' value='$user_addres'>";
print "</td>";
print "</FORM></tr>";
....
?>
** second file file2.php ****
<?php
....
?>
<FORM action='anothrfile.php' method=post>
<table>
<?
print "<INPUT TYPE='hidden' NAME='User_name' VALUE='$UserName'>";
print "<input type=hidden name=User_Num' value='$UserNum'>";
print "<input type=hidden name='User_Addres' value='$Address'>";
?>
<tr><th align=left >Name:</th><td ><? print "$User_name"; ?></td></tr>
<tr><th align=left >User Number:</th><td > <? print "$User_Num"; ?></td></tr>
<tr><th align=left >Address:</th> <td ><? print"$User_Addres"; ?></td></tr>
...
<input type=submit value='submit'>
</table>
</FORM>
..
Kind Regrads
Adam
I hope someone can help me. Thanks
_________________________________________________________________
Stay in touch with absent friends - get MSN Messenger http://www.msn.co.uk/messenger