Errors on top of registration form.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
iskawt
Forum Newbie
Posts: 12
Joined: Wed Aug 11, 2010 11:20 pm

Errors on top of registration form.

Post 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
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: Errors on top of registration form.

Post by Jonah Bron »

No, they can't see your code. You can safely place your PHP into the form page.
iskawt
Forum Newbie
Posts: 12
Joined: Wed Aug 11, 2010 11:20 pm

Re: Errors on top of registration form.

Post by iskawt »

Really? Sorry, I am a beginner. I am creating a registration and log in form for my website.
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: Errors on top of registration form.

Post 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.
Post Reply