Jump to content

Search Query to URL


dboy1612

Recommended Posts

Hi everyone!

 

So, this is probably one of the most simplest things to all you pros out there, but unfortunately I think I'm using the wrong words in Google as I can't seem to remember what they're called (Yeah I'm not that brilliant.)

 

Anyway, a quick one for you guys. What I'm looking for is a simple script or method to send a Search Query to end with a URL. For example.

 

Lets say I'm on http://mysite.com/index.php, and on that page is a search box. Now, lets say I search the word "Pizza" in that search box. I want the end result to be "http://myspace.com/search.php?s=pizza"

 

I already have the script I'd like to use to read that value, I just simply don't know how to put that value there in the first.

 

Yes, I know, noobish question, I'm sorry. XD

 

Thanks in advance! :D

Link to comment
Share on other sites

It's alright. Sometimes the simplest things are the hardest to find haha. All you have to do is make your form like this:

<form action="search.php" method="get">
<input type="text" name="s">
</form>

The important part is setting method="get".

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.