I have to delete data from the database. here is the sample code.
but i get this error Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in Z:\Program Files\EasyPHP-5.3.3\www\webfi les\delete.php on line 44
Code:
<html>
<head>
<title>
Edit and delete fixtures
</title>
</head>
<body>
<?php
$fixture_id = '';
$update = '';
$delete = '';
$opponents = '';
$date = '';
$venue = '';
$db_handle = '';
$submit = '';
if (isset($_POST['submit1'])) {
$fixture_id = $_GET['fixture_id'];
$update = $_POST['submit'];
$opponents = $_POST['opponents'];
$date = $_POST['date'];
$venue = $_POST['venue'];
$submit = $_POST['submit'];
$opponents = ucwords($opponents);
$date = ucwords($date);
$venue = ucwords($venue);
$user_name = "root";
$password = "";
$database = "zebrascricketclub";
$server = "127.0.0.1";
$db_handle = mysql_connect($server, $user_name, $password);
$db_found = mysql_select_db($database, $db_handle);
if($db_found) {
//If update is yes, the form with fixtures data will be displayed ready to be edited,else if delete is yes, then the user will be asked to confirm the action, if yes then the fixture will be deleted from the database. if($update == 'yes') {
echo "<form name = "form1" method = "POST" action = "delete.php">
</form>";
}
}
}
?>
</body>
</html>
Comment