Hey, Been writing my own php snippet but I'm having a few issues. I have a drop down which is populated by the mysql db however when I click delete it runs an action and throws an error.
Form:
<form action="deleteuserform.php">
<select>
<?php
$sql="SELECT id,customer_name FROM Customers";
$result =mysql_query($sql);
while ($data=mysql_fetch_assoc($result)){
?>
<option value ="<?php echo $data['id'] ?>" ><?php echo $data['customer_name'] ?></option>
<?php } ?>
</select>
<input type="submit" value="Delete User">
</form>
deleteuserform.php:
<?php
mysql_query("Delete FROM Customers WHERE id = $data['id']");
?>
Error I am recieving:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/xtrapsp/public_html/Rhino/deleteuserform.php on line 3