Hello,
I have been working on a classified ads site that is live. I have run into a snag that IU need some help with.
When a user goes to post an ad as an anonymous user, and that same user has an account, we want to force that user to log in.
in case that is not clear enough:
@post
if the email address matches an account 'email'
Save the current post
prompt for login
return to post, and submit from account after logging in (same form)
WHat needs ot happen on the back end is at the time the form is submitted the database table for "acc_users" needs to be checked to see if the email exists in the "email" field. If so we then need to temporarily save the data from the form and force the user to the login page.
Since I am totally illiterate at accessing a database from PHP I seek suggestions or examples , preferably with annotations so that even I may understand it.
Thanks is advance
Check a database on form submission
Moderator: General Moderators
Re: Check a database on form submission
What you seek is Google.
-
MHardeman25
- Forum Commoner
- Posts: 42
- Joined: Mon Jul 12, 2010 10:34 am
Re: Check a database on form submission
no I do not seek google. I tried that. Google is not some secret that only you know.
As for the link to the database creation, thanks , but...I mean come on really?
As for the link to the database creation, thanks , but...I mean come on really?
-
MHardeman25
- Forum Commoner
- Posts: 42
- Joined: Mon Jul 12, 2010 10:34 am
Re: Check a database on form submission
well, i didn't know how far advanced you were, so I figured you should start from the beginning.
http://www.homeandlearn.co.uk/php/php.html
that's the entire tutorial list. Just find which one is appropriate for what you want to do.
http://www.homeandlearn.co.uk/php/php.html
that's the entire tutorial list. Just find which one is appropriate for what you want to do.