Jump to content

help with a registration page


stokie-rich

Recommended Posts

hello all im rich and im new here so please be genital with me!! im doing a project at uni and i have got some code that is giving me a headache can u pleas help me

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<?php
$Username = $_POST["txtusername"]; 
$Firstname = $_POST["txtuserfirstname"]; 
$LastName = $_POST ["txtuserlastname"];
$Password = $_POST ["txtpword"] ;

$adoCon = new COM("ADODB.Connection");


$here = dirname(__FILE__);
echo $here; 

$adoCon->Open("Provider=Microsoft.ACE.OLEDB.12.0;
Data Source=D:\\wwwdata\\DSA\\2009-2010\\0db\\Hv001341\\intermedhv00134111.accdb");


//try {
$adoCon->Execute
'INSERT INTO tblusers'
(username, password, userfirstname, userlastname)
VALUES
('$Username', '$Password', '$Firstname', '$LastName')
//	);

//catch(Exception $e)
//{

//echo $e;
//echo 'Sorry - There was a problem with adding the data to the database.<br />';
//}
$adoCon->Close();
$adoCon = null;

?>
<body>
</body>
</html>

 

Link to comment
https://forums.phpfreaks.com/topic/183552-help-with-a-registration-page/
Share on other sites

Dear Mr.rich guy..

just now went through your code..

cannot able to get a relation in what you are doing..

u are using the post method for getting the username and other details but where are u getting these info from. dont u need to mention a form for this one for the user to enter details and from there i think u should call the details using post :rtfm:

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.