Re: checkboxes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tedd wrote:
> At 5:33 PM -0400 4/22/09, PJ wrote:
>> Well, I'm making a page to do limited searching of the database. To keep
>> it simple I just want to search by title, author,  ISBN or copyright
>> date. So, I need to input the user's choice, limit it to one of the
>> options and pass the supplied parameter to the query. I prefer to not
>> use Javascript. No need to disable stuff as that was merely a
>> misdirected thought. I think Ashley's suggestion should work. My problem
>> has been to understand the workings of the form inputs. Now, I'm just
>> anticipating some acrobatic feats to be able to pass the author
>> parameters to the query as they are comprised of two fields (first_name
>> and last_name). But, I think that that can be done, at worst, by doing a
>> different query just for the author.
>> TIA.
>> Phil
>
>
> Phil:
>
> The user has to enter something in to do a search right? So why not
> use what they enter as the type of search they what?
>
> Like so:
>
> http://php1.net/a/edit-db-demo/
>
> Here a user can search for a Last name, first name, or email. Note,
> there's no checkboxes because the user indicates what they are
> searching for by where they place their search criteria.
>
> HTH's
>
> tedd
Thanks Tedd,
Your demod uses javascript and I don't really want to use javascript.
Apparently it is more open to hacking than just plain PHP/MySQL.  ??
Also, I seem to have things going fairly well - it's a neat way to learn
coding, especially when adjusting for things you hadn't planned in
advance, like if the user forgets to enter data or doesn't click on the
radio button. And then implementing the warnings and reloading (or not
reloading the page) to keep the data entered upon omission or
unacceptable entries. Get's hairy sometimes, but it's quite
enlightening. ;-)

-- 
unheralded genius: "A clean desk is the sign of a dull mind. "
-------------------------------------------------------------
Phil Jourdan --- pj@xxxxxxxxxxxxx
   http://www.ptahhotep.com
   http://www.chiccantine.com/andypantry.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux