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

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 21
Joined: Mon May 16, 2011 8:18 am

Fri Aug 09, 2013 6:23 pm

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!


php-forum Super User
php-forum Super User
Posts: 1803
Joined: Thu Mar 10, 2011 5:07 pm

Fri Aug 09, 2013 8:41 pm

you have use a different sql for that....something like this....select * from user where firstname LIKE '%peter'. This will fetch all "Peters".

Post Reply