houssam_ballout Posted April 14, 2009 Share Posted April 14, 2009 Hello all,I am developing a html & php contact page,I am newbie in programming, I need to know how to validate my form through html and when I press submit, I need to stay on the same page and give the user a message telling him/her so.Any help Link to comment Share on other sites More sharing options...
jlhaslip Posted April 14, 2009 Share Posted April 14, 2009 So, you want a single page contact script that stays on the same page if there are errors to report?What do you want to do if the Email is successful?Google Larry Ullman Redux Method and Larry Ullman Sticky Forms for information on handling forms on a single page. Link to comment Share on other sites More sharing options...
houssam_ballout Posted April 14, 2009 Author Share Posted April 14, 2009 I could handle it via php on the same page, but while searching I see that this could be done easily via AJAX, can you help?Thanks Link to comment Share on other sites More sharing options...
jlhaslip Posted April 15, 2009 Share Posted April 15, 2009 I don't do Ajax. Link to comment Share on other sites More sharing options...
thescientist Posted April 16, 2009 Share Posted April 16, 2009 I could handle it via php on the same page, but while searching I see that this could be done easily via AJAX, can you help?Thanksit's pretty damn easy with PHP though. There must be tons of examples online that you can custom tailor to your needs. Link to comment Share on other sites More sharing options...
houssam_ballout Posted April 16, 2009 Author Share Posted April 16, 2009 it's pretty damn easy with PHP though. There must be tons of examples online that you can custom tailor to your needs.Yeah I know, but with AJAX I heard that you can do amazing work, right? Link to comment Share on other sites More sharing options...
Synook Posted April 16, 2009 Share Posted April 16, 2009 Yeah I know, but with AJAX I heard that you can do amazing work, right?AJAX allows you to send HTTP requests without refreshing the page. It isn't magical though :)You could use AJAX to pass the data on to a PHP script that validates the data and returns a response, but unless you need validation against data stored on the server (e.g. does this user exist), then this method is no more secure than doing a straight client-side validation. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.