Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi everybody.....I thank you in advance for any help. I am new to PHP but from what I have been learning, I absolutely love it. I currently have my hosting at GoDaddy and I am trying to connect to my Database on a page that is called from a form. It seems as if I am connecting to the Database because I am not getting any connection errors, but I keep getting a "Parse error: parse error, unexpected T_VARIABLE in /home/content/m/o/t/xxxxxx/html/test/EmailFormSubmission.php on line 20" error
I have pretty good SQL experience and in looking at my query string, I can not see what I am doing wrong. Can someone please let me know what I am doing wrong based on my code below. Also, is there anything else I have to do to commit the insert statement such as a commit command or anything?Code: Select all
<?PHP
mysql_connect('host,'uname','password');
mysql_select_db('dbname')
/* LINE 20 */ $query = "INSERT INTO tbUser (FirstName, LastName, Email) VALUES('FName', 'LName', 'EmailAddress')";
mysql_query("$query");
?>Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]