Bildoz Posted August 3, 2006 Share Posted August 3, 2006 Hi folks! TIA for any help!I recently inherited a website for a chairty and have some basics in php. We migrated to a new server and the email submission form for adopting a dog or cat stopped working. I have spent some time trying to figure out what is wrong, and I think I got that. ( Now I can't see to figure out how to fix it. I am very noob in php and just starting to learn it. This seems like a simple problem but I keep getting stumped. Please let me know if I left some data off. I have been reading google and tutorials and coding since 6 am, so sorry for any mispellings. Here is my problem area: Undefined variable : PHP_SELF (line 25)Undefined variable : op (line 1485)My code is attached.Thanks again for any assistance that can be offered! -Bildoz[attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
Caesar Posted August 3, 2006 Share Posted August 3, 2006 What version of PHP are you running on your server?Replace $PHP_SELF with $_SERVER[PHP_SELF]. Also...I suspect this script relies on register_globals to be turned on. So, in lines 1485 and 1493 (Or there abouts) replace $op to $_POST[op]. Quote Link to comment Share on other sites More sharing options...
Caesar Posted August 3, 2006 Share Posted August 3, 2006 That should get rid of the first errors...but you're going to have to change a lot of your variables in your conditional statements. Quote Link to comment Share on other sites More sharing options...
Bildoz Posted August 3, 2006 Author Share Posted August 3, 2006 What I think is going on was that the new server uses an up to date version of PHP and the old one did not. This form was made years ago. I am going to try those fixes now, I will let you know!Thanks for the quick replies! You guys rock. Quote Link to comment Share on other sites More sharing options...
Caesar Posted August 3, 2006 Share Posted August 3, 2006 Well I can also tell in your code that it is relying on register_globals to be turned "On" which isn't generally a good idea. And your new server has them turned off...so a lot of your code needs to be modified now. So on variables that are defined via a form that has been posted....you need to specify this.Eg:[code]$op = $_POST[op];[/code]...before you can use the $op variable. And you have a ton in your script. Quote Link to comment Share on other sites More sharing options...
Bildoz Posted August 3, 2006 Author Share Posted August 3, 2006 I think you are right on. The small fixes didn't do it, I stii get errors on the "op" lines. I will go ahead and make an html form until I can get this figured out. Thanks a lot for your help. I see that I am just hitting the tippiest top tip of the iceberg. 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.