Parse Error
Posted: Wed Apr 19, 2006 1:11 pm
hawleyjr | Please use
hawleyjr | Please use
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: :arrow: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I have a form that redirects to a php page to inser data into mysql db. Whenever I try to run I get the following error:
Parse error: parse error, unexpected T_VARIABLE in users.php on line 10
Below is the code. I'm not sure what I am missingCode: Select all
<?php
$DBHOST = 'localhost';
$DBUSER = '*******';
$DBPASS = '*****';
$DBNAME = 'Database here';
$dbconnect = mysql_connect($DBHOST,$DBUSER,$DBPASS) or die('Err:Unable to connect to database');
@mysql_select_db('$DBName') or die('Unable to select database '$DBName');
$sqlquery = INSERT INTO Users VALUES('$last_name');
$results = mysql_query($sqlquery);
mysql_close();
?>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: :arrow: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]