1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Very quick an easy PHP help needed

Discussion in 'Hire a Freelancer' started by Hunwarrior, Aug 14, 2012.

  1. Hunwarrior

    Hunwarrior Jr. VIP Jr. VIP Premium Member

    Joined:
    May 12, 2010
    Messages:
    1,027
    Likes Received:
    859
    HI,
    I need a script like:

    it has a tex box with enter button

    after the text box is filled with Text, and enter button is hit, the script will show : www.whatever.com/inputBoxText

    --------

    I guess it is an easy echo type thing, so $10 is enough for it.

    Payment on PP, and pls PM me your skype name to contact u.

    PS: i wil back in 1 hr from city and check PMs
     
  2. Hunwarrior

    Hunwarrior Jr. VIP Jr. VIP Premium Member

    Joined:
    May 12, 2010
    Messages:
    1,027
    Likes Received:
    859
    still loookinggg.....
     
  3. monstertech6

    monstertech6 BANNED BANNED

    Joined:
    Apr 13, 2011
    Messages:
    1,057
    Likes Received:
    33
    link is not working.
     
  4. Autumn

    Autumn Elite Member

    Joined:
    Nov 18, 2010
    Messages:
    2,197
    Likes Received:
    3,041
    Occupation:
    I figure out ways to make money online and then au
    Location:
    Spamville
    Is this what you're looking for? It's a bit unclear from your description quite what you're looking for. This just appends the contents of the textarea to the end of the $root_url that you define. Spaces and some punctuation are stripped out, you could play with the regex if you wanted to do more / less.

    PHP:
    <?php

    $root_url 
    'http://www.domain.com/';

    $form "<form method=\"post\" action=\"{$_SERVER['PHP_SELF']}\">
    <input type=\"hidden\" name=\"posted\" value=\"yes\">
    <textarea rows=\"5\" cols=\"60\" name=\"my_text\"></textarea>
    <input type=\"submit\" value=\"Submit\">
    </form>
    "
    ;

    if(
    $_POST['posted'] == 'yes') {
        
    $my_text trim($_POST['my_text']);

        
    $my_text preg_replace('/ |\'|"|!|,|\?/'''$my_text);

        
    $link $root_url.$my_text;

    }

    $html "<html>
    <head>
    <title>Basic Form</title>
    </head>
    <body>
    $link
    <hr>
    $form
    </body>
    </html>
    "
    ;


    echo 
    $html;



    ?>

     
  5. lykathe

    lykathe Regular Member

    Joined:
    Oct 23, 2009
    Messages:
    430
    Likes Received:
    109
    Gender:
    Male
    Occupation:
    full time PHP/JS/Python freelance
    Location:
    Detroit
    Lol I gotcha dude. skype adamjmagyar if I'm on.