does that work or is it wrong :sPHP Code:mysql_close($ms);

does that work or is it wrong :sPHP Code:mysql_close($ms);
Yeah, as long as that variable is the connection handle.
i used to be NintendoNews. visit my blog or add me on twitter.
need help with vista? i am a microsoft certified technology specialist in configuring windows vista and connected home integrator.. pm me for help!
"I am the way, the truth, and the life. No one comes to the Father except through me"
John 14:6 (NIV)
but i keep getting a error:
Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource in /home/habbotea/public_html/djp/bannedsongs.php on line 58
here is coding:
Edit: 58th line:<? session_start();
include 'database.php';
$ip = $_SERVER['REMOTE_ADDR']; //get the ip of the current user
if(!isset($_SESSION['session_username']) || empty($_SESSION['session_username']) || $ip!= $_SESSION['session_ip']) {
//if the username is not set or the session username is empty or the ip does not match the session ip log them out
session_unset(); //clears firefox
session_destroy(); //clears IE
die("You are not logged in - Please Log In"); }
include("ol.php");?><body bgcolor="#3366FF">
<p><font face="Verdana" size="1"> Below Are A List Of Songs That Have Been Banned By The Administrator.<br>
<b>Please Do Not Play Any Of These Songs Or You Will Be Issued With A Formal Ban By One Of Our Administrators !</b>
<? if($_SESSION['session_level'] == "1") { ?>
</font><font face="Verdana" size="1"><br><a href="?action=delete">Delete All</a>
<? } ?>
<?
$query = mysql_query("SELECT * FROM `bannedsongs` ORDER BY `id`");
while($result = mysql_fetch_array($query)) {
$Song = $result["Song"];
$From = $result["From"];
$Long = $result["Long"];
echo "<p><b>Song: $Song </b>has been banned<br><b>Banned From:</b> $From<br><b>For: </b>$Long</b><br><hr color='#000000' size='1'><br>";
if($action == "delete") {
$delete = mysql_query("TRUNCATE TABLE `bannedsongs`");
echo "All Banned Songs In The System Have Been Deleted.";
}
}
mysql_close($ms);
?>
</font> </font> </td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>PHP Code:mysql_close($ms);
Last edited by Jamie.; 07-04-2006 at 05:28 PM.
Does it means the table doesn't exist or isn't setup properly?
That went fast.
i think it means the table does not exist. what panel is it?
d/w, fixed nowi deleted that bit and it works clever me
I wouldent recomend deleting it.Originally Posted by bondie0072
d/w, fixed nowi deleted that bit and it works clever me
lolOriginally Posted by Organised
I wouldent recomend deleting it.works :s
Want to hide these adverts? Register an account for free!