how to create multiple users with the table php?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
cc_cam
Forum Newbie
Posts: 1
Joined: Fri Aug 07, 2009 8:38 pm

how to create multiple users with the table php?

Post by cc_cam »

(newbie)
i want to create several users like administrator and moderator at start at the createphptable.php..
tried this but dont work. how to setup to add 2nd values to the insert table?

/
if (mysql_query($createAdminTable)){
$sql = mysql_query("INSERT INTO myAdmin (username, password, last_log_date, account_type)
VALUES('administrator','passwordA', now(),'a')") or die (mysql_error());
$sql = mysql_query("INSERT INTO myAdmin (username, password, last_log_date, account_type)
VALUES('moderator','passwordB', now(),'a')") or die (mysql_error());
Last edited by cc_cam on Sat Aug 08, 2009 5:11 am, edited 1 time in total.
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: how to create multiple users with the table php?

Post by aceconcepts »

First of all your post is quite blunt and not very informative.

Secondly, I don't think many people here are simply going to do your work for you.

Be more tactful about your approach and seem as if you're willing to make an effort.

Just trying to help :D
Post Reply