how to add the query in your search-box

  • luchtzak
  • Student
  • Student
  • luchtzak
  • Posts: 74

Post 3+ Months Ago

Hello,

if you have a simple search-box like this:

http://www.luchtzak.be/gate.html?name=Search

and I know that the query can be placed behind that url like this:

http://www.luchtzak.be/gate.html?name=Search&query=ozzu

How do I add the query then in a search-box like this ?

Code: [ Select ]
<form action=\"modules.php?name=Search\" method=\"post\">"
    ."<font class=\"content\"><b>Search on this website:&&</b>"
    ."<input type=\"text\" name=\"query\" size=\"30\">"
    ."</font></form></center></td></tr></table>\n"
  ."\n"
  ."\n";
  1. <form action=\"modules.php?name=Search\" method=\"post\">"
  2.     ."<font class=\"content\"><b>Search on this website:&&</b>"
  3.     ."<input type=\"text\" name=\"query\" size=\"30\">"
  4.     ."</font></form></center></td></tr></table>\n"
  5.   ."\n"
  6.   ."\n";


So I don't end up with this url: http://www.luchtzak.be/gate.html?name=Search but with this url: http://www.luchtzak.be/gate.html?name=Search&query=xxxx

All help welcome!

greetings,

Bart
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Voetsjoeba
  • Novice
  • Novice
  • User avatar
  • Posts: 31
  • Loc: Belgium, Ghent.

Post 3+ Months Ago

I believe you can use the GET method for that. Like this:

Code: [ Select ]
<form action="modules.php?name=Search" method="GET">


You'd have to change any PHP code too, from $_POST['variable'] to $_GET['variable'], obviously because you're not using POST anymore :)

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: michellejerson and 52 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.