SQL PHP code help please
Posted: Sun Apr 02, 2006 7:16 am
patrikG | Please use
patrikG | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
hi dont know if any one could help please
what is wrong with this code im sure i have got it all wrong im a beginer at php
i have left mysql login out obviosly thats not what the problen isCode: Select all
<?php
$server = "not shownn";
$dbuser = "not shown";
$dbpass = "not shown";
$dbname = "not shown";
$dbtable = "not shown";
// Connect to the database
mysql_connect($server,$dbuser,$dbpass) or die ("Could not establish connection"); // make connection
mysql_select_db($dbname); // select database
$request = "DELETE FROM login WHERE username= '$deluser'
$result = mysql_query($request);
if($result){
echo "You Successfully Deleted '$deluser'";
} else {
echo "The deleion of'$deluser' Failed";
}
?>Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
[url]http://www.rjcdesigns.co.uk[/url]