mysqli insert into database

Posted by Simon on Stack Overflow See other posts from Stack Overflow or by Simon
Published on 2010-05-19T16:28:50Z Indexed on 2010/05/19 16:30 UTC
Read the original article Hit count: 191

Filed under:
|
|
|

Hello all i have this script and i will not insert into the database and i get no errors :S, do you know what it is?

    function createUser($username, $password) {
    $mysql = connect();
    if($stmt = $mysql->prepare('INSERT INTO users (username, password, alder, hood, fornavn, efternavn, city, ip, level, email) VALUES (?,?,?,?,?,?,?,?,?,?)'))  {
      $stmt->bind_param('ssssssssss',$username,$password, $alder, $hood, $fornavn, $efternavn, $city, $ip, $level, $email);
      $stmt->execute();
      $stmt->close();
    } else {
      echo 'error: ' . $mysql->error;
    }

© Stack Overflow or respective owner

Related posts about mysqli

Related posts about insert