Hi,
I am trying to insert data into a MySQL database using an HTML form.
The following code:
<?php
if ($submit):
$dbcnx = mysql_connect("localhost","root",""
mysql_select_db("awi"
$sql = "insert into request set name='$name', company='$company', email='$email', username='$username', password='$password'";
if(@mysql_query($sql)) {
echo("Your request has been successfully sent, you will recieve an email shortly confirming your username and password"
}
else {
echo("There was an error sending your request: mysql_error()"
?>
is returning an error saying:
Parse error: parse error, unexpected $ in C:\Inetpub\ on line 74
but I can't work out where I am going wrong.
Can anyone help me?
Thankyou in advance,
Rach
I am trying to insert data into a MySQL database using an HTML form.
The following code:
<?php
if ($submit):
$dbcnx = mysql_connect("localhost","root",""
mysql_select_db("awi"
$sql = "insert into request set name='$name', company='$company', email='$email', username='$username', password='$password'";
if(@mysql_query($sql)) {
echo("Your request has been successfully sent, you will recieve an email shortly confirming your username and password"
}
else {
echo("There was an error sending your request: mysql_error()"
?>
is returning an error saying:
Parse error: parse error, unexpected $ in C:\Inetpub\ on line 74
but I can't work out where I am going wrong.
Can anyone help me?
Thankyou in advance,
Rach