tolearn Posted October 10, 2007 Share Posted October 10, 2007 Hi, I have a textbox. When i type a letter in the textbox it has to display all the names starting with the same letter from database.Is that possible using PHP? Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/72569-solved-how-to-get-all-names-frm-database-starting-with-same-letter-typed-in-a-textbox/ Share on other sites More sharing options...
roopurt18 Posted October 10, 2007 Share Posted October 10, 2007 You need to use Javascript to update the page as you type. It is possible to create every possible permutation of your data and feed it to the Javascript upon the initial page load. However, it is extremely inefficient to do so. Almost every site that has auto-suggestion type features uses XHR in Javascript. Quote Link to comment https://forums.phpfreaks.com/topic/72569-solved-how-to-get-all-names-frm-database-starting-with-same-letter-typed-in-a-textbox/#findComment-365950 Share on other sites More sharing options...
tolearn Posted October 10, 2007 Author Share Posted October 10, 2007 Thank you. Can i have somne example code for this? How much it is ggod to work out this with AJAX Quote Link to comment https://forums.phpfreaks.com/topic/72569-solved-how-to-get-all-names-frm-database-starting-with-same-letter-typed-in-a-textbox/#findComment-365955 Share on other sites More sharing options...
anujgarg Posted October 10, 2007 Share Posted October 10, 2007 to do this, you have to apply AJAX....take some help from dhtmlgoodies.com Quote Link to comment https://forums.phpfreaks.com/topic/72569-solved-how-to-get-all-names-frm-database-starting-with-same-letter-typed-in-a-textbox/#findComment-365959 Share on other sites More sharing options...
Barand Posted October 10, 2007 Share Posted October 10, 2007 There's an example of this in the AJAX link in my sig Quote Link to comment https://forums.phpfreaks.com/topic/72569-solved-how-to-get-all-names-frm-database-starting-with-same-letter-typed-in-a-textbox/#findComment-366029 Share on other sites More sharing options...
tolearn Posted October 11, 2007 Author Share Posted October 11, 2007 Hi thanks to all Quote Link to comment https://forums.phpfreaks.com/topic/72569-solved-how-to-get-all-names-frm-database-starting-with-same-letter-typed-in-a-textbox/#findComment-366797 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.