Skip to main content
Inspiring
August 2, 2007
Question

Passing form variables to php does not work

  • August 2, 2007
  • 3 replies
  • 657 views
Hi im trying to pass form data via GET and displaying the result on a second page called search.php but the query does not work at all
I am trying to get multiple form elements to pass data through e.g City, maxPrice, PropType
These values must match those in my Database and display results
any ideas?
This topic has been closed for replies.

3 replies

Inspiring
August 3, 2007
The_FedEx_Guy wrote:
> I kept modding the code to see if it would work, I am a real basic user of PHP
> and the ebook I was using was telling me to use "LIKE"

As Micha pointed out, you use LIKE only when you're using wildcard
characters in the search. % matches anything or nothing, and _ (an
underscore) matches exactly one character.

LIKE '%don' matches Don, London, Hillingdon, but not Adonis.
LIKE '%don%' matches Don, London, Hillingdon, and Adonis.
= 'don' matches don (case-insensitive), and nothing else.

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Inspiring
August 3, 2007
Hi David,
Thank you for your help and thank you everyone else too.

I kept modding the code to see if it would work, I am a real basic user of PHP and the ebook I was using was telling me to use "LIKE"

I get the gist of this now and feel confident in creating this kind of function again.
Inspiring
August 2, 2007
The_FedEx_Guy wrote:
> any ideas?

Yes. How about posting some of the code that doesn't work?

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Inspiring
August 2, 2007
Please see attached code