stokie-rich Posted December 1, 2009 Share Posted December 1, 2009 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> Quote Link to comment Share on other sites More sharing options...
Deoctor Posted December 1, 2009 Share Posted December 1, 2009 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.