Linked changed, you can also so see it here:
http://88.212.66.150/player_edit.php
The code im using is as follwing:
<?php
// DELETE SCRIPT
if ( !isset( $_GET['do'] ) || $_GET['do'] != 1 ){
?>
<p align="center" style="color:#FF0000">
Er du sikker på at du vil slette denne spiller/træner? <?php echo $_GET['type']?>?<br/>
<a href="<?php echo $_SERVER['REQUEST_URI']?>&do=1">Ja</a> or <a href="player_edit.php">Nej</a>
</p>
<?php
} else {
if ( $_GET['type'] == "people" ){
// delete references to people from the movie table
// delete reference to lead actor
$actor = "UPDATE
squad
SET
pl_name = '0'
WHERE
pl_name = '".$_GET['id']."'
";
$result = mysql_query( $actor )
or die("Invalid query: " . mysql_error());
// delete reference to director
$director = "UPDATE
coach
SET
coach_name = '0'
WHERE
coach_name = '".$_GET['id']."'
";
$result = mysql_query( $director )
or die("Invalid query: " . mysql_error());
}
// generate SQL
$sql = "DELETE FROM
`".$_GET['type']."`
WHERE
`".$_GET['type']."_id` = '".$_GET['id']."'
LIMIT 1";
// echo SQL for debug purpose
echo "<!--".$sql."-->";
$result = mysql_query( $sql )
or die("Invalid query: " . mysql_error());
?>
<p align="center" style="color:#FF0000">
Your <?php echo $_GET['type']?> has been deleted. <a href="index.php">Index</a>
</p>
<?php
}
?>
I hope you can help