Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6679299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:20:36+00:00 2026-05-26T04:20:36+00:00

I have a form that submits and displays text. Entering http://www.twitter.com for example displays

  • 0

I have a form that submits and displays text. Entering http://www.twitter.com for example displays in clear text. How can i get it to automatically display as a clickable link?

I am working with MySQL and PHP.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T04:20:36+00:00Added an answer on May 26, 2026 at 4:20 am

    You propably want your script to automatically detect links…I did that a few weeks ago on a script that pulls tweets from an RSS Feed…this is the code. You can replace $_POST[‘inputfield’] with the appropriate variable!

    if (preg_match('/www./',$_POST['inputfield'])) //checks if there's www. in the field. alternatively use http: instead of www.
    {
    $link_start_pos = strpos($_POST['inputfield'],'www.'); //returns the link-start-pos, alternatively use http: instead of www. 
    
        // find the end of the link
    if($link_end_pos = strpos($_POST['inputfield'], ' ', $link_start_pos) === false) 
        { //if theres no space after the link, it's propably on the end of the text
            $link_end_pos = strlen($_POST['inputfield']); 
        }
        // form a string with the actual link in it
    $link = substr($_POST['inputfield'],$link_start_pos,$link_end_pos);
        // and make it clickable
    $link_insert = '<a href="'.$link.'" target="_blank">'.$link.'</a>';
    }
    

    Hope that helps

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form that submits a search for blogs on my site via
i have a form that submits data to a database, i have a function
i have a PHP contact form that submits data, and an email...: <?php $dbh=mysql_connect
I have a web form that collects information and submits it to a cgi
I have a simple form in python + pylons that submits to a controller.
I have a website with an existing form, that submits an email address to
I have a checkbox that when it is clicked it submits the form to
I have a button that I would like to disable when the form submits
I would like to have a form that can submit to two different action
I have a form that displays a list of systems along with their current

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.