<? include("includes/connect.php");?>
<title>Pulse-Box Tester</title>
<link rel="stylesheet" href="assets/css/style.css" type="text/css" media="all" />
</head>
<body>
<div id="wrapper">
<?php include ('header.php'); ?>
<div id="nav"></div>
<?php include ('leftbar.php'); ?>
<div id="right">
<div id="right">
<?PHP session_start();?>
<? include("includes/connect.php");?>
<? if($_SESSION['logged_in'] == 'Yes') { ?>
<script type="text/JavaScript">window.location="index.php";</script>
<? } else { ?>
<?//#########################################################//?>
<? if($_POST['submit']) { ?>
<?
$fullname=$_POST['fullname'];
$email=$_POST['email'];
$username=$_POST['username'];
$password=$_POST['password'];
?>
<? if(!$fullname) { ?>
Please enter your fullname.
<? } else if(!$email) { ?>
Please enter an email address.
<? } else if(!$username) { ?>
Please enter a username.
<? } else if(!$password) { ?>
Please enter a password.
<? } else { ?>
<?
$new = "INSERT INTO `members` (`ip`, `fullname`, `email`, `username`, `password`)
VALUES ('127.0.0.1', '$fullname', '$email', '$username', '$password')";
mysql_query($new) or die(mysql_error());
?>
<div id="right">
<h1><font size="2">Registration Success</font></h1>
<p>
Thank you for registering with us, your accouunt has sucessfully been created, </ br>
Please click <a href="index.php">here</a> to be returned to home page.
</div>
</div>
<? } ?>
<? } else { ?>
<h1><font size="2">Register your free user account!</font></h1>
<table cellpadding="0" cellspacing="0" border="0">
<p>
<tr>
<td><p><font size="2pt">Username</font></p></td>
<td> <input type="text" name="username" id="username" value=""> </td>
</tr>
<tr>
<td><p><font size="2pt">Password</font></p></td>
<td> <input type="password" name="password" id="password" value=""> </td>
</tr>
<tr>
<td><p><font size="2pt">Full Name</font></p></td>
<td> <input type="text" name="fullname" id="fullname" value=""> </td>
</tr>
<tr>
<td><p><font size="2pt">Email</font></p></td>
<td> <input type="text" name="email" id="email" value=""> </td>
</tr>
<tr><td colspan=""> <br><input type="submit" name="submit" id="submit" value="Register!">
</table>
</form>
<br>
<b><i>*All fields above have to be filled in otherwise you will not be able to sign up!*</b></i>
<? } ?>
<?//#########################################################//?>
<? } ?>
</div>
</div>
<?php include ('footer.php'); ?>
</body>
Bookmarks