Jump to content

Whats wrong with this code?


boyyo

Recommended Posts

Whats wrong with this code ?

<?php
  $dbc = mysqli_connect('localhost', 'boyyo_boyyo', 'KiaNNa11', 'boyyo_aliendatabase')
   or die('Error connecting to MySQL server.');
   
$first_name = $_POST['firstname'];
$last_name = $_POST['lastname'];
$email = $_POST['email'];

$query = "INSERT INTO email_list (first_name, last_name, email) " .
"VALUES ('$first_name', '$last)name', '$email')";

mysqli_query($dbc, $query )
or die('Error querying database.');

echo 'Customer added. ' ;

mysqli_close($dbc);

?>

 

I have no idea whats wrong with this code?

Link to comment
https://forums.phpfreaks.com/topic/235134-whats-wrong-with-this-code/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.