-
Notifications
You must be signed in to change notification settings - Fork 0
/
newfaimly.php
52 lines (40 loc) · 891 Bytes
/
newfaimly.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
// Start the session
session_start();
?>
<html>
<head>
<?php require "header.php"; ?>
</head>
<body>
<div class=wraper>
<?php require "nav_bar.php"; ?>
<a href=index.php>Home</a> - New Family
<h2>Add New Family</h2>
<form action=newfaimly.php method=post>
<table>
<tr>
<td>Faimly Name</td><td><input type=text name=fname></td>
</tr>
<tr>
<td>Faimly Number</td><td><input type=text name=faimlynum></td>
</tr>
<tr>
<td></td><td><input type=submit name=submit value="Save and Create New"></td>
</tr>
</table>
</form>
<?php
if(isset($_POST["submit"])){
/*
$_SESSION["email"] =
$_SESSION["password"] = */
$fname = $_POST["fname"];
$faimlynum = $_POST["faimlynum"];
$insert = mysqli_query($con,"INSERT INTO faimly (fname, faimlynum)VALUES('$fname','$faimlynum')");
if($insert){echo "Data Entered";}else{echo "Data not Entered<br>".mysqli_error();}
}
?>
</div>
</body>
</html>