i downloaded the attached files for this. when i run registration it says Table 'test.users' doesn't exist.. help me pls..
I also thank for this tutorial.![]()
To create registration forms can be used PHP Form. It is convenient and simple.
After I entered the details in the registration form, and pressed next, nothing showed up.
Using firefox, windows 7, apache 2, php5............
anyone has any idea?
Last edited by WhySG.com; 04-13-2010 at 02:12 AM.
would u mind pasting your code?
The connection to the database didnt work for me also but there was no $password value and when i changed that it started working.
Paste your code, and we can work on what could possibley be wrong
(p.s. im also a beginner so sorry in advance if i cant find the issue)
super nice.. super nice.. I have been looking for this site so many years ago.. and at last I've found it.. thanks thanks.. more power to the administrator..![]()
![]()
![]()
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>register</title>
</head>
<body bgcolor="black" style="color:white;">
<FORM ACTION="register.php" METHOD=get>
<h1>welcome to the registration page</h1>
please input the registration details to create an account here<br>
<table border="2">
<tr>
<td>User Name :</td><td><input name="regname" type="text" size"20"></input></td>
</tr>
<tr>
<td>email :</td><td><input name="regemail" type="text" size"20"></input></td>
</tr>
<tr>
<td>password :</td><td><input name="regpass1" type="password" size"20"></input></td>
</tr>
<tr>
<td>retype password :</td><td><input name="regpass2" type="password" size"20"></input></td>
</tr>
</table>
<input type="submit" value="register me!"></input>
</FORM>
</body>
</html>
This is the registerform.php
============================================
<?php
if($_GET["regname"] && $_GET["regemail"] && $_GET["regpass1"] && $_GET["regpass2"] )
{
if($_GET["regpass1"]==$_GET["regpass2"])
{
$servername="localhost";
$username="root";
$conn= mysql_connect($servername,$username)or die(mysql_error());
mysql_select_db("test",$conn);
$sql="insert into users (name,email,password)values('$_GET[regname]','$_GET[regemail]','$_GET[regpass1]')";
$result=mysql_query($sql,$conn) or die(mysql_error());
print "<h1>you have registered sucessfully</h1>";
print "<a href='index.php'>go to login page</a>";
}
else print "passwords doesnt match";
}
else print"invaild data";
?>
This is the register.php
Very nicely done and formatted! +rep
I believe it will be the last tutorial of 2008
Cosmetic Surgery
Boob Job
There are currently 25 users browsing this thread. (0 members and 25 guests)
Bookmarks