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
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:

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.