开发者

PHP putting a connection open while filling a form

A simple form to take user details but I want that if a user is already registered and if he enters his NAME then that script should search it in database and show his details in 开发者_如何学编程the form fields before submitting the form.


If I'm understanding you correctly you want a form where the user starts typing in his username and it will display the rest of his information automatically if his username exists in the database? Well in order to retrieve information from a database on the fly while a user is typing in the information (without refreshing the page) you will have to use Ajax.

But logically why would you want a form to search a database just based on a name and display the rest of that username's information before they have logged in or submitted the form? I think you should retrieve a user's details ONLY after you have verified who they are. Not just by them typing in a name. Maybe I am misunderstanding your question though.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜