check if email exists in database |
[eluser]MrAmine[/eluser]
hello i want to build a form registration with json i want to check if is email exist in database or no how can i do
[eluser]Derek Allard[/eluser]
Quote:i want to build a form registration with jsonWhat do you mean "registration with json"? Do you mean you want it to be an ajax submission? If so, this isn't a CI obstacle and you might be best served looking through some jQuery tutorials. Quote:i want to check if is email exist in database or noYou could use $this->db->count_all_results() to see if you get any results back. Alternatively, run a full query then use num_rows() to see if you got any results back. If you did, then the email is already in there.
[eluser]Josh Holloway[/eluser]
Check out the following video on JSON with codeigniter: http://www.youtube.com/watch?v=Fbrn7fY5dGQ You'll also need to use what Derek has said above to check if any results in the database contain the email address already. But the video should be a start |
Welcome Guest, Not a member yet? Register Sign In |