Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

formatting URLs and timestamp within <form> input field

Status
Not open for further replies.

lentildal

Programmer
Sep 24, 2001
25
GB
hello

i have some URLs in my database like

<a href=&quot;mailto:test@test.com&quot;>test@test.com</a>

and

<a href=&quot; target=&quot;_blank&quot;>www.test.com</a>

i also have a timestamp(8) field like

20020101

i would like to display them in an html form, in input textboxes. does anyone know how to format them so they look a bit nicer?

like

test@test.com

and


and

01.01.2002
give me all your lentils
 
You have to build a parser like the xml parser, but now for html.

you have to find the quotes and parse the info between them. That parsed info contains a lot of other stuff like html atrributes. You have to filter this and look for @ and http:// the words mailto you have to strip as well.

There is no PHP function that is capable of doing this for you, but i think on hotscripts.com you can find a parser that is already doing what you want. mcvdmvs
-- &quot;It never hurts to help&quot; -- Eek the Cat
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top