Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14
  1. #11
    Join Date
    Dec 2006
    Posts
    3,970
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Independent View Post
    Couldn't edit above post

    PHP Code:
    <?php
    session_start
    ();

    if(!
    $_GET ['page'] == "search") { 
    echo(
    "<form method=\"post\" action=\"roflcopter.php?page=search\">
    <input name=\"whatisit\">
    <input type=\"submit\" value=\"Search!\">
    </form><br /><br />\"IM FEELING LUCKY\""
    );
    }
    if(
    $_GET ['page'] == "search") {

    $go $_POST['whatisit'];

    $_SESSION['search'] = $go;

    echo 
    $_SESSION['search'];
    }
    ?>
    Un-tidy code I know.. but something along them lines
    Wooohoo, I made something that works.
    Or you could do;

    <form action="hi.php" method="get">
    <input type="hidden" value="search" name="page">
    <input type="text" name="search">
    <input type="submit" value="Search">
    </form>
    Lets set the stage on fire, and hollywood will be jealous.

  2. #12
    Join Date
    Dec 2007
    Posts
    1,683
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Tom743 View Post
    Or you could do;

    <form action="hi.php" method="get">
    <input type="hidden" value="search" name="page">
    <input type="text" name="search">
    <input type="submit" value="Search">
    </form>
    or is a bore.

    My code fully works, so if you wanna save time use mine :8

  3. #13
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    Thats not really saving time, thats taking up more code space when you could just easily use a hidden field.. I would rather have one line of HTML code then 65654654651 useless lines of PHP clogging up my workspace.

  4. #14
    Join Date
    Dec 2007
    Posts
    1,683
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Dentafrice View Post
    Thats not really saving time, thats taking up more code space when you could just easily use a hidden field.. I would rather have one line of HTML code then 65654654651 useless lines of PHP clogging up my workspace.
    Fair enough

Page 2 of 2 FirstFirst 12

Posting Permissions

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