i really need some help with this-please save me

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
chris12295
Forum Contributor
Posts: 113
Joined: Sun Jun 09, 2002 10:28 pm
Location: USA
Contact:

i really need some help with this-please save me

Post by chris12295 »

I sent some radio values and select box options to a PHP script but they dont seem to be available as scalar variables to my script. What should i do?


Thanks Zmodem, i was thinking Perl substring, that it went ahead 2 rows, not that thats how many rows it displayed.
Last edited by chris12295 on Mon Jun 10, 2002 7:01 pm, edited 2 times in total.
Zmodem
Forum Commoner
Posts: 84
Joined: Thu Apr 18, 2002 3:59 pm

Post by Zmodem »

Hmm, close, but no cigar ;)

in the statement LIMIT x,y:

x= The offset. This is the starting row
y = The number of rows you want displayed.

Rather than do what your doing, do it this way:

0,1
1,1
2,1

See if that works
Zmodem
Forum Commoner
Posts: 84
Joined: Thu Apr 18, 2002 3:59 pm

Re: form vars u guys are awsome at this stuff!!!!

Post by Zmodem »

chris12295 wrote:I sent some radio values and select box options to a PHP script but they dont seem to be available as scalar variables to my script. What should i do?
Did you edit your original post? Wow, it's Monday and I guess I'm easily confused..heh heh

Got some code to share with us so we can lock down your select/radio probs?
chris12295
Forum Contributor
Posts: 113
Joined: Sun Jun 09, 2002 10:28 pm
Location: USA
Contact:

this is my form code

Post by chris12295 »

***FORM CODE***

<form name="form1" action="search.php" method="post">
<input type="text" name="text1">
<input type="text" name="keywords">
<input name="searchBy" type="radio" value="model">Part Model
<input name="searchBy" type="radio" value="manufacturer">Part Manufacturer
<input name="searchBy" type="radio" value="fname">Seller First name
<input name="searchBy" type="radio" value="lname">Seller Last name
<input name="searchBy" type="radio" value="email">Seller email
<input name="searchBy" type="radio" value="cat_id">Category
<input name="searchBy" type="radio" value="year">Part Year
<input type="submit" name="submit" value="Go">
</form>

In my PHP script i say: $query1="select * from user_Ads where $searchBy like '%$keywords%'";
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

this is probably about the most asked question in this forum ;)
read this
Post Reply