Page 1 of 1

Example from W3 Schools php and Ajax - should be simple!

Posted: Fri Aug 09, 2013 6:23 pm
by lister
Hi - I can't figure this out...(im still new to php and ajax...)

Anyway - this demo is exactly what I am trying to achieve - but - the demo is to find ONE user - I want to find and display several users with a similar ID...

So in the example you can search for Peter Griffin and it shows just him, whereas Id like to search for 'Peter' and for ALL the 'Peters' to be displayed...

Im sure this is simple but I can't figure it out. I thought it would be the option - value parameter but alas, it's not...

Any help greatly appreciated!

http://www.w3schools.com/php/php_ajax_database.asp

Re: Example from W3 Schools php and Ajax - should be simple!

Posted: Fri Aug 09, 2013 8:41 pm
by johnj
you have use a different sql for that....something like this....select * from user where firstname LIKE '%peter'. This will fetch all "Peters".