Parse error: syntax error, unexpected '{' in C:\xmpp\htdocs\e-kartbz\includes\config.php on line 4 -


this question has answer here:

am new coding, , got error

parse error: syntax error, unexpected '{' in c:\xmpp\htdocs\e-kartbz\includes\config.php on line 4

the code wrote is:

<?php //connect database mysql_connect{"localhost", "root", ""} or die{mysql_error{}}; mysql_select_db{"e-kartbz"} or die{mysql_error{}}; echo "working"; ?> 

i wrote instructor did in tutorial, , worked him. can me please, thank you.

you have use () instead of {}

your code must be,

mysql_connect("localhost", "root", "") or die(mysql_error()); mysql_select_db("e-kartbz") or die(mysql_error()); echo "working"; 

Comments