guy's i need your help. im trying to make an insert form with php with this condition.
"id cant be same in same date"
my database name is : "ssl",
table name is : "try"
with table col: "id", "date", "name", "city"
im have try a lot to make this but still get some eror. but when i delete the php script for checking it can running well..
please help me. im really apreciated when you give me an example of that.
sorry for my english and sorry im still newbie and need study more for something like this
this my script for insert
<?php
/* Attempt MySQL server connection. Assuming you are running MySQL
server with default setting (user 'root' with no password) */
$link = mysqli_connect("localhost", "root", "", "silo");
// Check connection
if($link === false){
die("ERROR: Could not connect. " . mysqli_connect_error());
}
// Attempt insert query execution
$sql="Insert into termocouple
Select * from temp1";
if(mysqli_query($link, $sql)){
echo "Data inserted successfully.";
} else{
echo "Data inserted Failed " . mysqli_error($link);
}
// Close connection
mysqli_close($link);
?>