-1
<?php

$db_name=“a7614252_booked”;
$mysql_user="a7614252_booked”;
$mysql_pass=“booked”;
$server_name="server38.000webhost.com”; //t_string error here. 

$con=mysqli_connect($server_name,$mysql_user,$mysql_pass,$db_name)or   die(‘Connection Error’.mysqli_connect_error());

?>

i have checked other responses on the same error but none of seem to be the answer to the problem here. Thank you.

2 Answers2

0

use this code, Replace with " or '

<?php

$db_name="a7614252_booked";
$mysql_user="a7614252_booked";
$mysql_pass="booked";
$server_name="server38.000webhost.com"; //t_string error here. 

$con=mysqli_connect($server_name,$mysql_user,$mysql_pass,$db_name)or   die(‘Connection Error’.mysqli_connect_error());

?>
Manjeet Barnala
  • 2,975
  • 1
  • 10
  • 20
0

You need to replace all occurences of with " AND also the backticks ` by '. Otherwise PHP will interprete the latter as bash commands.

$db_name="a7614252_booked";
$mysql_user="a7614252_booked";
$mysql_pass="booked";
$server_name="server38.000webhost.com"; //t_string error here. 
$con=mysqli_connect($server_name,$mysql_user,$mysql_pass,$db_name)or   die('Connection Error'.mysqli_connect_error());
Hyder B.
  • 10,900
  • 5
  • 51
  • 60