harry15106 Posted November 21, 2007 Share Posted November 21, 2007 I am new to PHP and apache. Installed both on windows XP pro 2 weeks ago. -apache2.2 - 'Apache Software Foundation'. -PHP5 - php.net - The PHP Group. PHP is running fine on test XP server with the exception of post, does not find objects or values. I upload page to hosted unix web site and it fine. I have reviewed apache httpd.conf and php.ini and cannot determine disconnect regarding the post. Sample code: ******************************************* <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Home Page</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <form action="home.php" method="post" target="_self"> hello world <input name="tagit" type="text" value="z12"> <input name="test" type="submit"> <?php echo $tagit ?> <?php echo $_POST[$tagit]; ?> </form></body> </html> **************************************************** Link to comment https://forums.phpfreaks.com/topic/78226-solved-php-post-method-using-apache-server/ Share on other sites More sharing options...
wildteen88 Posted November 21, 2007 Share Posted November 21, 2007 You should use $_POST['tagit'] not $_POST[$tagit] $tagit will only work if a setting called register_globals is enabled within the php.ini. register_globals has been disabled by default when PHP is installed, as it can cause a security exploits within your code. You can enable this setting if you wish however it is not recommended to. This is why your website site works fine however your local dev website (Win XP2) doesn't. Link to comment https://forums.phpfreaks.com/topic/78226-solved-php-post-method-using-apache-server/#findComment-396164 Share on other sites More sharing options...
harry15106 Posted November 26, 2007 Author Share Posted November 26, 2007 Thank you for your response, explains what is happening in an easy to understand manner. I appreciate your help! Link to comment https://forums.phpfreaks.com/topic/78226-solved-php-post-method-using-apache-server/#findComment-399434 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.