PDA

View Full Version : Registration & Login form - dreamweaver 8



Mattie Boy 1
02-01-2007, 08:44 PM
hi,
i need help with my site.
Ive set up all the pages on the list but the registration & login pages,
ive searched google but dont know how to make it work
Plz hlp.

( posted here cos i dunno if it php or somin )

Dentafrice1
02-01-2007, 09:04 PM
Is it just a page with a form on it?

Mattie Boy 1
02-01-2007, 09:11 PM
just like a basic sign up form on a white page, ill make it and host it so u c wat it like

http://www.neropanel.easilydesigned.com/Register.html

jarhead!
02-01-2007, 09:15 PM
Login:


<?
// Login & Session example by sde
// auth.php
// start session
session_start();

// convert username and password from _POST or _SESSION
if($_POST){
$_SESSION['username']=$_POST["username"];
$_SESSION['password']=$_POST["password"];
}

// query for a user/pass match
$result=mysql_query("select * from users
where username='" . $_SESSION['username'] . "' and password='" . $_SESSION['password'] . "'");

// retrieve number of rows resulted
$num=mysql_num_rows($result);

// print login form and exit if failed.
if($num < 1){
echo "<br><br>

<style type=\"text/css\">
<!--
body {
background-color: #006699;
}
-->
</style>
<link href=\"styleuser.css\" rel=\"stylesheet\" type=\"text/css\">
<style type=\"text/css\">
<!--
.style1 {color: #FFFFFF}
-->
</style>

<br>
<br>
<br>
<br>
<br>
<br>
<table width=\"541\" border=\"1\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" bordercolor=\"#000000\">
<tr>
<td bgcolor=\"#07485E\"><table width=\"541\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td><img src=\"images/loginlogo.jpg\" width=\"86\" height=\"38\"></td>
</tr>
<tr>
<td><form action=\"index.php\" method=\"post\">
<br>
<table width=\"301\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td width=\"111\" class=\"unnamed1 style1\">Username:</td>
<td width=\"277\" height=\"23\"><input name=\"username\" type=\"text\" class=\"unnamed1\" size=\"20\"></td>
</tr>
<tr>
<td class=\"unnamed1 style1\">Password:</td>
<td height=\"23\"><input name=\"password\" type=\"password\" class=\"unnamed1\" size=\"20\"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td height=\"23\"><input name=\"submit\" type=submit class=\"unnamed1\"></td>
</tr>
</table>
<br>
</form></td>
</tr>
</table></td>
</tr>
</table>
</body>";

exit;
}
?>

its a bit ewww but it works.

Dentafrice1
02-01-2007, 09:15 PM
www.techtuts.com
www.pixel2life.com

Google a simple members system.

Your going to either neet a PHP or MySQL one.

You can also buy one for 3-5 pounds from xRoyal15.

Its very nice ;)

Want to hide these adverts? Register an account for free!