I am trying to insert some data into one table and after that is successful I want one field from my other table to get updated. my code is as follows:
<?php
$room = $_REQUEST['room'];
$date = $_REQUEST['date'];
$time = $_REQUEST['time'];
$id = $_GET['meeting_id'];
$con = mysql_connect("******","****","****");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db('mdb_hj942', $con);
$sql="INSERT INTO Rooms (room, date, time, meeting_id) VALUES ('$room','$date', '$time','$id')";
$sql2="UPDATE Meetings SET action = 'success'";
if (!mysql_query($sql,$con,$sql2))
{
die('Error: ' . mysql_error());
}
else
{
echo '<h2>Room & Time Has Now Been Updated</h2>';
}
?>
is this possbile? if so, what changes do i make as i am getting the following error message:
'Warning: Wrong parameter count for mysql_query() in E:\webareas\hj942\conference\Secretary\bookedsuccessfully.php on line 80
Error: '
1 Answer