How do I hide email address in address bar when form is submitted?
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,
[email protected] would be name?
pr0gr4mm3r posted this at 12:51 — 1st July 2007.
He has: 1,502 posts
Joined: Sep 2006
If the system is using the email address as the primary key, then no. The reason is "name" could be "[email protected]", "[email protected]", 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.
drew22299 posted this at 15:40 — 1st July 2007.
They have: 105 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 posted this at 19:19 — 1st July 2007.
He has: 1,502 posts
Joined: Sep 2006
What are you changing the links to? I would suggest referring to the user by ID, and not by email.
drew22299 posted this at 08:14 — 2nd July 2007.
They have: 105 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/[email protected]
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
?>
Thanks,
Drew,
pr0gr4mm3r posted this at 13:02 — 2nd July 2007.
He has: 1,502 posts
Joined: Sep 2006
You are going to have to change that query to specify the userid field.
drew22299 posted this at 13:34 — 2nd July 2007.
They have: 105 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= "> b><?php
=rs("user")
?>
<?php
=rs("user")
?>
<?php
=rs("pass")
?>
koitech posted this at 13:27 — 2nd July 2007.
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
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.