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
2e759fa3
Commit
2e759fa3
authored
Oct 25, 2019
by
Nunna Satya Surya Venkat
Browse files
Update insert.php
parent
b979f43f
Changes
1
Hide whitespace changes
Inline
Side-by-side
insert.php
View file @
2e759fa3
<?php
<<<<<<<
HEAD
define
(
'DB_SERVER'
,
'localhost'
);
define
(
'DB_USERNAME'
,
'root'
);
define
(
'DB_PASSWORD'
,
''
);
define
(
'DB_DATABASE'
,
'blood'
);
$$nameErr
=
""
;
$con
=
mysqli_connect
(
DB_SERVER
,
DB_USERNAME
,
DB_PASSWORD
,
DB_DATABASE
);
if
(
mysqli_connect_error
())
{
die
(
'Connect Error('
.
mysqli_connect_errno
()
.
')'
.
mysqli_connect_error
());
}
else
{
if
(
isset
(
$_POST
[
'submit'
]))
{
$uname
=
mysqli_real_escape_string
(
$con
,
$_POST
[
'uname'
]);
$email
=
mysqli_real_escape_string
(
$con
,
$_POST
[
'email'
]);
$pass
=
mysqli_real_escape_string
(
$con
,
$_POST
[
'pass'
]);
$rpass
=
mysqli_real_escape_string
(
$con
,
$_POST
[
'rpass'
]);
$query
=
"insert into regiscred (uname,email,pass,rpass) values('
$uname
',
$email
','
$pass
','
$rpass
')"
;
$result
=
mysqli_query
(
$con
,
$query
);
=======
$con
=
mysqli_connect
(
"localhost"
,
"root"
,
""
,
"blood"
);
>>>>>>>
3
fb5d8987572530825f3e6bda0d73c99c862f049
if
(
$con
===
false
){
die
(
"ERROR: Could not connect. "
.
mysqli_connect_error
());
...
...
@@ -38,15 +18,10 @@ $ld= $_POST['ago'];
$sql
=
"INSERT INTO bloo (uname,blood,age,mobile,city,dd) VALUES ('
$name
', '
$blood
',
$age
,'
$mobile
','
$city
',
$ld
)"
;
$result
=
mysqli_query
(
$con
,
$sql
);
<<<<<<<
HEAD
if
(
$result
==
true
){
echo
"Thanks For Registering!!"
;
=======
if
(
$result
==
true
)
{
echo
"<h1>Thank You for Being a Blood Donor..You will Receive a Message when there is a Requirement!! </h1>"
;
>>>>>>>
3
fb5d8987572530825f3e6bda0d73c99c862f049
}
...
...
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