Re: Let me google that for you.

From: Date: Tue, 21 Apr 2009 16:29:05 +0000
Subject: Re: Let me google that for you.
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.general 
Request: Send a blank email to php-general+get-291759@lists.php.net to get a copy of this message
Thanks so much for your reply and your help. I had recieved the same advice and solution from stuart just this morning. So thank you very much to both! Gary "haliphax" <haliphax@gmail.com> wrote in message news:952625160904210725j5aa0d50bvbc258d110335774a@mail.gmail.com... > On Fri, Apr 17, 2009 at 1:01 PM, 9el <lenin@phpxperts.net> wrote: >> If you play with jQuery its easy. >> >> And if you talk about JavaScript's urlencode functionality you wont ask >> about 'how to remove the + sign' >> >> I'm not very good yet on jQuery or else I would have shown you the codes. > > jQuery doesn't make this much easier than vanilla Javascript in this > case. I don't see why JS is necessary at all, in fact. > > search.html > === > <html> > <head><title>Search</title></head> > <body> > <form action="http://lmgtfy.com" > method="get"> > <input type="text" name="q" /> > <input type="submit" value="Search" /> > </form> > </body> > </html> > > > No URLEncoding necessary, no JS, no PHP... just HTML. Were you to pass > pre-conceived search strings to it, it's as easy as this: > > index.php > === > <?php > $s = 'search for this'; > header('Location: http://lmgtfy.com?q=' . > urlencode($s)); > ?> > > > And you're done! > > HTH, > > -- > // Todd

« previous php.general (#291759) next »