Jump to content

[SOLVED] log in action


Rother2005

Recommended Posts

<?php
include('connect1.inc');?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Booze Cruise Reg</title>

</head>
<body>

<?php
if(!$_POST['register']){echo'<p align="center"><strong>Member Registration</strong></p>
<form name="form1" method="POST" action="">
<p align="center">Username:  <input type="text" name="username"></p>
<p align="center">Password:  <input type="text" name="password"></p>
<p align="center">Firsname:  <input type="text" name="firstname"></p>
<p align="center">Surname:   <input type="text" name="surname"></p>
<p align="center">Address 1: <input type="text" name="address1"></p>
<p align="center">Address 2: <input type="text" name="address2"></p>
<p align="center">Town:      <input type="text" name="town"></p>
<p align="center">County:    <input type="text" name="county"></p>
<p align="center">Postcode:  <input type="text" name="postcode"></p>
<p align="center">Tel No:    <input type="text" name="telno"></p>
<p align="center">Mobile:    <input type="text" name="mobile"></p>
<p align="center">Email:     <input type="text" name="email"></p>
<p align="center"><input type="submit" name="register" value="Enter Details"></p></form>';}

else{$username=$_POST['username'];$password=$_POST['password'];$firstname=$_POST['firstname'];$surname=$_POST['surname'];$address1=$_POST['address1'];$address2=$_POST['address2'];$town=$_POST['town'];$county=$_POST['county'];
$postcode=$_POST['postcode'];$telno=$_POST['telno'];$mobile=$_POST['mobile'];$email=$_POST['email'];

$password = stripslashes($password);
$password = md5($password);

$sql = "INSERT INTO member(Username,Password,Firstname,Surname,Address1,Address2,Town,County,Postcode,TelNo,Mobile,Email)
VALUES ('$username','$password','$firstname','$surname','$address1','$address2','$town','$county','$postcode','$telno','$mobile','$email')";

mysql_query($sql)             

or die(mysql_error());

echo("You are registered! $username");}?> [b]//CAN I DELETE THIS LINE AND GET THE CODE TO GO TO A DIFF PAGE, THEN JUST PUT THAT META TAG ON THE NEW PAGE??[/b]
</body>
</html>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.