Can someone please tell me what my problem is here? I keep getting this error “Parse error: syntax error, unexpected ‘=’ in C:\xampp\htdocs\images\insert2.php on line 7” and just can’t figure out why.
Here is my code:[php]
<?php $path="localhost"; $username="root"; $password="xxxxxx"; $database="test"; $field1-name=$_POST['Value1']; $field2-name=$_POST['Value2']; $field3-name=$_POST['Value3']; $field4-name=$_POST['Value4']; $field5-name=$_POST['Value5']; mysql_connect($path,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query = "INSERT INTO person VALUES ('','$field1-name','$field2-name','$field3-name','$field4-name','$field5-name')"; mysql_query($query); mysql_close(); ?>[/php]