my configuration <? ob_start();session_start(); $hostname = "localhost"; $data_username = "rapidxpr_admin"; $data_password = "********"; $data_basename = "rapidxpr_surveyz4u"; $conn = mysql_connect("".$localhost."","".$rapidxpr_admin."","".$**********.""); mysql_select_db("".$rapidxpr_surveyz4u."") or die(mysql_error()); $bonuspoints=10; $mainpointsneeded=200; ?> But when i try to access my website i get an error saying: Parse error: syntax error, unexpected T_DNUMBER, expecting T_VARIABLE or '$' in /home/rapidxpr/surveyz4u.co.cc/config.php on line 7 Can anyone help me with the correct configuration I'll appreciate ur help
Replace this line : $conn = mysql_connect("".$localhost."","".$rapidxpr_admin."","".$**********.""); with $conn = mysql_connect($hostname,$data_username,$data_password); and you should be ok.
oh! also, Replace this line: mysql_select_db("".$rapidxpr_surveyz4u."") or die(mysql_error()); with mysql_select_db($data_basename) or die(mysql_error());
thanx 4 u r help samyak and bartolay13 but iam still getting the error Parse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in /home/rapidxpr/surveyz4u.co.cc/config.php on line 7 my current configuration <? ob_start();session_start(); $hostname = "localhost"; //your hostname (normally localhost) $data_username = "rapidxpr_admin"; //database username $data_password = "******"; //database password $data_basename = "rapidxpr_surveyz4u"; //database name $conn = mysql_connect($localhost,$rapidxpr_admin,$***************); mysql_select_db($rapidxpr_surveyz4u) or die(mysql_error()); $bonuspoints=10; //bonus points awarded for new users $mainpointsneeded=200; //max number of points needed before user can request voucher ?>
Just enter your database password and you should be good to go. <? ob_start();session_start(); $hostname = "localhost"; $data_username = "rapidxpr_admin"; $data_password = "******"; $data_basename = "rapidxpr_surveyz4u"; $conn = mysql_connect("".$hostname."","".$data_username."","".$data_password.""); mysql_select_db("".$data_basename."") or die(mysql_error()); $bonuspoints=10; $mainpointsneeded=200; ?> Code (markup):
Are you sure you are looking at the correct PHP file? IS the code that you posted on the config.php file?