Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 02-08-2010, 04:09 AM Page with parameters
Isabella_Smith's Avatar
Ultra Talker

Posts: 285
Trades: 0
Hi,

At my website I want to search based on 2 parameters........and I've tried to call it like this...................can you please check if this is correct as....this is not working........

Posting data from index.

HTML Code:
 <form action="srch/searchkey.php?id="$_POST['get_searchword']"&title="$_POST['city_search']"" method="POST" name="frm" id="frm">
and Getting data on my search page like this:

PHP Code:
"select * from bcc join tblcity c on bcc.city_id = c.city_id join tblbusinessinfo b on bcc.business_id = b.biz_id join                             tblcat t on bcc.category_id = t.category_id where t.category =".$_GET['title']." and c.city = ".$_GET['id'].""
But this is not working...............Can you please get me on this as why its not working.....??

If you need more info please let me know....

Thanks for your help in advance!!!
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE



Please login or register to view this content. Registration is FREE
buy all indian salwar Kameez, Sarees and clothes

Last edited by Isabella_Smith; 02-08-2010 at 04:13 AM..
Isabella_Smith is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-08-2010, 04:54 AM Re: Page with parameters
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
The form action attribute is completely incorrect (unless you are passing on parameters from another form.

The form method is "post" you then use "get" in the receiving script.

Other than that, what does the rest of the form look like?

read -> http://www.tizag.com/phpT/examples/formvar.php as well.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-08-2010, 07:18 AM Re: Page with parameters
Isabella_Smith's Avatar
Ultra Talker

Posts: 285
Trades: 0
I am using Get in receiving script...............here:

"select * from bcc join tblcity c on bcc.city_id = c.city_id join tblbusinessinfo b on bcc.business_id = b.biz_id join tblcat t on bcc.category_id = t.category_id where t.category =".$_GET['title']." and c.city = ".$_GET['id']."";
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE



Please login or register to view this content. Registration is FREE
buy all indian salwar Kameez, Sarees and clothes
Isabella_Smith is offline
Reply With Quote
View Public Profile
 
Old 02-08-2010, 07:38 AM Re: Page with parameters
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Yes you do, BUT when a form is used with method="post" it needs to be a $_POST['keyname'].

$_GET['keyname'] is for GETting variables from the URL (querystring)
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Page with parameters
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.14026 seconds with 12 queries