and i edit all stuffs but, when i try to add news it's give me an Error
this is the Error
PHP Code:
Warning: mysql_connect() [function.mysql-connect]: Host 'Master' is not allowed to connect to this MySQL server in C:\wamp\www\modules\AddNews.php on line 25
Warning: mysql_select_db() expects parameter 2 to be resource, boolean given in C:\wamp\www\modules\AddNews.php on line 26
Warning: mysql_query() [function.mysql-query]: [2002] A connection attempt failed because the connected party did not (trying to connect via tcp://localhost:3306) in C:\wamp\www\modules\AddNews.php on line 32
Warning: mysql_query() [function.mysql-query]: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:\wamp\www\modules\AddNews.php on line 32
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\wamp\www\modules\AddNews.php on line 32
Fatal error: Maximum execution time of 60 seconds exceeded in C:\wamp\www\modules\AddNews.php on line 34
PHP Code:
<?php
session_start();
include("../modules/include/Config.php");
require_once("../modules/include/Security.php");
require_once("../modules/include/sqlConn.php");
if(!isset($_SESSION['loggedin'])) {
header("location:./../?notLoggedIn");
} else {
mssql_select_db($dbName1, $dbConn) or die ("Couln't select database $dbName1");
$userID = $_SESSION['name'];
$getUserJID = mssql_query("select * from TB_User where StrUserID = '$userID'");
while ($row = mssql_fetch_array($getUserJID)) {
$userJID = $row['JID'];
$userGM = $row['sec_primary'];
}
if ($userGM > '1') {
header("location:./../?logout");
} else {
$mysqlip = "192.168.1.100";
$mysqlId = "root";
$mysqlpw = "";
$newsDb = "sro_paradise";
$myConn = mysql_connect($mysqlip, $mysqlId, $mysqlpw);
$selectdb = mysql_select_db($newsDb, $myConn);
$newsTitle = $_POST['title'];
$newsContent = $_POST['content'];
$newsAuthor = $_POST['author'];
mysql_query("insert into sro_news(title, content, author) values ('$newsTitle', '$newsContent', '$newsAuthor')");
header("location:./../?newsSuccess");
}
}
?>