News problem in PhoenixPHP!

dalle

Member
Oct 2, 2011
70
1
Hey guys i need some help with my PhoenixPHP news in HK
Cuz when i try go to news i get this -

Parse error: syntax error, unexpected T_VARIABLE in C:\xampp\htdocs\housekeeping\news.php on line 1

How can i fix it?

Here's my first line

<?php$news1_3 = mysql_query("SELECT * FROM cms_news ORDER BY published DESC LIMIT 3");
?>
 

dalle

Member
Oct 2, 2011
70
1
Warning: mysql_query() [ ]: Access denied for user ''@'localhost' (using password: NO) in C:\xampp\htdocs\housekeeping\news.php on line 1

Warning: mysql_query() [ ]: A link to the server could not be established in C:\xampp\htdocs\housekeeping\news.php on line 1

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\housekeeping\news.php on line 10

Notice: Use of undefined constant USERNAME_REQUIRED - assumed 'USERNAME_REQUIRED' in C:\xampp\htdocs\housekeeping\news.php on line 29

Warning: mysql_query() [ ]: Access denied for user ''@'localhost' (using password: NO) in C:\xampp\htdocs\housekeeping\news.php on line 30

Warning: mysql_query() [ ]: A link to the server could not be established in C:\xampp\htdocs\housekeeping\news.php on line 30

Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\housekeeping\news.php on line 35
 

brsy

nah mang
May 12, 2011
1,530
272
Lol. Your database connection is fucked... Did you even edit the config? By the way, please read the errors, as they're self explanatory.
PHP:
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\xampp\htdocs\housekeeping\news.php on line 1
A LINK TO THE SERVER... C'mon man; don't rely on people having to spoon feed you for everything.
 

dalle

Member
Oct 2, 2011
70
1
This is the standart news.php Until a guy gave me a fixed he said... But when i use the orginal it shows something like this in Articles -
<p><span style="text-decoration: underline;"><em><strong>This is just a test!</strong></em></span></p>
 

Detox

Member
Jul 24, 2010
365
24
Well your Problem is This Code Right here
PHP:
foreach($_GET as $key => $value){
$_GET[$key]=mysql_real_escape_string(stripslashes(trim(htmlspecialchars($value))));
}
foreach($_POST as $key => $value){
$_POST[$key]=mysql_real_escape_string(stripslashes(trim(htmlspecialchars($value))));
}
foreach($_REQUEST as $key => $value){
$_REQUEST[$key]=mysql_real_escape_string(stripslashes(trim(htmlspecialchars($value))));
}
You need To remove it :p i'm guessing you can't read simple Stuff :p
 

Users who are viewing this thread

Top