MySQL insert into table - syntax problems

خرید بک لینک

$serveame = 'edited'; $useame = 'edited'; $password = 'edited'; $dbname = 'edited';

$name = $_POST ['name']; $email = $_POST ['email']; $number = $_POST ['number']; $manufacturer = $_POST ['manufacturer']; $birth = $_POST ['birth'];

// Create connection $conn = new mysqli($serveame, $useame, $password, $dbname);

// Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } echo "Connected successfully";

$sql = mysql_query("INSERT INTO hgcasestudy (name, email, number, phonename, birthday) VALUES ($name, $email, $number, $manufacturer, $birth)"); if (!$sql) { die('Invalid query: ' . mysql_error()); }

$conn->close();

I keep getting the error message: Connected successfullyInvalid query: Access denied for user 'edited'@'localhost' (using password: NO)

I'm confused because $serveame is not set to local? I think it's just out of syntax with other parts of the page. Any ideas? Many thanks.

Recent Questions...

ما را در سایت Recent Questions دنبال می‌کنید

برچسب: نویسنده: استخدام کار بازدید: 297 تاريخ: چهارشنبه 16 تير 1395 ساعت: 17:51

صفحه بندی