I hope someone can help, I simply want to have lots of else if but it's not letting me put just 1 in there.
I've tried using "switch" but because I don't know the email address before someone enters it switch won't work.

I've seen other people have problems with else if and query so I don't know if that's my problem.
Any help would be soooo well received. Thanks for taking the time.

1) mysql_ functions are deprecated and will probably be removed in an upcoming update, because they're slow and less secure than mysqli_ or PDO which has become the standard for database interactions.

2) Rather than having a bunch of calls to your mysql_query function based on your conditions, have an $sql variable that is assigned a different statement based on your conditions, and then you can have one execute point for the query which will make debugging a lot easier.

Ok, here is a link to a quick PDO lesson that will make your life easier and your code better: http://jream.com/learning/videos/php-oo ... o-examples
It's very short but a huge help. Also make sure you search the forum as I'm sure your question has been answered several times. Just search for logins, database queries etc.

Thanks so much for the quick replies, I've only just started learning php

I'm watching the video now, but is it possible to mix PDO and php, meaning can I keep everything I've done with IPN already and add PDO in to the script.

Mainly I'd like to keep the script above (spent 2 weeks getting that, I know ) but where it the submit button is pressed it then goes in to PDO so I have my 6 or 7 different query's (checks on something before moving to the next)

PDO will only take over the database interaction part for you. It can be used procedurally the way you're using the mysql_ functions right now, or objectively as demonstrated in the video. Check http://php.net/PDO for explanation of procedural implementation. Right now I'm responding from my iPad so I can't conveniently work on your code but I expect to be able to do some revisions for you in about 2 hours

Aww thank you, if you do manage to work out why I can't add else if or work out the best way for me to have many different else type query's I would love to donate to you (if that's allowed and not breaking any forum rules)

I've spent so long on this, first I spent a week on IPN only to find paypal had the problem not me, then another week learning as much as I can on php only to find it getting removed next year. arrg

Any help will save my bleeding eyes. (p.s. I'm serious about a donation)

all you have to do is supply it your database location and credentials in place of the constants that I use, and make sure to save it in the same folder as the other file (or update the 'include' accordingly).

@lincon - Please read about the following before you proceed:
a). What is PHP and what tags are needed for a php file, difference between short tag and normal php tag
b). What is a class and class variable
c). What is PDO?

Unless you understand what the above are, it will be difficult for you to proceed.