Hi i am new and new to php.
Firstly i am trying to install a gaming script. I am trying to set up the mysql info and placing it into the script. when i try to run the installer, i get this message:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/christ00/domains/christian-fsh.co.uk/public_html/games-room/mysql.php on line 14
Any ideas why? this is also the code from the file:
<?php
//---------------------------------\\
// TEAM STN STRIKES AGAIN \\
// NuLlEd By MaGiC e (TeAm StN) \\
//------------------------------------\\
class mysql {
var $link;
var $querycount=0;
var $querylist='';
[COLOR="Navy"]function connect($localhost, $christ00_game, $chappell, $christ00_game) {
[/COLOR] $this->link = mysql_connect($localhost, $christ00_game, $chappell) or die("Could not connect.");
mysql_select_db($db) or die("Could not find database.");
}
function query($query) {
if (!($result = mysql_query($query))) {
ob_end_clean();
die("SQL Error: ".mysql_error()."<br />Query: $query<br />");
}
$this->querycount++;
$this->querylist.="<br />$query";
return $result;
}
function result($result, $row, $name) {
return mysql_result($result, $row, $name);
}
function numrows($result) {
$numrows = mysql_num_rows($result);
return $numrows;
}
function affectedrows() {
return mysql_affected_rows($this->link);
}
}
?>
Also wot php development software do people recconmend for beginners and is there an online course in it. i know html but not php.
Regards
Steve