Help with mysql+php script
| From: | Matt Greene | Date: | Tue, 07 Dec 1999 03:51:05 +0000 |
| Subject: | Help with mysql+php script | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-7573@lists.php.net to get a copy of this message | ||
Ok I need some major help, i dont understand what is going wrong. in a part
of a script i need to delete a row in a mysql table, so here is what i am
using
function dropData()
global $mysqlHandle, $dbname, $tablename, $fieldname, $PHP_SELF;
mysql_select_db( $dbname, $mysqlHandle );
mysql_query( "DELETE FROM $tablename WHERE $fieldname = $deldata" ,
$mysqlHandle );
}
to activate the function i click on a link that takes me to an if stement
then executes the function, here is the link:
<a
href='$PHP_SELF?action=dropData&dbname=$dbname&tablename=$tablename&fieldnam
e=$fieldname&deldata=$data'>Drop</a>
i know this isnt a lot of info but i was wondering if anyone could see
something immediately wrong
$mysqlHandle is already defined along with $dbname btw.