|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
HTML Form Post isn’t passing variables to PHP
HTML Form Post isn’t passing variables to PHP
Hello all, I am running Windows 98, PHP Triad Apache 1.3.14 webserver, recently upgraded PHP to 4.0.5 and my forms aren’t passing the variables to PHP anymore. File php1.php: <html> <form action="php2.php" method="post"> <input type=text name="abc"> <input type=submit> </form> </html> File php2.php: <html> <?php echo "[".$abc."]" ; ?> </html> Output from connecting to php1.php (after filling in the field and clicking on “Submit Query”): Warning: Undefined variable: abc in C:apachehtdocsphp2.php on line 3 [] Thanks, Charlie chvol@aol.com |
|
#2
|
|||
|
|||
|
RE: HTML Form Post isn’t passing variables to PHP
Try this - <?php echo("[" . $abc. "]"); ?> The above is ok only if Global Variables are turned ON in php.ini file. Otherwise you need to use the following format - echo("[" . $_POST[abc] . "]"); $_POST is a Global Array of all the POSTed variables in the form. hth |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Installation > HTML Form Post isn’t passing variables to PHP |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|
|