i am having problem in inserting data into my database,because says to me that query is not executed. the codes are shown below

<?php
//include("connection.php");
//print_r($_POST);
 
$firstname = $_POST['txtfirstname'];
$lastname = $_POST['txtlastname'];
$email = $_POST['txtaddress'];
$date = $_POST['txtdate'];
$user="killer";
$host="localhost";
$password="killer08";
$database="register";
//creating connection 
$Con = mysql_connect($host,$user,$password)
		or die("couldn't connect to server");
//connecting to database.	
$db = mysql_select_db($database,$Con)or die("no database found");
$query = "INSERT INTO tblregister set (firstname,lastname,emailaddress,date) values ($firstname,$lastname,$email,$date)";
$result = mysql_query($query)
	or die('query failed');
?>
Member Avatar for amigura

delete set from insert

$query = "INSERT INTO tblregister set (firstname,lastname,emailaddress,date) values ($firstname,$lastname,$email,$date)";
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.