> tedd wrote:
>> At 10:11 AM -0400 4/23/09, PJ wrote:
>>> tedd wrote:
>>> > 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.
>>> Thanks Tedd,
>>> 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. ;-)
>> still works. This is just an example of enhancement with graceful
>> degradation. It has nothing to do with the demo other than that.
>> The point of my showing you the demo was to simply suggest that you
>> forgo the checkboxes and go straight to the "Search" entry. After all,
>> that tells you everything you want to know about what the user wants
>> to do, right?
>> Why have the user click a checkbox showing that they want to search
>> for a book title and then also have then enter in the book title? Why
>> not just have them enter the book title and be done with it?
>> It might serve you well to rethink what you are wanting to do.
> Oh, Ok. Will check it out then. :-) At worst, I'll set it up and see
> how it plays.... ooooooh, well... another lesson to learn... ;-)
Hmmmm.... I've looked at your demo and, frankly, don't see it working.
When I enter names and click on one of the search buttons, I don't get
sane results. For instance, entering Johnson in last name and John in
first name, I click on search first name and I get an entry from page R
for first name John and Last name Raab. Doesn't make sense.
Anyway, I have my setup working using $_POST which gives me an array of
the inputs plus the submit string all in a one-dimensional array. Great.
Now I'm playing with how to set things up to eliminate extraneous inputs
which will be made, will, will not. So, filtering becomes rather
important and complicated.
I thought switch would work, but it doesn't look promising.
I can clear the 'submit' string by declaring $_POST['submit'] = ""; at
top of page; which seems strange??
But I can't figure out how to eliminate or avoid extraneous inputs. In
If I have input in the Search Title field and input in any one or all of
the other search options, clicking on Search Title the returned array
includes all options I'm not sure how to filter that. :-\
Is there some way to set the other inputs to null when choosing the
search? Without js?
unheralded genius: "A clean desk is the sign of a dull mind. "
Phil Jourdan --- p...@ptahhotep.com
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php