Hello,
I have a registration form. I should have many fields such firstname,lastname,age,address,post codes and many other but how ever, at the time of registration I would like user to enter as little data as possible. Say firstname,address,email and password will do.
Then they activate their account using activation link sent to their email.When they login for the first time, I would like them to feed remaining datas.
For this i am thinking of making the fields NULL or enter a simple value such as "nodata". Every time when the user login, I would like to check if the data in the address field is "nodata". if it is so then the user will be redirected to another page and if it is not then the user will continue using the account.
I was just wondering is there any other way to do this. This fields are imports and can not be left blank but at the same time, I dont want user to fill in when they register for the first time.
Thank you
how to check empty value in database and redirect
Moderator: General Moderators
Re: how to check empty value in database and redirect
I'd just leave the fields blank and check if $field = "". You won't have to worry about any weird problems, like if the user for some odd reason enters in 'nodata' into one of the fields.