Ezilon.com - Target Your Audience, be Seen in Your Region

How do I hide email address in address bar when form is submitted?

You are viewing this site as a guest. Join our community to get your questions answered and share knowledge. Active members may advertise and ask for a website critique.

He has: 107 posts

Joined: Mar 2006

I have a user managment script which I have modified, the user name in the database is set as the email, when the user is logged in and the want to edit their profile their email address is sent in the address bar, also when browsing other users you can see their email address in the bottom of the screen in explorer and their email addresses also get sent in the address bar.

Is there any way I can stop this? Or chane it so the rest of their email address isn't displayed for example,

name@hotmail.co.uk would be name?

pr0gr4mm3r's picture
ModeratorSponsor

He has: 633 posts

Joined: Sep 2006

If the system is using the email address as the primary key, then no. The reason is "name" could be "name@hotmail.co.uk", "name@yahoo.co.uk", etc.

For all my websites that require user logins, I have the database assign the users a unique number as well as keep the email address unique. That way, the system doesn't show their email address everywhere for a key, and they can still sign in with it if they don't want to remember their number.

He has: 107 posts

Joined: Mar 2006

There is a userId number in the database, except I think username is assigned to cookies at the top of pages. If I change links for edit profile, view member details on the browse members page it says there is no current record. Any suggestions?

Drew,

pr0gr4mm3r's picture
ModeratorSponsor

He has: 633 posts

Joined: Sep 2006

What are you changing the links to? I would suggest referring to the user by ID, and not by email.

He has: 107 posts

Joined: Mar 2006

When on the browse users page, if you select a user from the list it goes to the page:

http://www.nwic.org.uk/user_details.asp?user=email@hotmail.co.uk

I have tried changing the link to user_details.asp?user=userId

but I get an error saying there needs to be a current record, which leads me to think that I will have to change the cookies at the top of the pages because when the SQL is executed it assigns user =

<?php
username
?>

and username is defined at the top of the page. Would you need more info to help or can you determine what needs to be done?

Thanks,

Drew,

pr0gr4mm3r's picture
ModeratorSponsor

He has: 633 posts

Joined: Sep 2006

You are going to have to change that query to specify the userid field.

He has: 107 posts

Joined: Mar 2006

The fields in the database are as follows:

user(email), pass, nr(userID for some reason), name, surname, house, street, line2, town, postcode, country, homephone, mobilephon, signupdate, admin, active

nr is the userId number,
Does it make it more difficult to return user details because nr is the 3rd column along?

Here is the SLQ code which displays the details for a specifc user. What should I change? It seems to select all the details from the users database. I have underlined the bit I think I need to change, but even if I chanegd it to nr the cookies at the top of the page would still refer to username. This is confusing! Any help you can provide will be appresiated because I will learn alot from it!

<?php
Dim Apples

Set Apples = Server.CreateObject("ADODB.Connection")

ConnStr = "DRIVER={Microsoft Access Driver (*.mdb)}; "
ConnStr = ConnStr & "DBQ=" & Server.MapPath("db\users.mdb")
Apples.Open(ConnStr)

SQLtemp = "SELECT * FROM [password]"
Set rs = Apples.Execute(SQLtemp)

while not rs.eof
?>

<?php
=rs("nr")
?>

href="userdetails.asp?user=

">

<?php
=rs("user")
?>

b>

<?php
=rs("pass")
?>

They have: 24 posts

Joined: Jun 2007

you can include a hidden field. and store the user name in that field. do not post the user name like this
for example you can do it like this