Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Dec 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question URL from form to appear as hyperlink

    Hi,

    I am creating a form on my index.html, and in one of the fields it is possible to insert URLs. When submitting, I want this URL to appear as a hyperlink on the next page (PHP.php).

    Here is what I have now:

    <?php

    echo "Your link: ";
    echo $_POST['insertyourlink'];
    echo "<br />";

    The URL appears, but not as a hyperlink. What can I do to change that?

    Thanks a lot!

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,623
    Thanks
    6
    Thanked 1,001 Times in 974 Posts
    PHP Code:
    echo '<a href="'.$_POST['insertyourlink'].'">'.$_POST['insertyourlink'].'</a>'


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •