Boo-urns Posted February 5, 2009 Share Posted February 5, 2009 I have a dropdown and when a user selects how many entries they want to add it calls a file to create a form and bring it back. Well it works great locally but not on a live server. Firebug is saying I'm getting a 500 error. (I've tried absolute and relative paths but it's not working.) If I copy the include file on that script page it will run hardcoded but isn't getting the variables. The data posts just fine but PHP isn't pulling the variables. <?php $numForms = mysql_real_escape_string($_REQUEST['numForms']); Is something screwed up in the php.ini file or something on the server? Any ideas? I'm stumped -Corey Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted February 5, 2009 Share Posted February 5, 2009 What does a phpinfo() statement show for register_globals? Quote Link to comment Share on other sites More sharing options...
Boo-urns Posted February 5, 2009 Author Share Posted February 5, 2009 It says Off (on both local and live site) Quote Link to comment Share on other sites More sharing options...
Boo-urns Posted February 5, 2009 Author Share Posted February 5, 2009 Another interesting thing that might help is if I send the variable back via json_encode $arr = array ('errors'=>$error,'output'=>$output, 'numForms'=>$_REQUEST['numForms']); echo json_encode($arr); It will display the correct number for numForms. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted February 5, 2009 Share Posted February 5, 2009 Have you done a "view source" of the form so that you know it is being created correctly? Have you echoed $_REQUEST['numForms'] so that you know what is in it? Is the problem that $numForms is not set, in which case you probably don't have a valid mysql connection at the time the mysql_real_escape_string() statement is being executed. Do you have any error checking logic as part of your mysql_connect() statement so that you know if it worked of failed? Are you executing this code on a system with error_reporting set to E_ALL and display_errors set to ON to get php to help you? Quote Link to comment Share on other sites More sharing options...
Boo-urns Posted February 5, 2009 Author Share Posted February 5, 2009 Yea i have echoed the request variable and it wasn't pulling but I checked up on display_errors and it was off so I'll go at it for a bit and hopefully i find the solution! Thanks for the help. Quote Link to comment Share on other sites More sharing options...
Boo-urns Posted February 5, 2009 Author Share Posted February 5, 2009 You definitely pointed me in the right direction. I don't recall what I changed that made it work probably a all of the above but its running now! Thanks! 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.