Advertisement
Guest User

Untitled

a guest
May 30th, 2016
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. $sql = $DB_con->prepare("INSERT INTO users (username, email, password, ip, signup, lastlogin, notescheck)
  2. VALUES(:u,:e,:p_hash,:ip,now(),now(),now())");
  3. $sql->bindparam(":u",$u);
  4. $sql->bindparam(":e",$e);
  5. $sql->bindparam(":p_hash",$p_hash);
  6. $sql->bindparam(":ip",$ip);
  7.  
  8. $sql->execute();
  9. $last_id = $DB_con->lastInsertId();
  10.  
  11. $sql=$DB_con->prepare("UPDATE users SET file =':final_file', type = ':file_type', size = ':new_size' WHERE userid = ':last_id'" );
  12.  
  13. $sql->execute();
  14. $sql->bindparam(":final_file",$final_file);
  15. $sql->bindparam(":file_type",$file_type);
  16. $sql->bindparam(":new_size",$new_size);
  17. $sql->bindparam(":last_id",$last_id);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement