Jump to content

Search form suddenly stopped working


cmdeer

Recommended Posts

So, I have this search form, which has worked totally fine for almost a year. Then, all of a sudden, the search stopped working and the admin stopped working - basically the entire database stopped working. Here's the php for the search form...

 

http://www.equinus-sapientia.net/beqannamembers/search.txt

 

Below is what is not working. Type in anything, and it doesn't return any results.

http://www.equinus-sapientia.net/beqannamembers/search.php

 

 

Any suggestions? I'm not fluent with php, so if you see anything that might be an issue, try to keep it lay-mens ;)

Link to comment
https://forums.phpfreaks.com/topic/126188-search-form-suddenly-stopped-working/
Share on other sites

Looking at your code (released 5 years ago), it's obvious that it was written for an old version of php where register_globals = ON.  That's the insecure setting which was fixed in later version of php.  So, it looks as though your web host finally got around to updating their version of php to something modern and left the setting of register_globals as OFF.  Change your script to suit is the simple solution.

 

if ($action == "select")

 

should be

 

if ($_POST['action']=="select")

 

Make similar changes to all form variables and it'll work.

Okay, so I browsed around a bit and found some codes to override some of the issues with the global security. Honestly, it's a childrens site, I don't care about security. I applied it to the search page and it worked, and then I applied it to the admin page and it lets me log in, but then it stops there. Also, it's not working very well for the add page either.

 

http://www.equinus-sapientia.net/beqannamembers/add2.txt

http://www.equinus-sapientia.net/beqannamembers/admin.txt

 

Any more suggestions?

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.