I have a simple registration form i have writen. It submits the details into a mysql databse.
I have done a few of these now, but this one is being a pain in the ass! When i hit submit, it enters the data correctly, but the user_id field is looped and i end up with thousands of user_id's with no content...
The user id is the primary key and is an auto_increment.
does that make sense?
heres the submit php:
<?php
include 'config.php';
include 'opendb.php';
if(isset($_POST['submit']))
{
$organiser_name = trim($_POST['organiser_name']);
$organiser_surname = trim($_POST['organiser_surname']);
$address_1 = trim($_POST['address_1']);
$address_2 = trim($_POST['address_2']);
$address_3 = trim($_POST['address_3']);
$town = trim($_POST['town']);
$county = trim($_POST['county']);
$postcode = trim($_POST['postcode']);
$organiser_tel = trim($_POST['organiser_tel']);
$organiser_email = trim($_POST['organiser_email']);
$tandc = trim($_POST['tandc']);
$username = trim($_POST['username']);
$password = trim($_POST['password']);
$query = "insert into organiser_users (organiser_name, organiser_surname, address_1, address_2, address_3, town, county, postcode, organiser_tel, organiser_email, tandc, username, password)".
"values ('$organiser_name','$organiser_surname','$address_1','$address_2','$address_3','$town','$county','$postcode','$organiser_tel','$organiser_email','$tandc','$username','$password')";
mysql_query($query) or die ('Error, query failed. ' . mysql_error());
exit;
}
?>
code loop...
Moderator: General Moderators
-
WebbieDave
- Forum Contributor
- Posts: 213
- Joined: Sun Jul 15, 2007 7:07 am
Re: code loop...
Well, your script has no looping constructs. This page must be getting reposted to somehow as $_POST['submit'] is getting set.
Re: code loop...
here's the entire form, it contains two forms, one for login, one for registration:
<?php
// Connects to your Database
include 'lib/config.php';
include 'lib/opendb.php';
//Checks if there is a login cookie
if(isset($_COOKIE['ID_my_site']))
//if there is, it logs you in and directes you to the members page
{
$username = $_COOKIE['ID_my_site'];
$pass = $_COOKIE['Key_my_site'];
$check = mysql_query("SELECT * FROM organiser_users WHERE username = '$username'")or die(mysql_error());
while($info = mysql_fetch_array( $check ))
{
if ($pass != $info['password'])
{
}
else
{
header("Location: organiser.php");
}
}
}
//if the login form is submitted
if (isset($_POST['submit'])) { // if form has been submitted
// makes sure they filled it in
if(!$_POST['username'] | !$_POST['pass']) {
die('Please enter a username and password - <a href=register.php>click here to try again</a>');
}
// checks it against the database
if (!get_magic_quotes_gpc()) {
$_POST['email'] = addslashes($_POST['email']);
}
$check = mysql_query("SELECT * FROM organiser_users WHERE username = '".$_POST['username']."'")or die(mysql_error());
$check2 = mysql_num_rows($check);
if ($check2 == 0) {
die('Invalid user credentials - <a href=register.php>click here to try again</a>');
}
while($info = mysql_fetch_array( $check ))
{
$_POST['pass'] = stripslashes($_POST['pass']);
$info['password'] = stripslashes($info['password']);
$_POST['pass'] = md5($_POST['pass']);
//gives error if the password is wrong
if ($_POST['pass'] != $info['password']) {
die('Incorrect password, please try again.');
}
else
{
// if login is ok then we add a cookie
$_POST['username'] = stripslashes($_POST['username']);
$hour = time() + 1800;
setcookie(ID_my_site, $_POST['username'], $hour);
setcookie(Key_my_site, $_POST['pass'], $hour);
//then redirect them to the members area
header("Location: organiser.php");
}
}
}
else
{
// if they are not logged in
?>
<html>
<head>
<title>Whats On Near Me - the most comprehensive list of whats on in your local area</title>
<link rel=StyleSheet href="css/index.css" type="text/css">
<link rel=StyleSheet href="css/table_events.css" type="text/css">
</head>
<body>
<div align="center">
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td colspan="2">
<div class="header">
<div class="flash">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shoc ... on=6,0,0,0"
width="300" height="120" id="locallife" align="">
<param name=movie value="images/locallife.swf"> <param name=menu value=false> <param name=quality value=high> <param name=bgcolor value=#5454F9> <EMBED src="images/locallife.swf" menu=false quality=high bgcolor=#5454F9 width="300" height="120" name="locallife" align=""
type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>
</object>
</div>
<div class="head_image">
<img src="images/title.gif"><br>
the most comprehensive list of whats on in your local area!
</div>
<div class="nav_bar">
<?php include 'menu.php'; ?>
</div>
</div>
</td>
<td rowspan="2" height="100%">
<div class="shadow"></div>
</td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td valign="top">
<div class="left_bar">
<div class="title">Events Calendar...</div>
<?php
include 'cal.php';
?>
<div class="title">Find Events...</div>
<div class="search">
<form method="get" action="search.php" target="_blank">
Show me all events in<br><br>
<select name="q">
<option value="<?php echo $event_county;?>" SELECTED><?php echo $event_county;?>please select</option>
<option value="Avon">Avon </option><option value="Bedfordshire">Bedfordshire</option><option value="Berkshire">Berkshire</option><option value="Borders">Borders</option><option value="Buckinghamshire">Buckinghamshire</option><option value="Cambridgeshire">Cambridgeshire</option><option value="Central">Central</option><option value="Cheshire">Cheshire</option><option value="Cleveland">Cleveland</option><option value="Clwyd">Clwyd </option><option value="Cornwall">Cornwall </option><option value="County Antrim">County Antrim </option><option value="County Armagh">County Armagh </option><option value="County Down">County Down </option><option value="County Fermanagh">County Fermanagh </option><option value="County Londonderry">County Londonderry </option><option value="County Tyrone">County Tyrone </option><option value="Cumbria">Cumbria </option><option value="Derbyshire">Derbyshire </option><option value="Devon">Devon </option><option value="Dorset">Dorset </option><option value="Dumfries and Galloway">Dumfries and Galloway </option><option value="Durham">Durham</option><option value="Dyfed">Dyfed </option><option value="East Sussex">East Sussex </option><option value="Essex">Essex </option><option value="Fife">Fife </option><option value="Gloucestershire">Gloucestershire </option><option value="Grampian ">Grampian </option>
<option value="Greater Manchester">Greater Manchester </option><option value="Gwent">Gwent </option><option value="Gwynedd County">Gwynedd County </option><option value="Hampshire">Hampshire </option><option value="Herefordshire">Herefordshire </option><option value="Hertfordshire">Hertfordshire </option><option value="Highlands and Islands">Highlands and Islands </option><option value="Humberside">Humberside </option><option value="Isle of Wight">Isle of Wight </option><option value="Kent">Kent </option><option value="Lancashire">Lancashire </option><option value="Leicestershire">Leicestershire </option><option value="Lincolnshire">Lincolnshire </option><option value="Lothian">Lothian </option><option value="Merseyside">Merseyside </option><option value="Mid Glamorgan">Mid Glamorgan </option><option value="Norfolk">Norfolk </option><option value="North Yorkshire">North Yorkshire </option><option value="Northamptonshire">Northamptonshire </option><option value="Northumberland">Northumberland </option><option value="Nottinghamshire">Nottinghamshire </option><option value="Oxfordshire">Oxfordshire </option><option value="Powys">Powys </option><option value="Rutland">Rutland </option><option value="Shropshire">Shropshire </option><option value="Somerset">Somerset </option>
<option value="South Glamorgan">South Glamorgan </option><option value="South Yorkshire">South Yorkshire </option><option value="Staffordshire">Staffordshire </option><option value="Strathclyde">Strathclyde </option><option value="Suffolk">Suffolk </option><option value="Surrey">Surrey </option><option value="Tayside">Tayside </option><option value="Tyne and Wear">Tyne and Wear </option><option value="Warwickshire">Warwickshire </option><option value="West Glamorgan">West Glamorgan </option><option value="West Midlands">West Midlands </option><option value="West Sussex">West Sussex </option><option value="West Yorkshire">West Yorkshire </option><option value="Wiltshire">Wiltshire </option>`<option value="Worcestershire">Worcestershire </option>
<option value="other">Other</option>
</select>
<br><br>
<input type="submit" value="Search">
</form>
</div>
<div class="title">More Information...</div>
<div class="links">
<ul>
<li><a href="about.php">About whatsonnearme</a><br>
<li><a href="contact.php">Contact Us</a><br>
<li><a href="terms.php">Terms & Conditions</a><br>
<li><a href="http://www.localife.co.uk">LocalLife</a><br>
<li><a href="register.php">List Your Event</a><br>
<li><a href="admin_login.php">Admin Login</a>
<li><a href="http://www.corporatewebworks.co.uk">Site by Corporate Web Works</a>
</ul>
</div>
</div>
</td>
<td valign="top">
<div class="main_content">
<br>
<form action="<?php echo $_SERVER['PHP_SELF']?>" method="post">
<table border="0" width="100%" class="main_text">
<tr>
<td colspan=2 align="center">Organiser Login</td>
</tr>
<tr>
<td colspan="2" align="center"><br>Please login to access the organiser features or register below.</td>
</tr>
<tr>
<td colspan="2"><hr></td>
</tr>
<tr>
<td align="right">Username:</td>
<td ><input type="text" name="username" maxlength="40"></td>
</tr>
<tr>
<td align="right">Password:</td>
<td><input type="password" name="pass" maxlength="50"></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" name="submit" value="Login"></td>
</tr>
<tr>
<td colspan="2"><hr></td>
</tr>
</table>
</form>
<form action="lib/register.php" method="post">
<table class="main_text" align="center">
<tr>
<td align="right">Name:</td><td><input type="text" name="organiser_name" maxlength="40"></td>
</tr>
<tr>
<td align="right">Surname:</td><td><input type="text" name="organiser_surname" maxlength="40"></td>
</tr>
<tr>
<td align="right">Address:</td><td><input type="text" name="address_1"></td>
</tr>
<tr>
<td align="right"></td><td><input type="text" name="address_2"></td>
</tr>
<tr>
<td align="right"></td><td><input type="text" name="address_3"></td>
</tr>
<tr>
<td align="right">Town:</td><td><input type="text" name="town"></td>
</tr>
<tr>
<td align="right">County:</td><td><select name="county">
<option value="<?php echo $event_county;?>" SELECTED><?php echo $event_county;?>please select</option>
<option value="Avon">Avon </option><option value="Bedfordshire">Bedfordshire</option><option value="Berkshire">Berkshire</option><option value="Borders">Borders</option><option value="Buckinghamshire">Buckinghamshire</option><option value="Cambridgeshire">Cambridgeshire</option><option value="Central">Central</option><option value="Cheshire">Cheshire</option><option value="Cleveland">Cleveland</option><option value="Clwyd">Clwyd </option><option value="Cornwall">Cornwall </option><option value="County Antrim">County Antrim </option><option value="County Armagh">County Armagh </option><option value="County Down">County Down </option><option value="County Fermanagh">County Fermanagh </option><option value="County Londonderry">County Londonderry </option><option value="County Tyrone">County Tyrone </option><option value="Cumbria">Cumbria </option><option value="Derbyshire">Derbyshire </option><option value="Devon">Devon </option><option value="Dorset">Dorset </option><option value="Dumfries and Galloway">Dumfries and Galloway </option><option value="Durham">Durham</option><option value="Dyfed">Dyfed </option><option value="East Sussex">East Sussex </option><option value="Essex">Essex </option><option value="Fife">Fife </option><option value="Gloucestershire">Gloucestershire </option><option value="Grampian ">Grampian </option>
<option value="Greater Manchester">Greater Manchester </option><option value="Gwent">Gwent </option><option value="Gwynedd County">Gwynedd County </option><option value="Hampshire">Hampshire </option><option value="Herefordshire">Herefordshire </option><option value="Hertfordshire">Hertfordshire </option><option value="Highlands and Islands">Highlands and Islands </option><option value="Humberside">Humberside </option><option value="Isle of Wight">Isle of Wight </option><option value="Kent">Kent </option><option value="Lancashire">Lancashire </option><option value="Leicestershire">Leicestershire </option><option value="Lincolnshire">Lincolnshire </option><option value="Lothian">Lothian </option><option value="Merseyside">Merseyside </option><option value="Mid Glamorgan">Mid Glamorgan </option><option value="Norfolk">Norfolk </option><option value="North Yorkshire">North Yorkshire </option><option value="Northamptonshire">Northamptonshire </option><option value="Northumberland">Northumberland </option><option value="Nottinghamshire">Nottinghamshire </option><option value="Oxfordshire">Oxfordshire </option><option value="Powys">Powys </option><option value="Rutland">Rutland </option><option value="Shropshire">Shropshire </option><option value="Somerset">Somerset </option>
<option value="South Glamorgan">South Glamorgan </option><option value="South Yorkshire">South Yorkshire </option><option value="Staffordshire">Staffordshire </option><option value="Strathclyde">Strathclyde </option><option value="Suffolk">Suffolk </option><option value="Surrey">Surrey </option><option value="Tayside">Tayside </option><option value="Tyne and Wear">Tyne and Wear </option><option value="Warwickshire">Warwickshire </option><option value="West Glamorgan">West Glamorgan </option><option value="West Midlands">West Midlands </option><option value="West Sussex">West Sussex </option><option value="West Yorkshire">West Yorkshire </option><option value="Wiltshire">Wiltshire </option>`<option value="Worcestershire">Worcestershire </option>
<option value="other">Other</option>
</select>
</td>
</tr>
<tr>
<td align="right">Post Code:</td><td><input type="text" name="postcode"></td>
</tr>
<tr>
<td align="right">Email:</td><td><input type="text" name="organiser_email"></td>
</tr>
<tr>
<td align="right">Telephone:</td><td><input type="text" name="organiser_tel"></td>
</tr>
<tr>
<td colspan="2">You agree to the <a href="">terms & conditions</a><input type="checkbox" value="Yes" name="tandc"></td>
</tr>
<tr>
<td>
<br>
</td>
</tr>
<tr>
<td align="right">Username:</td><td><input type="text" name="username"></td>
</tr>
<tr>
<td align="right">Password:</td><td><input type="password" name="password"></td>
</tr>
<tr>
<td align="center" colspan="2"><input type="submit" value="register"></td>
</tr>
</table>
</form>
</div>
</td>
<td valign="top">
<div class="right_bar">
<div class="title">Todays Events...</div>
<div class="todays_events">
<table class='main_text' style="font-size:1em"; width="100%">
<tr>
<td><u>name</td><td><u>location</td><td><u>time</td><td></td>
</tr>
<?php
while($nt1=mysql_fetch_array($rt1)){
echo "<tr>
<td>$nt1[event_name]</td><td>$nt1[town]</td><td>$nt1[event_start_time]</td>
</tr>"
;}
?>
</table>
</div>
<div class="title">Organising an event?</div>
<div class="small_organiser_add">
Get your event listed here <b>free</b> until July 2008!
<br><br>
More than 1200 local events listed every week, viewed by over ??? visitors a month!
<br><br>
<a href="">find out more...</a>
</div>
<div class="title">Featrued Events...</div>
<div class="featured_event_add">
Get eye catching, low-cost advertising for you event.
<br><br>
You can have your event featured, with a picture, on this page, and on all searches in the same catagory!
<br><br>
<a href="">find out more...</a>
</div>
</div>
</td>
<td valign="top" height="100%">
<div class="shadow"></div>
</td>
</tr>
<tr>
<td colspan="3">
<div class="shadow_bottom"></div>
</td>
<td valign="top">
<div class="shadow_corner"></div>
</td>
</tr>
<tr>
<td colspan="3">
<div class="validation" align="right">
<a href="http://www.php.net" target="_blank"><img src="images/php-power-white.gif" alt="powered by php" border="0"></a>
<a href="http://jigsaw.w3.org/css-validator/" target="_blank"><img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss-blue" alt="Valid CSS!" /></a>
</div>
</td>
</tr>
</table>
</div>
</body>
</html>
<?php
}
?>
<?php
// Connects to your Database
include 'lib/config.php';
include 'lib/opendb.php';
//Checks if there is a login cookie
if(isset($_COOKIE['ID_my_site']))
//if there is, it logs you in and directes you to the members page
{
$username = $_COOKIE['ID_my_site'];
$pass = $_COOKIE['Key_my_site'];
$check = mysql_query("SELECT * FROM organiser_users WHERE username = '$username'")or die(mysql_error());
while($info = mysql_fetch_array( $check ))
{
if ($pass != $info['password'])
{
}
else
{
header("Location: organiser.php");
}
}
}
//if the login form is submitted
if (isset($_POST['submit'])) { // if form has been submitted
// makes sure they filled it in
if(!$_POST['username'] | !$_POST['pass']) {
die('Please enter a username and password - <a href=register.php>click here to try again</a>');
}
// checks it against the database
if (!get_magic_quotes_gpc()) {
$_POST['email'] = addslashes($_POST['email']);
}
$check = mysql_query("SELECT * FROM organiser_users WHERE username = '".$_POST['username']."'")or die(mysql_error());
$check2 = mysql_num_rows($check);
if ($check2 == 0) {
die('Invalid user credentials - <a href=register.php>click here to try again</a>');
}
while($info = mysql_fetch_array( $check ))
{
$_POST['pass'] = stripslashes($_POST['pass']);
$info['password'] = stripslashes($info['password']);
$_POST['pass'] = md5($_POST['pass']);
//gives error if the password is wrong
if ($_POST['pass'] != $info['password']) {
die('Incorrect password, please try again.');
}
else
{
// if login is ok then we add a cookie
$_POST['username'] = stripslashes($_POST['username']);
$hour = time() + 1800;
setcookie(ID_my_site, $_POST['username'], $hour);
setcookie(Key_my_site, $_POST['pass'], $hour);
//then redirect them to the members area
header("Location: organiser.php");
}
}
}
else
{
// if they are not logged in
?>
<html>
<head>
<title>Whats On Near Me - the most comprehensive list of whats on in your local area</title>
<link rel=StyleSheet href="css/index.css" type="text/css">
<link rel=StyleSheet href="css/table_events.css" type="text/css">
</head>
<body>
<div align="center">
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td colspan="2">
<div class="header">
<div class="flash">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shoc ... on=6,0,0,0"
width="300" height="120" id="locallife" align="">
<param name=movie value="images/locallife.swf"> <param name=menu value=false> <param name=quality value=high> <param name=bgcolor value=#5454F9> <EMBED src="images/locallife.swf" menu=false quality=high bgcolor=#5454F9 width="300" height="120" name="locallife" align=""
type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>
</object>
</div>
<div class="head_image">
<img src="images/title.gif"><br>
the most comprehensive list of whats on in your local area!
</div>
<div class="nav_bar">
<?php include 'menu.php'; ?>
</div>
</div>
</td>
<td rowspan="2" height="100%">
<div class="shadow"></div>
</td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td valign="top">
<div class="left_bar">
<div class="title">Events Calendar...</div>
<?php
include 'cal.php';
?>
<div class="title">Find Events...</div>
<div class="search">
<form method="get" action="search.php" target="_blank">
Show me all events in<br><br>
<select name="q">
<option value="<?php echo $event_county;?>" SELECTED><?php echo $event_county;?>please select</option>
<option value="Avon">Avon </option><option value="Bedfordshire">Bedfordshire</option><option value="Berkshire">Berkshire</option><option value="Borders">Borders</option><option value="Buckinghamshire">Buckinghamshire</option><option value="Cambridgeshire">Cambridgeshire</option><option value="Central">Central</option><option value="Cheshire">Cheshire</option><option value="Cleveland">Cleveland</option><option value="Clwyd">Clwyd </option><option value="Cornwall">Cornwall </option><option value="County Antrim">County Antrim </option><option value="County Armagh">County Armagh </option><option value="County Down">County Down </option><option value="County Fermanagh">County Fermanagh </option><option value="County Londonderry">County Londonderry </option><option value="County Tyrone">County Tyrone </option><option value="Cumbria">Cumbria </option><option value="Derbyshire">Derbyshire </option><option value="Devon">Devon </option><option value="Dorset">Dorset </option><option value="Dumfries and Galloway">Dumfries and Galloway </option><option value="Durham">Durham</option><option value="Dyfed">Dyfed </option><option value="East Sussex">East Sussex </option><option value="Essex">Essex </option><option value="Fife">Fife </option><option value="Gloucestershire">Gloucestershire </option><option value="Grampian ">Grampian </option>
<option value="Greater Manchester">Greater Manchester </option><option value="Gwent">Gwent </option><option value="Gwynedd County">Gwynedd County </option><option value="Hampshire">Hampshire </option><option value="Herefordshire">Herefordshire </option><option value="Hertfordshire">Hertfordshire </option><option value="Highlands and Islands">Highlands and Islands </option><option value="Humberside">Humberside </option><option value="Isle of Wight">Isle of Wight </option><option value="Kent">Kent </option><option value="Lancashire">Lancashire </option><option value="Leicestershire">Leicestershire </option><option value="Lincolnshire">Lincolnshire </option><option value="Lothian">Lothian </option><option value="Merseyside">Merseyside </option><option value="Mid Glamorgan">Mid Glamorgan </option><option value="Norfolk">Norfolk </option><option value="North Yorkshire">North Yorkshire </option><option value="Northamptonshire">Northamptonshire </option><option value="Northumberland">Northumberland </option><option value="Nottinghamshire">Nottinghamshire </option><option value="Oxfordshire">Oxfordshire </option><option value="Powys">Powys </option><option value="Rutland">Rutland </option><option value="Shropshire">Shropshire </option><option value="Somerset">Somerset </option>
<option value="South Glamorgan">South Glamorgan </option><option value="South Yorkshire">South Yorkshire </option><option value="Staffordshire">Staffordshire </option><option value="Strathclyde">Strathclyde </option><option value="Suffolk">Suffolk </option><option value="Surrey">Surrey </option><option value="Tayside">Tayside </option><option value="Tyne and Wear">Tyne and Wear </option><option value="Warwickshire">Warwickshire </option><option value="West Glamorgan">West Glamorgan </option><option value="West Midlands">West Midlands </option><option value="West Sussex">West Sussex </option><option value="West Yorkshire">West Yorkshire </option><option value="Wiltshire">Wiltshire </option>`<option value="Worcestershire">Worcestershire </option>
<option value="other">Other</option>
</select>
<br><br>
<input type="submit" value="Search">
</form>
</div>
<div class="title">More Information...</div>
<div class="links">
<ul>
<li><a href="about.php">About whatsonnearme</a><br>
<li><a href="contact.php">Contact Us</a><br>
<li><a href="terms.php">Terms & Conditions</a><br>
<li><a href="http://www.localife.co.uk">LocalLife</a><br>
<li><a href="register.php">List Your Event</a><br>
<li><a href="admin_login.php">Admin Login</a>
<li><a href="http://www.corporatewebworks.co.uk">Site by Corporate Web Works</a>
</ul>
</div>
</div>
</td>
<td valign="top">
<div class="main_content">
<br>
<form action="<?php echo $_SERVER['PHP_SELF']?>" method="post">
<table border="0" width="100%" class="main_text">
<tr>
<td colspan=2 align="center">Organiser Login</td>
</tr>
<tr>
<td colspan="2" align="center"><br>Please login to access the organiser features or register below.</td>
</tr>
<tr>
<td colspan="2"><hr></td>
</tr>
<tr>
<td align="right">Username:</td>
<td ><input type="text" name="username" maxlength="40"></td>
</tr>
<tr>
<td align="right">Password:</td>
<td><input type="password" name="pass" maxlength="50"></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" name="submit" value="Login"></td>
</tr>
<tr>
<td colspan="2"><hr></td>
</tr>
</table>
</form>
<form action="lib/register.php" method="post">
<table class="main_text" align="center">
<tr>
<td align="right">Name:</td><td><input type="text" name="organiser_name" maxlength="40"></td>
</tr>
<tr>
<td align="right">Surname:</td><td><input type="text" name="organiser_surname" maxlength="40"></td>
</tr>
<tr>
<td align="right">Address:</td><td><input type="text" name="address_1"></td>
</tr>
<tr>
<td align="right"></td><td><input type="text" name="address_2"></td>
</tr>
<tr>
<td align="right"></td><td><input type="text" name="address_3"></td>
</tr>
<tr>
<td align="right">Town:</td><td><input type="text" name="town"></td>
</tr>
<tr>
<td align="right">County:</td><td><select name="county">
<option value="<?php echo $event_county;?>" SELECTED><?php echo $event_county;?>please select</option>
<option value="Avon">Avon </option><option value="Bedfordshire">Bedfordshire</option><option value="Berkshire">Berkshire</option><option value="Borders">Borders</option><option value="Buckinghamshire">Buckinghamshire</option><option value="Cambridgeshire">Cambridgeshire</option><option value="Central">Central</option><option value="Cheshire">Cheshire</option><option value="Cleveland">Cleveland</option><option value="Clwyd">Clwyd </option><option value="Cornwall">Cornwall </option><option value="County Antrim">County Antrim </option><option value="County Armagh">County Armagh </option><option value="County Down">County Down </option><option value="County Fermanagh">County Fermanagh </option><option value="County Londonderry">County Londonderry </option><option value="County Tyrone">County Tyrone </option><option value="Cumbria">Cumbria </option><option value="Derbyshire">Derbyshire </option><option value="Devon">Devon </option><option value="Dorset">Dorset </option><option value="Dumfries and Galloway">Dumfries and Galloway </option><option value="Durham">Durham</option><option value="Dyfed">Dyfed </option><option value="East Sussex">East Sussex </option><option value="Essex">Essex </option><option value="Fife">Fife </option><option value="Gloucestershire">Gloucestershire </option><option value="Grampian ">Grampian </option>
<option value="Greater Manchester">Greater Manchester </option><option value="Gwent">Gwent </option><option value="Gwynedd County">Gwynedd County </option><option value="Hampshire">Hampshire </option><option value="Herefordshire">Herefordshire </option><option value="Hertfordshire">Hertfordshire </option><option value="Highlands and Islands">Highlands and Islands </option><option value="Humberside">Humberside </option><option value="Isle of Wight">Isle of Wight </option><option value="Kent">Kent </option><option value="Lancashire">Lancashire </option><option value="Leicestershire">Leicestershire </option><option value="Lincolnshire">Lincolnshire </option><option value="Lothian">Lothian </option><option value="Merseyside">Merseyside </option><option value="Mid Glamorgan">Mid Glamorgan </option><option value="Norfolk">Norfolk </option><option value="North Yorkshire">North Yorkshire </option><option value="Northamptonshire">Northamptonshire </option><option value="Northumberland">Northumberland </option><option value="Nottinghamshire">Nottinghamshire </option><option value="Oxfordshire">Oxfordshire </option><option value="Powys">Powys </option><option value="Rutland">Rutland </option><option value="Shropshire">Shropshire </option><option value="Somerset">Somerset </option>
<option value="South Glamorgan">South Glamorgan </option><option value="South Yorkshire">South Yorkshire </option><option value="Staffordshire">Staffordshire </option><option value="Strathclyde">Strathclyde </option><option value="Suffolk">Suffolk </option><option value="Surrey">Surrey </option><option value="Tayside">Tayside </option><option value="Tyne and Wear">Tyne and Wear </option><option value="Warwickshire">Warwickshire </option><option value="West Glamorgan">West Glamorgan </option><option value="West Midlands">West Midlands </option><option value="West Sussex">West Sussex </option><option value="West Yorkshire">West Yorkshire </option><option value="Wiltshire">Wiltshire </option>`<option value="Worcestershire">Worcestershire </option>
<option value="other">Other</option>
</select>
</td>
</tr>
<tr>
<td align="right">Post Code:</td><td><input type="text" name="postcode"></td>
</tr>
<tr>
<td align="right">Email:</td><td><input type="text" name="organiser_email"></td>
</tr>
<tr>
<td align="right">Telephone:</td><td><input type="text" name="organiser_tel"></td>
</tr>
<tr>
<td colspan="2">You agree to the <a href="">terms & conditions</a><input type="checkbox" value="Yes" name="tandc"></td>
</tr>
<tr>
<td>
<br>
</td>
</tr>
<tr>
<td align="right">Username:</td><td><input type="text" name="username"></td>
</tr>
<tr>
<td align="right">Password:</td><td><input type="password" name="password"></td>
</tr>
<tr>
<td align="center" colspan="2"><input type="submit" value="register"></td>
</tr>
</table>
</form>
</div>
</td>
<td valign="top">
<div class="right_bar">
<div class="title">Todays Events...</div>
<div class="todays_events">
<table class='main_text' style="font-size:1em"; width="100%">
<tr>
<td><u>name</td><td><u>location</td><td><u>time</td><td></td>
</tr>
<?php
while($nt1=mysql_fetch_array($rt1)){
echo "<tr>
<td>$nt1[event_name]</td><td>$nt1[town]</td><td>$nt1[event_start_time]</td>
</tr>"
;}
?>
</table>
</div>
<div class="title">Organising an event?</div>
<div class="small_organiser_add">
Get your event listed here <b>free</b> until July 2008!
<br><br>
More than 1200 local events listed every week, viewed by over ??? visitors a month!
<br><br>
<a href="">find out more...</a>
</div>
<div class="title">Featrued Events...</div>
<div class="featured_event_add">
Get eye catching, low-cost advertising for you event.
<br><br>
You can have your event featured, with a picture, on this page, and on all searches in the same catagory!
<br><br>
<a href="">find out more...</a>
</div>
</div>
</td>
<td valign="top" height="100%">
<div class="shadow"></div>
</td>
</tr>
<tr>
<td colspan="3">
<div class="shadow_bottom"></div>
</td>
<td valign="top">
<div class="shadow_corner"></div>
</td>
</tr>
<tr>
<td colspan="3">
<div class="validation" align="right">
<a href="http://www.php.net" target="_blank"><img src="images/php-power-white.gif" alt="powered by php" border="0"></a>
<a href="http://jigsaw.w3.org/css-validator/" target="_blank"><img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss-blue" alt="Valid CSS!" /></a>
</div>
</td>
</tr>
</table>
</div>
</body>
</html>
<?php
}
?>
-
WebbieDave
- Forum Contributor
- Posts: 213
- Joined: Sun Jul 15, 2007 7:07 am
Re: code loop...
Well, the code in question would seem to be lib/register.php. Double check the part of the code that is performing the insert.