<html>
<body>
<?php
include("head.php");
$con=mysql_connect("localhost","root","");
$connection=mysql_select_db("library",$con);
$accno=$_POST['accno'];
$book=$_POST['book'];
$author=$_POST['author'];
$publication=$_POST['publication'];
$year=$_POST['year'];
$volume=$_POST['volume'];
$isbn=$_POST['isbn'];
$status=$_POST['status'];
$quantity=$_POST['quantity'];
$price=$_POST['price'];
$loc=$_POST['loc'];
$sql= "insert into
lib(accno,book,author,publication,year,volume,isbn,status,quantity,
price,loc)values('".$accno.'",'".$book."','".$author."','".$publication
."','".$year."','".$volume."','".$isbn"','".$status."','".$quantity."',
'".$price"','".$loc."') ";
$res=mysql_query($sql);
mysql_close($con);
?>
</body>
</html>
php connect with mysql database connectivity
Page 1 of 11 Replies - 171 Views - Last Post: 11 September 2012 - 09:46 AM
#1
php connect with mysql database connectivity
Posted 11 September 2012 - 09:44 AM
Replies To: php connect with mysql database connectivity
#2
Re: php connect with mysql database connectivity
Posted 11 September 2012 - 09:46 AM
Topic closed, please open a new one & post correctly.
Questions do not use polls.
Post the error in the body.
Post your question in the body.
Use code tags only around the code.
Questions do not use polls.
Post the error in the body.
Post your question in the body.
Use code tags only around the code.
Page 1 of 1
|
|

New Topic/Question
This topic is locked



MultiQuote



|