Php isset POST issue

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
User avatar
Strider64
php-forum Active User
php-forum Active User
Posts: 310
Joined: Sat Mar 23, 2013 8:24 am

Tue Aug 05, 2014 5:59 am

Why don't you just do this on top:

Code: Select all

if ( isset($_POST['RegisterButton']) && $_POST['RegisterButton'] == 'Submit' ) {
   // Your processing registration script goes here....
}
and I don't know why you are checking to see if a user's is login in or not on a registration page, for it seems like a waste of time? I mean that is why they are registering in the first place? Unless I'm missing something? :oops:

You can always validate the user's input inside the registration script, if that was what you were trying to do? Though I would do that in JavaScript as the main way of validating and also have it done in PHP if you want graceful degradation (for those people who disable JavaScript).

Post Reply