Shibby-Shabs
12-11-2010, 08:15 AM
Getting this error:
Fatal error: Cannot redeclare xx_mysql_connect() (previously declared in C:\xampp\htdocs\TheEnd004500\xlogin\xxz\xx_config. php:10) in C:\xampp\htdocs\TheEnd004500\xlogin\xxz\xx_config. php on line 12
<?php
/************************************************** **********
This file contains all used custom functions
************************************************** **********/
//Functions
function xx_mysql_connect()
{
$conn = mysql_connect('localhost','root','123') or die('<b>Error! </b>' . mysql_error());
mysql_select_db('theend004500') or die('<b>Error! </b>' . mysql_error());
}
function xx_select_page($title)
{
$querypage = mysql_query("SELECT * FROM `pages` WHERE `title`='$title'");
while ($row = mysql_fetch_assoc($querypage))
{
echo $row['body'];
}
}
function xx_new_message()
{
$conn = mysql_connect('removed','removed,'removed') or die('<b>Error! </b>' . mysql_error());
mysql_select_db('removed') or die('<b>Error! </b>' . mysql_error());
$messages_new = mysql_query("SELECT * FROM `messages` WHERE `to`='1'");
$numrows = mysql_num_rows($messages_new);
if ($numrows>0)
{
echo "<div align='center' id='messagenew'>You have a new message!</div>";
}
}
?>
Fatal error: Cannot redeclare xx_mysql_connect() (previously declared in C:\xampp\htdocs\TheEnd004500\xlogin\xxz\xx_config. php:10) in C:\xampp\htdocs\TheEnd004500\xlogin\xxz\xx_config. php on line 12
<?php
/************************************************** **********
This file contains all used custom functions
************************************************** **********/
//Functions
function xx_mysql_connect()
{
$conn = mysql_connect('localhost','root','123') or die('<b>Error! </b>' . mysql_error());
mysql_select_db('theend004500') or die('<b>Error! </b>' . mysql_error());
}
function xx_select_page($title)
{
$querypage = mysql_query("SELECT * FROM `pages` WHERE `title`='$title'");
while ($row = mysql_fetch_assoc($querypage))
{
echo $row['body'];
}
}
function xx_new_message()
{
$conn = mysql_connect('removed','removed,'removed') or die('<b>Error! </b>' . mysql_error());
mysql_select_db('removed') or die('<b>Error! </b>' . mysql_error());
$messages_new = mysql_query("SELECT * FROM `messages` WHERE `to`='1'");
$numrows = mysql_num_rows($messages_new);
if ($numrows>0)
{
echo "<div align='center' id='messagenew'>You have a new message!</div>";
}
}
?>