I couldn't update from my .php page to MySQL database. Here's my code:
$query = "UPDATE activities SET actID = '$dateID', ljDate = '$mysqlDate', What = '$txtWhat', ljTime = '$txtTime', Location = '$txtLocation', Who = '$txtWho' WHERE actID == $dateID";
$result = mysql_query($query);
if(!$result) {
echo "Error: Can not update the database. Please try again later.";
exit;
}
actID is varchar
ljDate is Date
What is varchar
ljTime is Time
Location is varchar
Who is varchar
The $mysqlDate variable is in YYYY-MM-DD and $txtTime is in HH:MM:SS so please help if anyone have any idea.
Many thanks in advance!
ljCharlie
$query = "UPDATE activities SET actID = '$dateID', ljDate = '$mysqlDate', What = '$txtWhat', ljTime = '$txtTime', Location = '$txtLocation', Who = '$txtWho' WHERE actID == $dateID";
$result = mysql_query($query);
if(!$result) {
echo "Error: Can not update the database. Please try again later.";
exit;
}
actID is varchar
ljDate is Date
What is varchar
ljTime is Time
Location is varchar
Who is varchar
The $mysqlDate variable is in YYYY-MM-DD and $txtTime is in HH:MM:SS so please help if anyone have any idea.
Many thanks in advance!
ljCharlie