> registration form in php ~ Online tutorial

registration form in php


Registration form:
This is registration form in which data are entered by the user then it is goes to database for storing data.In this registration form we create four field and send data using form tag.
<html>
<body>
<form name="form1" action="signup2.php" method="post">
Name<input type='text' name='name'>
Email id<input type='text' name='email'>
Pass<input type='password' name='pass'>
Country<input type='text' name='country'>
<input type='submit' name='submit' value='Insert'>
</form>
</body>
</html>

Storing data in database:

In this program we are create database connectivity storing data which entered by user in registration form.In this data are useful processing the query.

<?php
$conn=mysql_connect('localhost','root','');
$db_name='temp';
mysql_select_db($db_name);
$name=$_POST['name'];
$email=$_POST['email'];
$pass=$_POST['pass'];
$country=$_POST['country'];
$insert=mysql_query("insert into tempv(name,email,pass,country)values('$name','$email','$pass','$country')");
?>

Please Give Us Your 1 Minute In Sharing This Post!
Please Give Us Your 1 Minute In Sharing This Post!
SOCIALIZE IT →
FOLLOW US →
SHARE IT →
Powered By: BloggerYard.Com

0 comments: