Re: Need some HELP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



unless you have Globals turned on, I think you and
$_POST['variable_name_here'] in the second page.


print "<INPUT TYPE='hidden' NAME='UserName' VALUE='$_POST['username']>\n";


> 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
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux