OUR MUST POPULAR POST

Saturday, July 6, 2013

Insert Command In PHP


<?php
$conn=mysql_connect("localhost","root","");
mysql_select_db("root",$conn);
$sql="INSERT INTO progress(Name,Economics,English,Nepali,Business_Studies,Accounts)
VALUES
('$_POST[name]','$_POST[eco]','$_POST[eng]','$_POST[nep]','$_POST[bst]','$_POST[acc]')";
$result=mysql_query($sql);
if($result==1){
header("location:submit.php");
}
else{
header("location:notsubmit.php");
}
mysql_close($conn);
?>

No comments:

Post a Comment

Thanks for comment me