CarNumber int(1) No 0
WhereFrom varchar(225) No
WhereTo varchar(225) No
Name varchar(225) No
Date date No 0000-00-00
Cost varchar(225) No
Time time No 00:00:00
JobNumber int(11) No 0
Finished int(1) No 1
i need to be able to delete a user via a button that is echoed
if you could help this would be great
or a button that will make Finished = 0
also
$query = "SELECT * FROM Bookings WHERE Date=CURDATE() AND primary_key != '1'";
would this work
this is the code i have
$link = mysql_connect("localhost",
NAME,PASS)
;
@mysql_select_db(easytwof_
filers) or die( "Unable to select database" . mysql_error());
$query = "SELECT * FROM Bookings WHERE Date=CURDATE() AND primary_key != '1'";
$result=mysql_query($query
) or die("SQL Error: " .mysql_error());
echo ' <table width="100%" border="1" align="center" bgcolor="#33CCFF">';
while($row = mysql_fetch_array($result)
)
{
$CarNumber = $row["CarNumber"];
$WhereFrom= $row["WhereFrom"];
$WhereTo= $row["WhereTo"];
$Name= $row["Name"];
$Date= $row["Date"];
$Cost= $row["Cost"];
$Time= $row["Time"];
echo ' <table width="90%" border="1">';
echo ' <tr>';
echo ' <th scope="col"><table width="100%" border="1">';
echo ' <tr>';
echo ' <th scope="col">';
echo ' Car Number';
echo ' </th>';
echo ' <th scope="col">';
echo ' Where From';
echo ' </th>';
echo ' <th scope="col">';
echo ' Where To';
echo ' </th>';
echo ' <th scope="col">';
echo ' Name';
echo ' </th>';
echo ' <th scope="col">';
echo ' Date';
echo ' </th>';
echo ' <th scope="col">';
echo ' Price';
echo ' </th>';
echo ' <th scope="col">';
echo ' Time';
echo ' </th>';
echo ' </tr>';
echo ' <tr>';
echo ' <td bgcolor="#FF0000"><div align="center" width="100%" border="1"><strong>';
echo $CarNumber;
echo ' </strong></div></td>';
echo ' <td bgcolor="#FF0000"><div align="center"><strong>';
echo $WhereFrom;
echo' </strong></div></td>';
echo ' <td bgcolor="#FF0000"><div align="center"><strong>';
echo $WhereTo;
echo ' </strong></div></td>';
echo ' <td bgcolor="#FF0000"><div align="center"><strong>';
echo $Name;
echo' </strong></div></td>';
echo ' <td bgcolor="#FF0000"><div align="center"><strong>';
echo $Date;
echo ' </strong></div></td>';
echo ' <td bgcolor="#FF0000"><div align="center"><strong>';
echo $Cost;
echo ' </strong></div></td>';
echo ' <td bgcolor="#FF0000"><div align="center"><strong>';
echo $Time;
echo ' <td><div align="center"><strong>';
echo ' </tr>';
echo ' </table></th>';
echo ' </tr>';
echo ' <hr size="5" noshade> ';
++$i;
}
echo ' </table';
echo ' <br> ';
?>
</div>
</div>
</html>
Start Free Trial