Jump to content


Photo

Auto-Add HTTP


  • Please log in to reply
2 replies to this topic

#1 SlimSlyk

SlimSlyk
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 25 June 2006 - 03:13 AM

Hello,

I have a form where users will be submitting links to news articles. My question is, how can I check for the http:// in there and add it to the beginning if it isn't there?

Thanks!
[a href="http://www.newsfortress.com" target="_blank"]NewsFortress[/a] | Non-Stop News
The latest news articles reviewed and added all day long
[a href="http://www.newsfortress.com/blog" target="_blank"]Command Room[/a] | NewsFortress | News Behind the News
A blog maintained by the operators of NewsFortress

#2 SlimSlyk

SlimSlyk
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 25 June 2006 - 03:27 AM

Nevermind. Figured it out. My signature helped me! :D
[a href="http://www.newsfortress.com" target="_blank"]NewsFortress[/a] | Non-Stop News
The latest news articles reviewed and added all day long
[a href="http://www.newsfortress.com/blog" target="_blank"]Command Room[/a] | NewsFortress | News Behind the News
A blog maintained by the operators of NewsFortress

#3 benjrox

benjrox
  • Members
  • PipPip
  • Member
  • 17 posts
  • LocationSydney, Australia

Posted 25 June 2006 - 03:30 AM

Haha, naturally, my eye's go for the code before the text, so I read you siguture first. I was going to say "ereg_replace" but I guess you worked it out [img src=\"style_emoticons/[#EMO_DIR#]/wink.gif\" style=\"vertical-align:middle\" emoid=\":wink:\" border=\"0\" alt=\"wink.gif\" /]

Well, actually ereg_replace may not be the right way, anyway, it was the first thing that poped into my head before I read your second post ;)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users