hi im wondering is anyone can help me with this peice of code
what i am trying todo is to create a register page where users type information which goes into a database heres the code
[B]FORM CODE [B/]
[HTML]
<html>
<head>
<title>Signup Form</title>
</head>
<body>
<form name=form1 method=post action=register .php>
<table width=100% border=0 cellpadding=4 cellspacing=0>
<tr>
<td width=24% align=left valign=top>Firs t Name</td>
<td width=76%><inpu t name=first_name type=text id=first_name2> </td>
</tr>
<tr>
<td align=left valign=top>Last Name</td>
<td><input name=last_name type=text id=last_name></td>
</tr>
<tr>
<td align=left valign=top>Emai l Address</td>
<td><input name=email_addr ess type=text id=email_addres s></td>
</tr>
<tr>
<td align=left valign=top>Desi red Username</td>
<td><input name=username type=text id=username></td>
</tr>
<tr>
<td align=left valign=top>Info rmation about you:</td>
<td><textarea name=password id=password></textarea></td> </tr>
<tr>
<td align=left valign=top> </td>
<td><input type=submit name=Submit value=Join Now!></td>
</tr>
</table>
</form>
</body>
</html>
[/HTML]
DATABASE CODE register.php
[PHP]
<?php
// creates a new connection object
$adoCon = new COM("ADODB.Conn ection");
// opens the connection using a standard Access connection string
$adoCon->Open("Provider =Microsoft.Jet. OLEDB.4.0; Data Source=\wamp\ww w\PRU.mdb");
{ $adoCon->Execute
( "INSERT INTO tblUsers
(firstname,last Name,email,user name,password)
VALUES
('$_POST[first_name]','$_POST[last_name]','$_POST[email_address]','$_POST[username]','$_POST[password]');"
);
}
// closes the connection, frees up resources, kills all traces
$adoCon->Close();
$adoCon = null;
{ adocon
?>
[/PHP]
and heres the error message after pressing the submit button
Parse error: parse error, unexpected $end in C:\wamp\www\pru \register.php on line 23
what i am trying todo is to create a register page where users type information which goes into a database heres the code
[B]FORM CODE [B/]
[HTML]
<html>
<head>
<title>Signup Form</title>
</head>
<body>
<form name=form1 method=post action=register .php>
<table width=100% border=0 cellpadding=4 cellspacing=0>
<tr>
<td width=24% align=left valign=top>Firs t Name</td>
<td width=76%><inpu t name=first_name type=text id=first_name2> </td>
</tr>
<tr>
<td align=left valign=top>Last Name</td>
<td><input name=last_name type=text id=last_name></td>
</tr>
<tr>
<td align=left valign=top>Emai l Address</td>
<td><input name=email_addr ess type=text id=email_addres s></td>
</tr>
<tr>
<td align=left valign=top>Desi red Username</td>
<td><input name=username type=text id=username></td>
</tr>
<tr>
<td align=left valign=top>Info rmation about you:</td>
<td><textarea name=password id=password></textarea></td> </tr>
<tr>
<td align=left valign=top> </td>
<td><input type=submit name=Submit value=Join Now!></td>
</tr>
</table>
</form>
</body>
</html>
[/HTML]
DATABASE CODE register.php
[PHP]
<?php
// creates a new connection object
$adoCon = new COM("ADODB.Conn ection");
// opens the connection using a standard Access connection string
$adoCon->Open("Provider =Microsoft.Jet. OLEDB.4.0; Data Source=\wamp\ww w\PRU.mdb");
{ $adoCon->Execute
( "INSERT INTO tblUsers
(firstname,last Name,email,user name,password)
VALUES
('$_POST[first_name]','$_POST[last_name]','$_POST[email_address]','$_POST[username]','$_POST[password]');"
);
}
// closes the connection, frees up resources, kills all traces
$adoCon->Close();
$adoCon = null;
{ adocon
?>
[/PHP]
and heres the error message after pressing the submit button
Parse error: parse error, unexpected $end in C:\wamp\www\pru \register.php on line 23
Comment