|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Help ! Form variables
Hi .
I developed a small system with secured login area for member under win2k enviroment where later I upload it to a linux server. As for my past experience, there is no problem of doing so except a little adjustment . But my recent system, which works fine in Win2k, is not working under linux enviroment. I trace down the problem where by variables are not passed from the form to action file. meaning in file 1: test1.html <html> <body> <form action=test2.php method=post> name <input type=text name=fname> <br> <input type=submit name=submit value=submit> </html> and in test2.php <? echo" variable name: $fname<br>"; ?> and seems the varibale $fname is empty, meaning the variable is not passed from my test1.html to test2.php .. but it works fine in win2k enviroment any suggestion,
__________________
Rathaur ====================== Knowledge is Power |
|
#2
|
|||
|
|||
|
Is register_globals set to off?
Try using the $HTTP_POST_VARS['fname'] array. |
|
#3
|
|||
|
|||
|
Rathaur,
Kanu is right; itt sounds like your register_globals are off. In your test 2 script, you can't refer to your variable as $fname. Because register_globals are off, you need to make use of the superglobal arrays: $_POST['fname'] or $_GET['fname']: depending on the method used in your <form> tags... In this case, you would use the $_POST[] array as your method is set to post. Hope that helps! For more information, check out the PHP Manual.
__________________
____________________________________________ Developer Shed Weekly Writer | DevArticles Forum Moderator Build Your Own KlipFolio Klip With PHP FrankManno.com - Under Construction Design Interactive Group - Under Construction |
|
#4
|
|||
|
|||
|
thanks, the $_post_var works fine
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Help ! Form variables |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|