saurabhdutta Posted March 3, 2007 Share Posted March 3, 2007 Hi.. I am really new to PHP/MySQL. Could any one of you help me with registering 100 users with their email addresses, passwords and phone numbers from a single admin page. and then the mailer should sent out mails to each of these users notifying them about the account creation. Thanks! Link to comment https://forums.phpfreaks.com/topic/40977-mass-user-registration-by-admin/ Share on other sites More sharing options...
MadTechie Posted March 3, 2007 Share Posted March 3, 2007 Depends on the system your using (i assumes its not your own creation) Link to comment https://forums.phpfreaks.com/topic/40977-mass-user-registration-by-admin/#findComment-198493 Share on other sites More sharing options...
chronister Posted March 3, 2007 Share Posted March 3, 2007 I would start by getting all data into an array so you can loop through and do what you want. i.e. $data['email'][]= $data['password'][]= $data['phone'][]= Person 1's data is $data['email'][0] $data['password'][0] $data['phone'][0] Person 2 would be $data['email'][1] $data['password'][1] $data['phone'][1] This will allow you to address each one inside a while loop. <?php $x=0; while( $x < $total_results ){ $email = $data['email'][$x]; $password = $data['password'][$x]; $phone = $data['phone'][$x]; $query="INSERT INTO users (email,password,phone) values ($email, $password, $phone)"; $result=mysql_query($query); // mail code here //mail code here //mail code here //mail code here $x++; } ?> Rough draft and crude, but its a start. Hope it helps Link to comment https://forums.phpfreaks.com/topic/40977-mass-user-registration-by-admin/#findComment-198620 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.