<?php
$con=mysql_connect("localhost","root","");
if(!$con)
{
die('Could not connect:'.mysql_error());
}
mysql_select_db(customer1,$con)
$sql1="INSERT INTO details(companyname,companyadd,comstate,telephone,fax,email,fname,lname,nic,mobile,username,password);VALUES('$_POST[coname]','$_POST[coadd]','$_POST[cost]','$_POST[tel]','$_POST[fax]','$_POST[mail]','$_POST[fname]','$_POST[lname]','$_POST[nic]','$_POST[mob]','$_POST[user]','$_POST[password]')";
if(!mysql_query($sql1,$con))
{
die('Error:'.mysql_error());
}
echo"1 record added";
mysql_close($con)
?>
dilan_n 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.