Jump to content

Recommended Posts

How can i remove a URL link from a form text field or the area where results are posted when a user enters http://www.mywhateversite.com. For example, here on this site. I want to allow the text, but not the link. If you guys are familiar with myspace and have tried to put a link to another site, the myspace site automatically changes it to something else or blank. Thus allowing the user to post the site url, but without the link. ???

 

Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/72656-solved-removing-url-link-from-text-field/
Share on other sites

Well, i used this:

 

$sbrow_off["sb_myself"]=strip_tags($sbrow_off["sb_myself"]);

 

It does the job, except it also removes any other html code like backround color font sizes and so on. This is for a users profile like myspace where the user can enter html code in the profile area. I need to remove URL's from string.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.