i am trying to play around with the script and i wanted to make more than 1 query...
is like i wanna try something like this...
top here is the code for register...of course from the code above shows that the registered details will be insert in to users table...now i wan to insert more than 1 table...which mean in the same time i wanna insert those details in users table and another test table which i have duplicate out...i keep trying to create a new $z and not having any result...wat i doin here is that...i wanna make a big register form which has alot of fields...and some of the fields i wanted it to store userid in another table...
is like i wanna try something like this...
- Code:
function addNewUser($username, $password, $email){
$time = time();
/* If admin sign up, give admin user level */
if(strcasecmp($username, ADMIN_NAME) == 0){
$ulevel = ADMIN_LEVEL;
}else{
$ulevel = USER_LEVEL;
}
$q = "INSERT INTO ".TBL_USERS." VALUES ('$username', '$password', '0', $ulevel, '$email', $time)";
return mysql_query($q, $this->connection);
}
top here is the code for register...of course from the code above shows that the registered details will be insert in to users table...now i wan to insert more than 1 table...which mean in the same time i wanna insert those details in users table and another test table which i have duplicate out...i keep trying to create a new $z and not having any result...wat i doin here is that...i wanna make a big register form which has alot of fields...and some of the fields i wanted it to store userid in another table...