PHP School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become a PHP Expert!

Join 300,406 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,650 people online right now. Registration is fast and FREE... Join Now!




Insert values+Ms-Access+PHP

 

Insert values+Ms-Access+PHP

itsys

2 Jul, 2009 - 10:06 PM
Post #1

New D.I.C Head
*

Joined: 8 Jun, 2009
Posts: 8

CODE
<html>
</head>
<body>

<?php
//create an instance of the  ADO connection object
$conn = new COM ("ADODB.Connection")
  or die("Cannot start ADO");
//define connection string, specify database driver
$connStr = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source= C:\\wamp\www\\insertvalue\\database\\bestonlinediremaildb.mdb";
$conn->open($connStr); //Open the connection to the database
$query1="insert into " . $books . " (url, sitetitle, description, gifurl, cat1, email, creator, id, entdate, sitetype) values (\"" . $url . "\",\"" . $title . "\",\"" . $description . "\",\"" . $gifurl . "\",\"" . $category . "\",\"" . $email . "\",\"" . $uname . "\"," . $i2 . ", CURDATE()," . $stype . ")";
//mysql_db_query($dbname, $query1) or die("Failed Query of " . $query1);
$rs = $conn->execute($query1) or die("Failed Query of " . $query1);
Enter a book url:<br />
<input type="text" name="url"><br />
Enter the sitetitle:<br />
<input type="text" name="sitetitle"><br />
Enter the description<br />
<input type="text" name="description"><br />
Enter gifurl:<br />
<input type="text" name="gifurl"><br>
Enter the email:<br />
<input type="text" name="email"><br>
Enter the creator:<br />
<input type="text" name="creator"><br>
Enter the id:<br />
<input type="text" name="id"><br>
Enter the entdate:<br />
<input type="text" name="entdate"><br>
Enter the sitetype:<br />
<input type="text" name="sitetype"><br>
?>
</body>
</html>


What wrong this code pls coorection. Pls healp

User is offlineProfile CardPM
+Quote Post


PsychoCoder

RE: Insert Values+Ms-Access+PHP

2 Jul, 2009 - 10:19 PM
Post #2

Dyslexics Untie!
Group Icon

Joined: 26 Jul, 2007
Posts: 14,714



Thanked: 501 times
Dream Kudos: 11450
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net, jQuery

My Contributions
Are you receiving any errors? Does this code not work that way you intended it? When asking for help there are a couple items that are vital in order for someone to properly help you:
  • Post the code you're having problems with
  • Post the exact error you're receiving, if you are receiving one
  • If no error explain what the code is doing versus what you want it to do
  • Post your question in the body of your post, not the description field

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/7/09 10:56PM

Live PHP Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

PHP Tutorials

Reference Sheets

PHP Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month