Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Using named parameters */
- //Initial Profile Image until default name is inserted
- $profileimg = "1.jpg";
- //Default text for bio
- $bio = 'Enter something about yourself.';
- $sql = "INSERT INTO users (firstname,lastname,username,gender,email,password,profile_img,bio) VALUES (:fname,:lname,:username,:gender,:email,:password,:profileimg,:bio)";
- $stmt = $pdo->prepare($sql);
- $stmt->bindParam(':fname',$fname);
- $stmt->bindParam(':lname',$lname);
- $stmt->bindParam(':username',$uname);
- $stmt->bindParam(':gender',$gender);
- $stmt->bindParam(':email',$email);
- $stmt->bindParam(':password',$hash);
- $stmt->bindParam(':profileimg',$profileimg);
- $stmt->bindParam(':bio',$bio);
- $stmt->execute();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement