Page 1 of 1

Errors on top of registration form.

Posted: Tue Apr 12, 2011 9:15 pm
by iskawt
Good day guys/gals,

I just want to kindly ask for suggestions about my form. I want to display the error on the same page where my form is if the user entered an invalid data on the registration form. I created a line of code on another page but logically it will load on the other page once the user clicked submit button. If i include my php code on my form code, it will display the way i want it to be BUT hackers can see my php code so it's not advisable to do it that way, right?

I want to display my errors on top of my form not on the other page once the user submits his data.


Thanks,
iskawt

Re: Errors on top of registration form.

Posted: Tue Apr 12, 2011 10:12 pm
by Jonah Bron
No, they can't see your code. You can safely place your PHP into the form page.

Re: Errors on top of registration form.

Posted: Tue Apr 12, 2011 10:46 pm
by iskawt
Really? Sorry, I am a beginner. I am creating a registration and log in form for my website.

Re: Errors on top of registration form.

Posted: Wed Apr 13, 2011 7:26 pm
by Jonah Bron
Yes, really. If you post both pages (registration and the page it submits to), I can assist you in combining them, and improve your code.