I'm trying to write a script that will send a user to there profile after they register for site iv got a filling that there a problem with the mysqli_query syntax I keep getting error PHP Parse error: syntax error, unexpected '{' Can someone maybe help me with this
<?php
// set database connection
require("dbconfig.php");
// lets get our posts //
$email = $_POST['email'];
$pass = $_POST['password'];
$bn = $_POST['bandname'];
$state = $_POST['state'];
$genre = $_POST['genre'];
$description = $_POST['description'];
$image = $_FILES['image'];
/// valid image types ///
$image_type = array("image/jpg","image/jpeg","image/bmp","image/gif","image/png");
/// folder that will hold the image
$imagepath = "images/";
$imagepath .= $image["name"];
// move the file from the tmp folder to the image folder
if (move_uploaded_file($image['tmp_name'], $imagepath)){
$foo = `mogrify -quality 92 -scale 500x $imagepath`;
}
// insert data into mysql
if (!mysqli_query($ms,"insert into dbusers (email, password, bandname, state, genre, description ,image)
values ('$email','$pass','$bn ','$state','$genre','$description','".$image['name'] . "')" ){
}else {
$id=mysqli_insert_id($sql);// Get the associated ID number
// Set up a login session
session_start();
$_SESSION ['id' ] = $id;
$_SESSION ['bandname' ] = $bandname;
$_SESSION ['password' ] = $password;
header("Location:ympprofile.php?listid=$id");
}
?>