JonasE Posted April 12, 2007 Share Posted April 12, 2007 hello all, I have run into a bit of an issue... On my three development boxes I run Gentoo, BSD and Windows with practically the same PHP config along with Apache 2. A project I recently completed was just uploaded to a client's server running Apache 2 and PHP (5.2.1). I can no longer submit any data from forms: page.html <form action="page2.php?action=insert" method="post"> Name<br /> <input size="40" name="name" type="text"><br /> <input type="submit" value="Submit"> </form> page2.php if(!isset($_REQUEST['action'])){ die("No function Value given"); } $action = $_REQUEST['action']; switch($action) { case 'insert': $name = $_REQUEST['name']; // Create instance of database class and connect. $mysql = new mysql(); $mysql->connect(); // Do insert. $insert = $mysql->insert("database","name","$name"); // Redirect to main listing. header('Location: index.php'); break; } Like I said, this has worked flawless up until now... Now when I submit I get a blank page with the URL showing as page2.php?action=insert I thought this was due to register globals, but as far as I know, I am handling that correctly... And it is also "off" on my tests servers. I am going crazy over this, does anyone have any idea what is going?? Thanks, Jonas Quote Link to comment Share on other sites More sharing options...
MadTechie Posted April 12, 2007 Share Posted April 12, 2007 Have you tried replacing REQUEST with _GET ? Quote Link to comment Share on other sites More sharing options...
JonasE Posted April 12, 2007 Author Share Posted April 12, 2007 Yep, sure have. Same result... Quote Link to comment Share on other sites More sharing options...
MadTechie Posted April 12, 2007 Share Posted April 12, 2007 what about the lines $mysql = new mysql(); $mysql->connect(); they seams incompleate as i see no include Quote Link to comment Share on other sites More sharing options...
JonasE Posted April 12, 2007 Author Share Posted April 12, 2007 Sorry, I left those include lines out for simplicity. They are properly included. Thanks for looking at my issue... It's really bugging me... Quote Link to comment Share on other sites More sharing options...
rpadilla Posted April 12, 2007 Share Posted April 12, 2007 try if(!isset($_REQUEST['action']) && strlen($_REQUEST['action']) == 0){ die("No function Value given"); } also try inserting some stuff in your case 'insert' like echo 'insert' or try to echo $_REQUEST['action'] cheers Quote Link to comment Share on other sites More sharing options...
JonasE Posted April 12, 2007 Author Share Posted April 12, 2007 I have tried changing the code in several different ways already... What bothers me the most though is that, like I said, this works on 4 other servers... What in the server configuration could cause something like this? No data is being passed through forms what so ever... Jonas 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.