Need Help With Simple Submit Link Script

Discussion in 'PHP' started by seattle-west, Dec 22, 2007.

  1. #1
    heres the form
    heres the php
    one problem is im having trouble trying to figure out how to link the php code on the page. And the other problem im having is trying to make the website stay on the page when its posted. Thanks :)
     
    seattle-west, Dec 22, 2007 IP
  2. kmap

    kmap Well-Known Member

    Messages:
    2,215
    Likes Received:
    29
    Best Answers:
    2
    Trophy Points:
    135
    #2
    hi

    <?php

    echo "<a href=".$_POST["user"]."> ".$_POST["user"]."</a>";

    ?>
     
    kmap, Dec 22, 2007 IP
  3. kmap

    kmap Well-Known Member

    Messages:
    2,215
    Likes Received:
    29
    Best Answers:
    2
    Trophy Points:
    135
    #3
    in submit link

    <?

    if isset($_POST["user"])
    {

    echo "<a href=".$_POST["user"]."> ".$_POST["user"]."</a>";

    }

    ?>
    <form action="" method="POST">
    <p><strong>URL:</strong><br />
    <input type="text" name="user" /></p>
    <p><input type="submit" vale="send" /></p>
    </form>
     
    kmap, Dec 22, 2007 IP
  4. kmap

    kmap Well-Known Member

    Messages:
    2,215
    Likes Received:
    29
    Best Answers:
    2
    Trophy Points:
    135
    #4
    hi

    please use db to put the links

    and retreive all when some one submit them

    Regards

    Alex
     
    kmap, Dec 22, 2007 IP