Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Setting up search "area"

  1. #11
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Ah yes, fixed now. My fast typing and multitasking got the best of me. Thanks.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  2. #12
    Join Date
    Jun 2006
    Location
    Acton Ontario Canada.
    Posts
    677
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    $var++; works, and i think that a negligable proformance boost would be attained, as only one operation has to be carried out, and the variable doesnt have to be reassigned.
    - Ryan "Boxxertrumps" Trumpa
    Come back once it validates: HTML, CSS, JS.

  3. #13
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Probably, though how PHP actually does the operation is not clear, so it might be doing the exact same amount of work.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  4. #14
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Use a direct variable if you want to. Link directly to the file searched:
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Search</title>
    </head>
    <body>
    <form method="get">
    	Search Term:
    	<input type="text" name="term">
    	<br><input type="submit" value="Enter">
    </form>
    <br>Results:
    <br><?php
    $t = $_GET["term"];
    $ext = ".php";
    if ($t != "") {
    	echo "<a href=\"$t$ext\" target=\"_blank\">$t$ext</a>\n<br>";
    	}
    ?>
    </body>
    </html>
    - Mike

Bookmarks

Posting Permissions

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