Jump to content

[SOLVED] php form stopped working


ricferr

Recommended Posts

Hi all,

 

I had this form running for a website and, apparently without any reason, it stopped working. When the submit button is pressed, it just reloads the page. I tried uploading an old version of the form, which I'm sure to be working fine when it was removed (more than a year ago) and it too doesn't work.

 

It has been suggested that some new PHP patch may have been released and, thus, stopping my form is from running.

 

I'm uploading the form just in case someone has any idea.

 

thanks in advance

 

regards

 

Ricardo Ferreira

 

[attachment deleted by admin]

Link to comment
Share on other sites

Hi there,

First thing that I noticed is that the code uses the deprecated php short tags.

ie <? rather than the (now) correct <?php

Newer versions of php have the short tags turned off.

Try changing all them and see if it works.

 

Chris

Link to comment
Share on other sites

OK, I have checked your site out and the page is working (ie no php errors)so it is not what I said though it would be a good idea to make that change anyway.

 

So, it is probably due to the fact that you aren't referring to the posted variable correctly.

 

The code uses the variable name directly "assuming" that php know what they are (again, a server side configuration setting)

For example you have this:

if ($Submit)

That should be :

if (isset($_POST["Submit"])

Likewise for all the variables within that conditioned section that is supposed to be reading the posted values.

 

Chris

Link to comment
Share on other sites

As cbolson has stated, your script relies on register_globals being set to on in the php.ini. The most likely thing thats happened is your webhost has realised the security hole this can be and has disabled it. You can check the setting using phpinfo. If it is disabled, cbolson has already provided the fix.

Link to comment
Share on other sites

Thanks everyone for the help. The form is now working fine.

 

However, a problem persists with the photo gallery. Before this PHP update, when clicking on a thumbnail, a new window would open with the full size version of the chosen pic. Now, the window opens but the pic is not found. I don't think the same solution applies to this problem as the variable from the thumbnails page is not sent with the POST method.

 

I'm uploading both the thumbnails file and the pics file.

 

Thanks in advance

 

regards

 

RF

 

 

 

[attachment deleted by admin]

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.