Hi. I have a login system. There are 2 files called useredit.php and userinfo.php.
useredit.php is where users can edit their information and userinfo.php is viewing users information.
I was wondering if there was a function or something where users on useredit.php could tick a box or something which will not display there email address on userinfo.php.
I could just remove the code which displays the users email but it would be better if that could be optional.
Does anyone have a solution or can lead me in the direction?
I searched google but couldnt find anything.
Thanks a lot.
Hide email?
Moderator: General Moderators
- jaoudestudios
- DevNet Resident
- Posts: 1483
- Joined: Wed Jun 18, 2008 8:32 am
- Location: Surrey
Re: Hide email?
The answer is Yes.
Add a checkbox to your edit page. Have the value of it set to 1. Add a new column to the database. When they check that box get it to save the 1 to the relevant column.
On the other page that displays the information, use a if statement to check if there is a 1 in the database for that user, then dont execute that code that displays the user's email.
Add a checkbox to your edit page. Have the value of it set to 1. Add a new column to the database. When they check that box get it to save the 1 to the relevant column.
On the other page that displays the information, use a if statement to check if there is a 1 in the database for that user, then dont execute that code that displays the user's email.