Forums
This topic is locked
How to add links to a db
Posted 17 Sep 2003 22:36:17
1
has voted
17 Sep 2003 22:36:17 Michal Dusik posted:
Hi!I have a problem because I have a db of 1000 users in this format:
Name, Surname, Adress, Phone, E-mail
The field "e-mail" contain an e-mail but when I visualize the whole db in a php page, its not clickable (linked) but just listed as text. How can I make the e-mail clickable without editing each 1000 names by hand?
Thanx a lot
Miky
Replies
Replied 18 Sep 2003 10:33:34
18 Sep 2003 10:33:34 Owen Eastwick replied:
If you store the following in the DB:
Then you can do something like this to turn it into a link when displayed:
<% varEmail = rsName.Fields.Item("Email".value : Response.Write("<a href=""mailto:" & varEmail & """>" & varEmail & "</a>" %>
Alternatively you could convert it into a link before inserting it into the database:
varEmail = Request.Form("txtEmail"
varEmail = "<a href=""mailto:" & varEmail & """>" & varEmail & "</a>"
Regards
Owen.
-------------------------------------------------------------------------------------------
Used programming books and web development software for sale (UK only): www.tdsf.co.uk/tdsfdemo/Shop.htm
Developer services and tutorials: www.drdev.net
Multiple Parameter UD4 / Access 2000 Search Tutorial: www.tdsf.co.uk/tdsfdemo/
Edited by - oeastwick on 18 Sep 2003 10:38:15
Then you can do something like this to turn it into a link when displayed:
<% varEmail = rsName.Fields.Item("Email".value : Response.Write("<a href=""mailto:" & varEmail & """>" & varEmail & "</a>" %>
Alternatively you could convert it into a link before inserting it into the database:
varEmail = Request.Form("txtEmail"
varEmail = "<a href=""mailto:" & varEmail & """>" & varEmail & "</a>"
Regards
Owen.
-------------------------------------------------------------------------------------------
Used programming books and web development software for sale (UK only): www.tdsf.co.uk/tdsfdemo/Shop.htm
Developer services and tutorials: www.drdev.net
Multiple Parameter UD4 / Access 2000 Search Tutorial: www.tdsf.co.uk/tdsfdemo/
Edited by - oeastwick on 18 Sep 2003 10:38:15