
Or you could do;Couldn't edit above post
Un-tidy code I know.. but something along them linesPHP 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'];
}
?>
Wooohoo, I made something that works.
<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.
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.
Want to hide these adverts? Register an account for free!