Hello, I need help with my delete code.
This is my code:
[php]
<?php $host="localhost"; // Host naam (localhost in Altervista. $username="yarnickphp"; // Inlognaam MySQL. $password="private"; // Password MySQL. $db_name="my_yarnickphp"; // Naam van de database. $tbl_name="members"; // Naam van de tabel. mysql_connect("$host", "$username", "$password")or die("Can not connect!"); mysql_select_db("$db_name")or die("Can not select database!"); $user = $_POST['username']; $sql = "DELETE FROM $tbl_name WHERE username = $user"; mysql_query($sql); ?> [/php]