I am trying to write a PHP script to connect to a database I have created in WAMP Server 2.0 but no matter what I do I keep getting the same error message:
Parse error: parse error in C:\wamp\www\database.php on line 5
I have looked at this for over an hour now and I cannot see what in the world is the issue here. Maybe you can help me.
This is the code I am trying to use
<?php $con = mysql_connect("localhost","test","password"); if (!$con) die 'could not connect: . mysql_error());} mysql_select_db("Directory"); mysql_query("INSERT INTO Directory('lname','fname','address','city','state','zipcode','areacode','telephone') VALUES ('newlname','newfname','newaddress','newzipcode','newareacode','newtelephone');"); ?> <a href="Lloyd_Project7.html>Back to directory</a>;
and as I said I cannot see anything that would be causing a parse error on line 5 or anywhere for that matter:icon_frown:
Any advice would be greatly appreciated!!