Forum Moderators: coopster

Message Too Old, No Replies

PHP Login Script Validation

Very Basic isuse

         

Man Utd For Life

11:57 pm on Feb 29, 2008 (gmt 0)

10+ Year Member



Hi Guyz,

I am working on a Sign up script.Well I have a field(text field) in which we need to enter a code for a country. Based on the code the next field(drop down) loads cities in that country.Now suppose I enter wrong code in country I need to throw an error on same page.

Suppose the code entered is right it then calls a function(onclick javascript function), which in turn calls a php script in background.This php script actually queries the databse based on code entered and send back the data to JS function where I use Http request object.

Since the querying is done in background I am having trouble in throwing error in main page.

Hope the description helps?

Any help would be greatly appreciated.

PHP_Chimp

10:28 pm on Mar 1, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If it is broken then go back a step.
Remove the javascript and just do a call to the php direct.
As at the moment your problem could be javascript or it could be php...you just dont know.
Once you have found out if the php works, including any error messages, then put the javascript back in.

It would also be a good idea to make sure that your application works for people that surf with no javascript. So if you are relying on javascript at the moment then you may want to think about a solution that doesnt rely on a technology that is not available on all platforms.

Welcome to WebmasterWorld :)