Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
KLUGLUG
Blood Service Portal
Commits
fc1748bf
Commit
fc1748bf
authored
Oct 26, 2019
by
Ajayguru Madu
Browse files
Upload New File
parent
16d28c92
Changes
1
Hide whitespace changes
Inline
Side-by-side
admin/insert.php
0 → 100644
View file @
fc1748bf
<?php
require
(
'db.php'
);
include
(
"auth.php"
);
$status
=
""
;
if
(
isset
(
$_POST
[
'new'
])
&&
$_POST
[
'new'
]
==
1
)
{
$uname
=
$_REQUEST
[
'uname'
];
$blood
=
$_REQUEST
[
'blood'
];
$age
=
$_REQUEST
[
'age'
];
$addr1
=
$_REQUEST
[
'addr1'
];
$mobile
=
$_REQUEST
[
'mobile'
];
$city
=
$_REQUEST
[
'city'
];
$ins_query
=
"insert into bloo (`uname`,`blood`,`age`,`addr1`,`mobile`,`city`) values ('
$uname
','
$blood
','
$age
','
$addr1
','
$mobile
','
$city
')"
;
mysqli_query
(
$con
,
$ins_query
)
or
die
(
mysql_error
());
$status
=
"New Record Inserted Successfully.</br></br><a href='view.php'>View Inserted Record</a>"
;
}
?>
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
>
<title>
Insert New Record
</title>
<link
rel=
"stylesheet"
href=
"css/style.css"
/>
</head>
<body>
<div
class=
"form"
>
<p><a
href=
"dashboard.php"
>
Dashboard
</a>
|
<a
href=
"view.php"
>
View Records
</a>
|
<a
href=
"logout.php"
>
Logout
</a></p>
<div>
<h1>
Insert New Record
</h1>
<form
name=
"form"
method=
"post"
action=
""
>
<input
type=
"hidden"
name=
"new"
value=
"1"
/>
<p><input
type=
"text"
name=
"uname"
placeholder=
"Enter Name"
required
/></p>
<p><input
type=
"text"
name=
"blood"
placeholder=
"Enter BLood Group"
required
/></p>
<p><input
type=
"text"
name=
"age"
placeholder=
"Enter Age"
required
/></p>
<p><input
type=
"text"
name=
"addr1"
placeholder=
"Enter Address"
required
/></p>
<p><input
type=
"text"
name=
"mobile"
placeholder=
"Enter Mobile No"
required
/></p>
<p><input
type=
"text"
name=
"city"
placeholder=
"Enter City"
required
/></p>
<p><input
name=
"submit"
type=
"submit"
value=
"insert"
/></p>
</form>
<p
style=
"color:#FF0000;"
>
<?php
echo
$status
;
?>
</p>
</div>
</div>
</body>
</html>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment