# Total PHP noob needs help!

**URL:** <https://forum.kirupa.com/t/total-php-noob-needs-help/164577>\
**Category:** Uncategorized\
**Created:** [October 3, 2005, 2:09am UTC](https://forum.kirupa.com/t/total-php-noob-needs-help/164577 "2005-10-03T02:09:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![natronp](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@natronp](https://forum.kirupa.com/u/natronp)\
**Post date:** [October 3, 2005, 2:09am UTC](https://forum.kirupa.com/t/total-php-noob-needs-help/164577/1 "2005-10-03T02:09:59Z")

</div>

Okay, i’m a total noob to php. I’m trying to pass in a variable from flash (that should be no problem) and use it to delete a record from a MYSQL db. The php I have so far returns a result variable but doesn’t appear to actually delete the row from the MYSQL table!

help! the config file i include works for other db stuff like adding a row, returning recordsets, etc. just not deleting!

code:

```auto
<?PHP

//this line includes the database connection variables
include_once("config.php");

$deleteUser = $_POST['user'];
$deletePass = $_POST['pass'];

if ($deletUser && $deletePass ) {
$query = "DELETE FROM auth WHERE username=$deleteUser";
    $result = mysql_query($query) or die("Delete Failed!");
	}

if ( $result ){
/*
 print the variables to the output in order to let flash read them 
 */
$message= $result;
$vars = "" ; 
$vars .= "createUserStatus=" . $message ; 

echo $vars ; 
} else {
$message= "Error - Could not delete user.";
$vars = "";
$vars .= "message=".$message;
echo $vars;
}
?>

```
