Jim from Oakland Posted May 2, 2003 Share Posted May 2, 2003 Team PHP I am hoping to do PHP development without having to become an Apache jocky (jock?). I just downloded and installed Apache and php. Html forms do not \"push\" values into the next script. I sure hope there is a \"just do this\" setting for the apache server... XP Home. What is the best source for BASICS about running Apache and PHP? Jim Quote Link to comment Share on other sites More sharing options...
effigy Posted May 2, 2003 Share Posted May 2, 2003 do you have sample code? this could be a register_globals issue. Quote Link to comment Share on other sites More sharing options...
Jim from Oakland Posted May 2, 2003 Author Share Posted May 2, 2003 Effigy I am doing nothing exotic, just basic html form In fact, though I am doing pretty well with php itself, topics that are more system and server oriented are totally unfamiliar to me. I doubt it will help much but here is an excerpt of my code. It all works fine on my ISP\'s server. But he does not want me to use his sever for development so I need to work on my own machine. Apache and php seem to be running fine, I just need to set some stuff in Apache I\'m sure. Thanks so much for the help. <?php // the name of the file to post to is in the variable $postToFileName Echo\'<form name=\"mail\" method=\"post\" action=\"\' . $postToFileName .\'\">\'; ?> Snip <?php Echo(\'<Input type=\"hidden\" name=\"\' . \'Item\' . $ItemIndex . \'ID\' . \'\" value=\"\' . ${\'Item\' . $ItemIndex . \'ID\'} . \'\">\'); ?> Snip <input type=\"submit\" name=\"submit\" value=\" Check-in \"> Quote Link to comment Share on other sites More sharing options...
effigy Posted May 2, 2003 Share Posted May 2, 2003 on the page that the form is posted to... try to echo out the variable using echo $_POST[\'input_name\']; this should work. apache would not be the problem unless it gives you a message that the POST method is not allowed on the server. Quote Link to comment Share on other sites More sharing options...
Jim from Oakland Posted May 2, 2003 Author Share Posted May 2, 2003 effigy Thanks. As the military folks say, \"I\'m looking through a staw\" when dealing with servers and the greater php environment -- but I am enjoying programming! Question: when I first started hacking (on ISP\'s severs) html form \"variables\" seemed to show up in the \"called\" script \"automatically.\" That is, if I have a hidden control named Test and in Screen1.php then in the script posted to (e.g. screen2.php) I could immediately refer to the variable named $Test without the intermediate step of accesing $_POST[\'Test\'] A barely related question: When testing on ISP server (apparently Netscape web server) I got error messages. They were not very helpful but at lest they reported the offending line. Can I do that with Apache? Thanks a billion! Jim Quote Link to comment Share on other sites More sharing options...
effigy Posted May 2, 2003 Share Posted May 2, 2003 referring to variables without the $_POST prefix is based on a php setting called register_globals. if it\'s on you do not need the prefix, but it is the more secure and \"proper\" way i believe. were the error messages related to php? if so you can handle them in the php.ini, or on the fly - take a look at shiva\'s tutorial: http://forums.phpfreaks.com/viewtopic.php?t=2139 ...or are you speaking of controling the error pages? such as 404 file not found, etc. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.