Jump to content

[SOLVED] unable to delete from database using php?


yobo

Recommended Posts

hey all

 

i have a slight error for some reasson i can't delete from the database using my php script

 

Parse error: syntax error, unexpected T_VARIABLE in C:\Program Files\xampp\htdocs\dnbcorn\del_dj2.php on line 7

here is my coding

<?php

include 'include\db.inc.php';

 

//delete dj

 

$id = $_GET['id']

$delete = mysql_query("DELETE FROM dj WHERE id='$id' ");

if ($delete) {

echo '<p>DJ Deleted!</p>';

}else{

echo '<p>error deleting dj</p>';

}

    ?>

<p><a href="main_dj.php">Main menu</a></p>

 

 

not sure why it is saying that?

 

joe

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.