PHP/Form Search Help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Agent Richard
    New Member
    • Jul 2003
    • 17
    • 3.0.1

    PHP/Form Search Help

    Hey, I'm trying to create a search box on my site.

    I have this form on one PHP file (music.php):

    HTML Code:
    <form name="search" method="post" action="artist.php?search=">
    	  <img src="images/textheaders/search_artists.gif" width="137" height="23"> 
    	  <input name="searchquery" type="text" size="7">
    	  <input type="image" src="images/textheaders/search_go.gif" name="submit" value="submit">
    	</form>
    What I want it to do is when people click the search button, they go to the

    artist.php?search=**searchquery**

    The actual search works fine, but it's this form I can't figure out.

    Thanks in advance.
  • Icheb
    Senior Member
    • Nov 2002
    • 1291

    #2
    Use method="get" and rename "searchquery" to "search".

    Comment

    • Agent Richard
      New Member
      • Jul 2003
      • 17
      • 3.0.1

      #3
      Thanks a bunch.

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...