Jump to content

[SOLVED] Works fine locally but not on a live server


Boo-urns

Recommended Posts

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.