Dabeer
Aug 28 2009, 09:56 AM
<?php
class Db {
function connect() {
$host = "";
$user = "";
$passwd = "";
$db = "";
mysql_connect($host,$user,$passwd) or die("Sorry, can't connect to SQL server, please come later...");
@mysql_select_db("$db");
}
function close() {
mysql_close();
}
};
?>
Error Show
Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 111 in /www/vndv.com/m/o/v/movie-online/htdocs/includes/database/database.inc.php on line 8
Sorry, can't connect to SQL server, please come later...
$host = "";
$user = "";
$passwd = "";
$db = "";
what can i put in this section?
Jacob
Aug 28 2009, 11:00 AM
You need to create a database and a database user. Please search the forums for the tutorial on it.
Dabeer
Aug 29 2009, 09:11 AM
<?php
/********************************************************************************
**************************************************************
SecureBux Version 2.00
This Script has been created and coded by Gabrola and sold by Hamza.
If you find any bugs in the script report at ygabrola@gmail.com or contact Hamza.
Copywrite Gabrola 2008;
********************************************************************************
****************************************************************/
$dhost = "1111"; //usually localhost, or ip
$dusername = "11111"; // database user
$dpassword = "1111"; // database pass
$ddatabase = "1111"; // database name
$con = mysql_connect($dhost, $dusername, $dpassword) or die("Cannot Connect");
mysql_select_db($ddatabase, $con);
if($_COOKIE["usNick"] and $_COOKIE["usPass"])
{
$q = mysql_query("SELECT * FROM tb_users WHERE username='{$_COOKIE['usNick']}' AND password='{$_COOKIE['usPass']}'") or die(mysql_error());
if(mysql_num_rows($q) == 0)
{
$_COOKIE['usNick'] = false;
$_COOKIE['usPass'] = false;
} else {
$loggedin = 1;
$r = mysql_fetch_array($q);
}
}
$da = date("j");
$queryxx = "DELETE FROM ad_clicks WHERE day!='$da'";
mysql_query($queryxx);
$q2 = mysql_query("SELECT * FROM settings");
while($r2=mysql_fetch_array($q2))
{
$set[$r2[setname]]=$r2["setvalue"];
}
mysql_query("UPDATE settings SET setvalue='0', set_day='{$da}' WHERE set_day!='{$da}' AND set_day>'0'") or die(mysql_error());
$user=$_COOKIE['usNick'];
?>
Know error show
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/a2541446/public_html/config.php on line 34
Dave
Aug 29 2009, 10:25 AM
Bux scripts are not allowed on the hosting. In some countries they're even illegal.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.