Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $con=mysqli_connect("localhost","root","","class");
- if($con!=null)
- echo"Sucess";
- $result=mysqli_query($con,'INSERT INTO student VALUES("'.$_POST['text1'].'","'.$_POST['text2'].'","'.$_POST['text3'].'","'.$_POST['text4'].'","'.$_POST['text5'].'","'.$_POST['text6'].'");
- $result=mysqli_query($con,"SELECT * FROM student");
- if(!$result)
- die("connot");
- else
- {
- echo'<table border="1">';
- echo '<tr>';
- echo '<td>';
- echo "StudentID";
- echo '</td>';
- echo '<td>';
- echo"Firstname";
- echo '</td>';
- echo '<td>';
- echo "Lastname";
- echo '</td>';
- echo '<td>';
- echo "Address";
- echo '</td>';
- echo '<td>';
- echo "Major";
- echo '</td>';
- echo '<td>';
- echo "TeacherID";
- echo '</td>';
- echo '</tr>';
- }
- while($row=mysqli_fetch_array($result,MYSQLI_NUM))
- {
- echo '<tr>';
- for($i=0;$i<=5;$i++)
- echo'<td>'.$row[$i].'</td>';
- echo '</tr>';
- }
- echo "</table>";
- $result=mysqli_close($con);
- /*function input()
- {
- echo "<from name=>"
- } */
- ?>
Advertisement
Add Comment
Please, Sign In to add comment