Skip to content

Instantly share code, notes, and snippets.

@imranhoshain
Created November 10, 2016 06:24
Show Gist options
  • Save imranhoshain/cdef4be471ce8c468e72bc8a589aeb56 to your computer and use it in GitHub Desktop.
Save imranhoshain/cdef4be471ce8c468e72bc8a589aeb56 to your computer and use it in GitHub Desktop.
New
<html>
<body>
<body bgcolor ="pink">
<center>
<h1> Mass Students Information </h1>
</center>
<form action ="save.php" method ="POST">
<br> <br>
<center>
<pre>
Name : <input type ="text" name ="Name"> <br>
Department : <input type ="text" name ="Department"> <br>
Semester : <input type ="text" name ="Semester"> <br>
Shift : <input type ="text" name ="Shift"> <br>
Phone : <input type ="text" name ="Phone"> <br>
Email : <input type ="text" name ="Email"> <br>
Address : <input type ="text" name ="Address"> <br>
<input type ="submit" value ="save"> <input type ="reset" value ="clear"> <br>
</pre>
</center>
</body>
</html>
<?php
$con = mysql_connect("localhost","root","");
if(!$con)
{
die('error'.mysql_error());
}
else
print "connection successfully..........!";
print"</br>";
mysql_select_db("imran",$con);
$a=($_POST['Name']);
$b=($_POST['Department']);
$c=($_POST['Semester']);
$d=($_POST['Shift']);
$e=($_POST['Phone']);
$f=($_POST['Email']);
$g=($_POST['Address']);
$sql ="insert into info(Name,Department,Semester,Shift,Phone,Email,Address) values('$a','$b','$c','$d','$e','$f','$g')";
if (!mysql_query($sql))
{
die ('error'.mysql_error());
}
else
echo"Data save successfully";
mysql_close();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment