How to dynamically add new user to mysql with php?


How can I add a new user to a db on the fly using php? I understand how to add accounts with the root account in terminal and through php. I’m not sure how to form a dbhandle when mysql_connect(hostname, username, password) doesn’t have a username or password to use. Should a guest account be made for this purpose? However, it seems like a bad idea to store the guest or root login info in a session variable for every user that doesn’t have an account yet. I’ve read a few forums that mention a verification step occurring after the information has been submitted and that is when the account is created. A simple page diagram (page1 -> page2) for the proper steps would be much appreciated!



لینک منبع

پاسخ دهید

نشانی ایمیل شما منتشر نخواهد شد. بخش‌های موردنیاز علامت‌گذاری شده‌اند *