TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Insert Data Into Database In PHP MySQL
Delpin Susai Raj
Aug 24
2016
Code
999
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
<?php
include_once
(
"config.php"
);
if
(isset(
$_POST
[
'Submit'
]))
{
$name
=
$_POST
[
'name'
];
$email
=
$_POST
[
'email'
];
$result
=mysql_query(
"INSERT INTO store(name,email) VALUES('$name','$email')"
);
//header("Location: view.php");
echo
'<META HTTP-EQUIV="Refresh" Content="0; URL=index.php">'
;
if
(
$result
==true)
{
?>
<script type=
"text/javascript"
>
alert(
'Data success fully stored'
);
</script>
<?php
}
}
?>
Insert Data
Database
PHP
MySQL