GIDForums

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 14-Apr-2008, 09:21
oggie oggie is offline
New Member
 
Join Date: Nov 2007
Location: tattershall, UK
Posts: 23
oggie is on a distinguished road
Question

session error


This is the code I have got. And I included the syntax error that keeps coming up. I have no idea's.

PHP Code:

// start output buffering.
ob_start();
// Initialise a session.
session_start()
[color="red"]$_SESSION['sid'] = "sid"; this is line 8[/color]
setcookie("sid", sid, time()+3600);
setcookie("sid", $_GET["uname"], time()+3600);
$CheckInTime = Time();
$query="INSERT INTO `NetImOn` (`U_Name`, `LoginTime`, `SessionId`) VALUES ('".$_GET["uname"]."', '".$CheckInTime."', '".session_id()."')"  or die(mysql_error()); 
mysql_query($query); 



Parse error: syntax error, unexpected T_VARIABLE in /home/ogl10b7/public_html/EricsCarRepairs/includes/header.html on line 8


any solutions why

Ian
Last edited by LuciWiz : 15-Apr-2008 at 12:29. Reason: Please insert your Php code between [php] & [/php] tags
  #2  
Old 14-Apr-2008, 12:07
TurboPT's Avatar
TurboPT TurboPT is online now
Regular Member
 
Join Date: Feb 2006
Location: Atlanta, GA
Posts: 871
TurboPT is a jewel in the roughTurboPT is a jewel in the roughTurboPT is a jewel in the rough

Re: session error


hint: what's missing on the previous line?
__________________
Use the force...read the source!!
WYCIWYG -- what you code is what you get!
  #3  
Old 15-Apr-2008, 10:23
oggie oggie is offline
New Member
 
Join Date: Nov 2007
Location: tattershall, UK
Posts: 23
oggie is on a distinguished road
Smile

Re: session error


hi sorted out now thanx. I am now trying to get this connected to the database but am getting this error now. Any ideas and solutions...


this is the code
PHP Code:

<?php
 
// Initialise a session.
 
# register.php
// This is the registration page for the site.
 
// Include the config file for error management and such.
require_once ('includes/config.inc.php');
 
// Set the page title and include the HTML header.
$page_title = 'Register';
include ('includes/header.php');
 
if (isset($_POST['submitted'])) { // Handle the form.
 
require_once ('includes/mysqlconnect.php'); // Connect to the database.
 
// Check for a fisrt name.
if (preg_match ('^[[:alpha:]\.\'\-]{2,15}$', stripslashes(trim($_POST['first_name'])))) {
$fn = escape_data($_POST['first_name']);
} else {
$fn = FALSE;
echo '<p><font color="red" size="+1">Please enter your first name!</font></p>';
}
 
// Check for a last name.
if (preg_match ('^[[:alpaha:]\.\'\-]{2,30}$', stripslashes(trim($_POST['last_name'])))) {
$ln = escape_data($_POST['last_name']);
} else {
$ln = FALSE;
echo '<p><font color="red" size="+1">Please enter your last name!</font></p>';
}
 
// Check for an email address.
if (preg_match ('^[[:alnum:]][a-z0-9_\.\-]*@[a-z0-9\.\-]+\.[a-z]{2,4}$', stripslashes(trim($POST['email'])))) {
$e = escape_data($_POST['email']);
} else {
$e = FALSE;
echo '<p><font color="red" size="+1">Please enter a valid email address!</font></p>';
}
 
// Check for a password and math against the confirmed password.
if (preg_match('^[[:alnum:]]{4,20}$', stripslashes(trim($_POST['password1'])))) {
if ($_POST['password1'] == $_POST['password2']) { 
$p = escape_data($_POST['password1']);
} else {
$p = FALSE;
echo '<p><font color="red" size="+1">Your password did not match the confirmed password!</font></p>';
}
} else {
$p = FALSE;
echo '<p><font color="red" size="+1">Please enter a valid password!</font></p>';
}
 
if ($fn && $ln && $e && $p) { // If everything's OK.
 
// Make sure the email address is available.
$query = "SELECT user_id FROM register WHERE email='$e'";
$result = mysql_query ($query) or trigger_error("Query: $query\n<br />MySQL ERROR: " . mysql_error());
 
if (mysql_num_rows($result) == 0) { // Available.
 
// Create the activation code.
$a = md5(uniqid(rand(), true));
 
// Add the user.
$query = "INSERT INTO register (email, pass, first_name, last_name, registration_date) VALUES ('$e', SHA('$p'), '$fn', '$ln', '$a', NOW()";
$result = mysql_query ($query) or trigger_error("QUERY: $query\n<br />MySQL ERROR:" . mysql_error());
 
if (mysql_affected_rows() == 1) { // If it ran OK.
 
// Send the email.
$body = "Thankyou for registering. To activate your account, please click on this link:\n\n";
$body .="http://www.whateveraddressyouwantthere.com/activate.php?x=" . mysql_insert_id() . "&y=$a";
mail($_POST['email'],'Registration confirmation',$body);
 
// Finish the page.
echo '<h3>Thankyou for registering! A confirmation email has been sent to your address. Please click on the link in that the email in order to activate your account.</h3>';
include ('includes/footer.html'); // Include the HTML footer.
exit();
 
} else { // If it did not run OK.
echo '<p><font color="red" size="+1">You could not be registerd due to a system error. We apologize for any inconvenience.</font></p>';
}
 
} else { // The email address is not available.
echo '<p><font color="red" size="+1"> That email has already been registered. If you have forgotten your password, use the link to have your password sent to you.</font></p>';
}
 
} else { // If one of the data testa failed.
echo '<p><font color="red" size="+1">Please try again.</font></p>';
}
 
mysql_close(); // Close the database connection.
 
} // End of the main submit conditional.
?>
 
<h1>Register</h1>
<form action="register.php" method="post">
<fieldset>
 
<p><b>First Name:</b> <input type="text" name="first_name" size="15" maxlength="15" value="<?php if (isset($_POST['first_name'])) echo $_POST['first_name']; ?>" /> </p>
 
<p><b>Last Name:</b> <input type="text" name="last_name" size="30" maxlength="30" value="<?php if (isset($_POST['last_name'])) echo $_POST['last_name']; ?>" /> </p>
 
<p><b>Email:</b> <input type="text" name="email" size="40" maxlength="40" value="<?php if (isset($_POST['email'])) echo $_POST['email']; ?>" /> </p>
 
<p><b>Password:</b> <input type="password" name="password1" size="20" maxlength="20" /><small>Use only letters and numbers. Must be between 4 and 20 characters long</small></p>
 
<p><b>Confirm Password:</b> <input type="password" name="password2" size="20" maxlength="20" /></p>
</fieldset>
 
<div align="center"><input type="submit" name="submit" value="Register" /></div>
<input type="hidden" name="submitted" value="TRUE" />
 
</form>
 
<?php // Include the HTML footer.
include ('includes/footer.php')
?>



this is what I am getting.
User Registration
An error occurred in script '/home/ogl10b7/public_html/EricsCarRepairs/register.php' on line 20:
preg_match() [function.preg-match]: No ending delimiter '^' found
Date/Time: 4-15-200817:01:47

Array
(
[GLOBALS] => Array
*RECURSION*
[_ENV] => Array
(
[PATH] => /usr/local/bin:/usr/bin:/bin
[PWD] => /
[LANG] => C
[SHLVL] => 1
[_] => /usr/sbin/apache2
)

[HTTP_ENV_VARS] => Array
(
[PATH] => /usr/local/bin:/usr/bin:/bin
[PWD] => /
[LANG] => C
[SHLVL] => 1
[_] => /usr/sbin/apache2
)

[_POST] => Array
(
[first_name] => Ian
[last_name] => Oglesby
[email] => ian.oglesby1@btinternet.com
[password1] => hannah10
[password2] => hannah10
[submit] => Register
[submitted] => TRUE
)

[HTTP_POST_VARS] => Array
(
[first_name] => Ian
[last_name] => Oglesby
[email] => ian.oglesby1@btinternet.com
[password1] => hannah10
[password2] => hannah10
[submit] => Register
[submitted] => TRUE
)

[_GET] => Array
(
)

[HTTP_GET_VARS] => Array
(
)

[_COOKIE] => Array
(
[PHPSESSID] => 72b02f15f1f796b3e667476791390954
)

[HTTP_COOKIE_VARS] => Array
(
[PHPSESSID] => 72b02f15f1f796b3e667476791390954
)

[_SERVER] => Array
(
[HTTP_ACCEPT] => image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
[HTTP_REFERER] => http://loki.computing.boston.ac.uk/~ogl10b7/EricsCarRepairs/register.php
[HTTP_ACCEPT_LANGUAGE] => en-gb
[CONTENT_TYPE] => application/x-www-form-urlencoded
[HTTP_UA_CPU] => x86
[HTTP_ACCEPT_ENCODING] => gzip, deflate
[HTTP_USER_AGENT] => Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; InfoPath.2)
[HTTP_HOST] => loki.computing.boston.ac.uk
[CONTENT_LENGTH] => 135
[HTTP_CONNECTION] => Keep-Alive
[HTTP_CACHE_CONTROL] => no-cache
[HTTP_COOKIE] => PHPSESSID=72b02f15f1f796b3e667476791390954
[PATH] => /usr/local/bin:/usr/bin:/bin
[SERVER_SIGNATURE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 Server at loki.computing.boston.ac.uk Port 80

[SERVER_SOFTWARE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8
[SERVER_NAME] => loki.computing.boston.ac.uk
[SERVER_ADDR] => 217.40.221.251
[SERVER_PORT] => 80
[REMOTE_ADDR] => 86.162.15.192
[DOCUMENT_ROOT] => /var/www/
[SERVER_ADMIN] => webmaster@localhost
[SCRIPT_FILENAME] => /home/ogl10b7/public_html/EricsCarRepairs/register.php
[REMOTE_PORT] => 53330
[GATEWAY_INTERFACE] => CGI/1.1
[SERVER_PROTOCOL] => HTTP/1.1
[REQUEST_METHOD] => POST
[QUERY_STRING] =>
[REQUEST_URI] => /~ogl10b7/EricsCarRepairs/register.php
[SCRIPT_NAME] => /~ogl10b7/EricsCarRepairs/register.php
[PHP_SELF] => /~ogl10b7/EricsCarRepairs/register.php
[REQUEST_TIME] => 1208275307
[argv] => Array
(
)

[argc] => 0
)

[HTTP_SERVER_VARS] => Array
(
[HTTP_ACCEPT] => image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
[HTTP_REFERER] => http://loki.computing.boston.ac.uk/~ogl10b7/EricsCarRepairs/register.php
[HTTP_ACCEPT_LANGUAGE] => en-gb
[CONTENT_TYPE] => application/x-www-form-urlencoded
[HTTP_UA_CPU] => x86
[HTTP_ACCEPT_ENCODING] => gzip, deflate
[HTTP_USER_AGENT] => Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; InfoPath.2)
[HTTP_HOST] => loki.computing.boston.ac.uk
[CONTENT_LENGTH] => 135
[HTTP_CONNECTION] => Keep-Alive
[HTTP_CACHE_CONTROL] => no-cache
[HTTP_COOKIE] => PHPSESSID=72b02f15f1f796b3e667476791390954
[PATH] => /usr/local/bin:/usr/bin:/bin
[SERVER_SIGNATURE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 Server at loki.computing.boston.ac.uk Port 80

[SERVER_SOFTWARE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8
[SERVER_NAME] => loki.computing.boston.ac.uk
[SERVER_ADDR] => 217.40.221.251
[SERVER_PORT] => 80
[REMOTE_ADDR] => 86.162.15.192
[DOCUMENT_ROOT] => /var/www/
[SERVER_ADMIN] => webmaster@localhost
[SCRIPT_FILENAME] => /home/ogl10b7/public_html/EricsCarRepairs/register.php
[REMOTE_PORT] => 53330
[GATEWAY_INTERFACE] => CGI/1.1
[SERVER_PROTOCOL] => HTTP/1.1
[REQUEST_METHOD] => POST
[QUERY_STRING] =>
[REQUEST_URI] => /~ogl10b7/EricsCarRepairs/register.php
[SCRIPT_NAME] => /~ogl10b7/EricsCarRepairs/register.php
[PHP_SELF] => /~ogl10b7/EricsCarRepairs/register.php
[REQUEST_TIME] => 1208275307
[argv] => Array
(
)

[argc] => 0
)

[_FILES] => Array
(
)

[HTTP_POST_FILES] => Array
(
)

[_REQUEST] => Array
(
[first_name] => Ian
[last_name] => Oglesby
[email] => ian.oglesby1@btinternet.com
[password1] => hannah10
[password2] => hannah10
[submit] => Register
[submitted] => TRUE
[PHPSESSID] => 72b02f15f1f796b3e667476791390954
)

[live] =>
[email] => InsertRealAddressHere
[page_title] => Register
[_SESSION] => Array
(
[sid] => sid
)

[dbc] => Resource id #5
)




Please enter your first name!

An error occurred in script '/home/ogl10b7/public_html/EricsCarRepairs/register.php' on line 28:
preg_match() [function.preg-match]: No ending delimiter '^' found
Date/Time: 4-15-200817:01:47

Array
(
[GLOBALS] => Array
*RECURSION*
[_ENV] => Array
(
[PATH] => /usr/local/bin:/usr/bin:/bin
[PWD] => /
[LANG] => C
[SHLVL] => 1
[_] => /usr/sbin/apache2
)

[HTTP_ENV_VARS] => Array
(
[PATH] => /usr/local/bin:/usr/bin:/bin
[PWD] => /
[LANG] => C
[SHLVL] => 1
[_] => /usr/sbin/apache2
)

[_POST] => Array
(
[first_name] => Ian
[last_name] => Oglesby
[email] => ian.oglesby1@btinternet.com
[password1] => hannah10
[password2] => hannah10
[submit] => Register
[submitted] => TRUE
)

[HTTP_POST_VARS] => Array
(
[first_name] => Ian
[last_name] => Oglesby
[email] => ian.oglesby1@btinternet.com
[password1] => hannah10
[password2] => hannah10
[submit] => Register
[submitted] => TRUE
)

[_GET] => Array
(
)

[HTTP_GET_VARS] => Array
(
)

[_COOKIE] => Array
(
[PHPSESSID] => 72b02f15f1f796b3e667476791390954
)

[HTTP_COOKIE_VARS] => Array
(
[PHPSESSID] => 72b02f15f1f796b3e667476791390954
)

[_SERVER] => Array
(
[HTTP_ACCEPT] => image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
[HTTP_REFERER] => http://loki.computing.boston.ac.uk/~ogl10b7/EricsCarRepairs/register.php
[HTTP_ACCEPT_LANGUAGE] => en-gb
[CONTENT_TYPE] => application/x-www-form-urlencoded
[HTTP_UA_CPU] => x86
[HTTP_ACCEPT_ENCODING] => gzip, deflate
[HTTP_USER_AGENT] => Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; InfoPath.2)
[HTTP_HOST] => loki.computing.boston.ac.uk
[CONTENT_LENGTH] => 135
[HTTP_CONNECTION] => Keep-Alive
[HTTP_CACHE_CONTROL] => no-cache
[HTTP_COOKIE] => PHPSESSID=72b02f15f1f796b3e667476791390954
[PATH] => /usr/local/bin:/usr/bin:/bin
[SERVER_SIGNATURE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 Server at loki.computing.boston.ac.uk Port 80

[SERVER_SOFTWARE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8
[SERVER_NAME] => loki.computing.boston.ac.uk
[SERVER_ADDR] => 217.40.221.251
[SERVER_PORT] => 80
[REMOTE_ADDR] => 86.162.15.192
[DOCUMENT_ROOT] => /var/www/
[SERVER_ADMIN] => webmaster@localhost
[SCRIPT_FILENAME] => /home/ogl10b7/public_html/EricsCarRepairs/register.php
[REMOTE_PORT] => 53330
[GATEWAY_INTERFACE] => CGI/1.1
[SERVER_PROTOCOL] => HTTP/1.1
[REQUEST_METHOD] => POST
[QUERY_STRING] =>
[REQUEST_URI] => /~ogl10b7/EricsCarRepairs/register.php
[SCRIPT_NAME] => /~ogl10b7/EricsCarRepairs/register.php
[PHP_SELF] => /~ogl10b7/EricsCarRepairs/register.php
[REQUEST_TIME] => 1208275307
[argv] => Array
(
)

[argc] => 0
)

[HTTP_SERVER_VARS] => Array
(
[HTTP_ACCEPT] => image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
[HTTP_REFERER] => http://loki.computing.boston.ac.uk/~ogl10b7/EricsCarRepairs/register.php
[HTTP_ACCEPT_LANGUAGE] => en-gb
[CONTENT_TYPE] => application/x-www-form-urlencoded
[HTTP_UA_CPU] => x86
[HTTP_ACCEPT_ENCODING] => gzip, deflate
[HTTP_USER_AGENT] => Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; InfoPath.2)
[HTTP_HOST] => loki.computing.boston.ac.uk
[CONTENT_LENGTH] => 135
[HTTP_CONNECTION] => Keep-Alive
[HTTP_CACHE_CONTROL] => no-cache
[HTTP_COOKIE] => PHPSESSID=72b02f15f1f796b3e667476791390954
[PATH] => /usr/local/bin:/usr/bin:/bin
[SERVER_SIGNATURE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 Server at loki.computing.boston.ac.uk Port 80

[SERVER_SOFTWARE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8
[SERVER_NAME] => loki.computing.boston.ac.uk
[SERVER_ADDR] => 217.40.221.251
[SERVER_PORT] => 80
[REMOTE_ADDR] => 86.162.15.192
[DOCUMENT_ROOT] => /var/www/
[SERVER_ADMIN] => webmaster@localhost
[SCRIPT_FILENAME] => /home/ogl10b7/public_html/EricsCarRepairs/register.php
[REMOTE_PORT] => 53330
[GATEWAY_INTERFACE] => CGI/1.1
[SERVER_PROTOCOL] => HTTP/1.1
[REQUEST_METHOD] => POST
[QUERY_STRING] =>
[REQUEST_URI] => /~ogl10b7/EricsCarRepairs/register.php
[SCRIPT_NAME] => /~ogl10b7/EricsCarRepairs/register.php
[PHP_SELF] => /~ogl10b7/EricsCarRepairs/register.php
[REQUEST_TIME] => 1208275307
[argv] => Array
(
)

[argc] => 0
)

[_FILES] => Array
(
)

[HTTP_POST_FILES] => Array
(
)

[_REQUEST] => Array
(
[first_name] => Ian
[last_name] => Oglesby
[email] => ian.oglesby1@btinternet.com
[password1] => hannah10
[password2] => hannah10
[submit] => Register
[submitted] => TRUE
[PHPSESSID] => 72b02f15f1f796b3e667476791390954
)

[live] =>
[email] => InsertRealAddressHere
[page_title] => Register
[_SESSION] => Array
(
[sid] => sid
)

[dbc] => Resource id #5
[fn] =>
)




Please enter your last name!

An error occurred in script '/home/ogl10b7/public_html/EricsCarRepairs/register.php' on line 36:
Undefined variable: POST
Date/Time: 4-15-200817:01:47

Array
(
[GLOBALS] => Array
*RECURSION*
[_ENV] => Array
(
[PATH] => /usr/local/bin:/usr/bin:/bin
[PWD] => /
[LANG] => C
[SHLVL] => 1
[_] => /usr/sbin/apache2
)

[HTTP_ENV_VARS] => Array
(
[PATH] => /usr/local/bin:/usr/bin:/bin
[PWD] => /
[LANG] => C
[SHLVL] => 1
[_] => /usr/sbin/apache2
)

[_POST] => Array
(
[first_name] => Ian
[last_name] => Oglesby
[email] => ian.oglesby1@btinternet.com
[password1] => hannah10
[password2] => hannah10
[submit] => Register
[submitted] => TRUE
)

[HTTP_POST_VARS] => Array
(
[first_name] => Ian
[last_name] => Oglesby
[email] => ian.oglesby1@btinternet.com
[password1] => hannah10
[password2] => hannah10
[submit] => Register
[submitted] => TRUE
)

[_GET] => Array
(
)

[HTTP_GET_VARS] => Array
(
)

[_COOKIE] => Array
(
[PHPSESSID] => 72b02f15f1f796b3e667476791390954
)

[HTTP_COOKIE_VARS] => Array
(
[PHPSESSID] => 72b02f15f1f796b3e667476791390954
)

[_SERVER] => Array
(
[HTTP_ACCEPT] => image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
[HTTP_REFERER] => http://loki.computing.boston.ac.uk/~ogl10b7/EricsCarRepairs/register.php
[HTTP_ACCEPT_LANGUAGE] => en-gb
[CONTENT_TYPE] => application/x-www-form-urlencoded
[HTTP_UA_CPU] => x86
[HTTP_ACCEPT_ENCODING] => gzip, deflate
[HTTP_USER_AGENT] => Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; InfoPath.2)
[HTTP_HOST] => loki.computing.boston.ac.uk
[CONTENT_LENGTH] => 135
[HTTP_CONNECTION] => Keep-Alive
[HTTP_CACHE_CONTROL] => no-cache
[HTTP_COOKIE] => PHPSESSID=72b02f15f1f796b3e667476791390954
[PATH] => /usr/local/bin:/usr/bin:/bin
[SERVER_SIGNATURE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 Server at loki.computing.boston.ac.uk Port 80

[SERVER_SOFTWARE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8
[SERVER_NAME] => loki.computing.boston.ac.uk
[SERVER_ADDR] => 217.40.221.251
[SERVER_PORT] => 80
[REMOTE_ADDR] => 86.162.15.192
[DOCUMENT_ROOT] => /var/www/
[SERVER_ADMIN] => webmaster@localhost
[SCRIPT_FILENAME] => /home/ogl10b7/public_html/EricsCarRepairs/register.php
[REMOTE_PORT] => 53330
[GATEWAY_INTERFACE] => CGI/1.1
[SERVER_PROTOCOL] => HTTP/1.1
[REQUEST_METHOD] => POST
[QUERY_STRING] =>
[REQUEST_URI] => /~ogl10b7/EricsCarRepairs/register.php
[SCRIPT_NAME] => /~ogl10b7/EricsCarRepairs/register.php
[PHP_SELF] => /~ogl10b7/EricsCarRepairs/register.php
[REQUEST_TIME] => 1208275307
[argv] => Array
(
)

[argc] => 0
)

[HTTP_SERVER_VARS] => Array
(
[HTTP_ACCEPT] => image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
[HTTP_REFERER] => http://loki.computing.boston.ac.uk/~ogl10b7/EricsCarRepairs/register.php
[HTTP_ACCEPT_LANGUAGE] => en-gb
[CONTENT_TYPE] => application/x-www-form-urlencoded
[HTTP_UA_CPU] => x86
[HTTP_ACCEPT_ENCODING] => gzip, deflate
[HTTP_USER_AGENT] => Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; InfoPath.2)
[HTTP_HOST] => loki.computing.boston.ac.uk
[CONTENT_LENGTH] => 135
[HTTP_CONNECTION] => Keep-Alive
[HTTP_CACHE_CONTROL] => no-cache
[HTTP_COOKIE] => PHPSESSID=72b02f15f1f796b3e667476791390954
[PATH] => /usr/local/bin:/usr/bin:/bin
[SERVER_SIGNATURE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 Server at loki.computing.boston.ac.uk Port 80

[SERVER_SOFTWARE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8
[SERVER_NAME] => loki.computing.boston.ac.uk
[SERVER_ADDR] => 217.40.221.251
[SERVER_PORT] => 80
[REMOTE_ADDR] => 86.162.15.192
[DOCUMENT_ROOT] => /var/www/
[SERVER_ADMIN] => webmaster@localhost
[SCRIPT_FILENAME] => /home/ogl10b7/public_html/EricsCarRepairs/register.php
[REMOTE_PORT] => 53330
[GATEWAY_INTERFACE] => CGI/1.1
[SERVER_PROTOCOL] => HTTP/1.1
[REQUEST_METHOD] => POST
[QUERY_STRING] =>
[REQUEST_URI] => /~ogl10b7/EricsCarRepairs/register.php
[SCRIPT_NAME] => /~ogl10b7/EricsCarRepairs/register.php
[PHP_SELF] => /~ogl10b7/EricsCarRepairs/register.php
[REQUEST_TIME] => 1208275307
[argv] => Array
(
)

[argc] => 0
)

[_FILES] => Array
(
)

[HTTP_POST_FILES] => Array
(
)

[_REQUEST] => Array
(
[first_name] => Ian
[last_name] => Oglesby
[email] => ian.oglesby1@btinternet.com
[password1] => hannah10
[password2] => hannah10
[submit] => Register
[submitted] => TRUE
[PHPSESSID] => 72b02f15f1f796b3e667476791390954
)

[live] =>
[email] => InsertRealAddressHere
[page_title] => Register
[_SESSION] => Array
(
[sid] => sid
)

[dbc] => Resource id #5
[fn] =>
[ln] =>
)



An error occurred in script '/home/ogl10b7/public_html/EricsCarRepairs/register.php' on line 36:
preg_match() [function.preg-match]: No ending delimiter '^' found
Date/Time: 4-15-200817:01:47

Array
(
[GLOBALS] => Array
*RECURSION*
[_ENV] => Array
(
[PATH] => /usr/local/bin:/usr/bin:/bin
[PWD] => /
[LANG] => C
[SHLVL] => 1
[_] => /usr/sbin/apache2
)

[HTTP_ENV_VARS] => Array
(
[PATH] => /usr/local/bin:/usr/bin:/bin
[PWD] => /
[LANG] => C
[SHLVL] => 1
[_] => /usr/sbin/apache2
)

[_POST] => Array
(
[first_name] => Ian
[last_name] => Oglesby
[email] => ian.oglesby1@btinternet.com
[password1] => hannah10
[password2] => hannah10
[submit] => Register
[submitted] => TRUE
)

[HTTP_POST_VARS] => Array
(
[first_name] => Ian
[last_name] => Oglesby
[email] => ian.oglesby1@btinternet.com
[password1] => hannah10
[password2] => hannah10
[submit] => Register
[submitted] => TRUE
)

[_GET] => Array
(
)

[HTTP_GET_VARS] => Array
(
)

[_COOKIE] => Array
(
[PHPSESSID] => 72b02f15f1f796b3e667476791390954
)

[HTTP_COOKIE_VARS] => Array
(
[PHPSESSID] => 72b02f15f1f796b3e667476791390954
)

[_SERVER] => Array
(
[HTTP_ACCEPT] => image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
[HTTP_REFERER] => http://loki.computing.boston.ac.uk/~ogl10b7/EricsCarRepairs/register.php
[HTTP_ACCEPT_LANGUAGE] => en-gb
[CONTENT_TYPE] => application/x-www-form-urlencoded
[HTTP_UA_CPU] => x86
[HTTP_ACCEPT_ENCODING] => gzip, deflate
[HTTP_USER_AGENT] => Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; InfoPath.2)
[HTTP_HOST] => loki.computing.boston.ac.uk
[CONTENT_LENGTH] => 135
[HTTP_CONNECTION] => Keep-Alive
[HTTP_CACHE_CONTROL] => no-cache
[HTTP_COOKIE] => PHPSESSID=72b02f15f1f796b3e667476791390954
[PATH] => /usr/local/bin:/usr/bin:/bin
[SERVER_SIGNATURE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 Server at loki.computing.boston.ac.uk Port 80

[SERVER_SOFTWARE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8
[SERVER_NAME] => loki.computing.boston.ac.uk
[SERVER_ADDR] => 217.40.221.251
[SERVER_PORT] => 80
[REMOTE_ADDR] => 86.162.15.192
[DOCUMENT_ROOT] => /var/www/
[SERVER_ADMIN] => webmaster@localhost
[SCRIPT_FILENAME] => /home/ogl10b7/public_html/EricsCarRepairs/register.php
[REMOTE_PORT] => 53330
[GATEWAY_INTERFACE] => CGI/1.1
[SERVER_PROTOCOL] => HTTP/1.1
[REQUEST_METHOD] => POST
[QUERY_STRING] =>
[REQUEST_URI] => /~ogl10b7/EricsCarRepairs/register.php
[SCRIPT_NAME] => /~ogl10b7/EricsCarRepairs/register.php
[PHP_SELF] => /~ogl10b7/EricsCarRepairs/register.php
[REQUEST_TIME] => 1208275307
[argv] => Array
(
)

[argc] => 0
)

[HTTP_SERVER_VARS] => Array
(
[HTTP_ACCEPT] => image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
[HTTP_REFERER] => http://loki.computing.boston.ac.uk/~ogl10b7/EricsCarRepairs/register.php
[HTTP_ACCEPT_LANGUAGE] => en-gb
[CONTENT_TYPE] => application/x-www-form-urlencoded
[HTTP_UA_CPU] => x86
[HTTP_ACCEPT_ENCODING] => gzip, deflate
[HTTP_USER_AGENT] => Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; InfoPath.2)
[HTTP_HOST] => loki.computing.boston.ac.uk
[CONTENT_LENGTH] => 135
[HTTP_CONNECTION] => Keep-Alive
[HTTP_CACHE_CONTROL] => no-cache
[HTTP_COOKIE] => PHPSESSID=72b02f15f1f796b3e667476791390954
[PATH] => /usr/local/bin:/usr/bin:/bin
[SERVER_SIGNATURE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 Server at loki.computing.boston.ac.uk Port 80

[SERVER_SOFTWARE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8
[SERVER_NAME] => loki.computing.boston.ac.uk
[SERVER_ADDR] => 217.40.221.251
[SERVER_PORT] => 80
[REMOTE_ADDR] => 86.162.15.192
[DOCUMENT_ROOT] => /var/www/
[SERVER_ADMIN] => webmaster@localhost
[SCRIPT_FILENAME] => /home/ogl10b7/public_html/EricsCarRepairs/register.php
[REMOTE_PORT] => 53330
[GATEWAY_INTERFACE] => CGI/1.1
[SERVER_PROTOCOL] => HTTP/1.1
[REQUEST_METHOD] => POST
[QUERY_STRING] =>
[REQUEST_URI] => /~ogl10b7/EricsCarRepairs/register.php
[SCRIPT_NAME] => /~ogl10b7/EricsCarRepairs/register.php
[PHP_SELF] => /~ogl10b7/EricsCarRepairs/register.php
[REQUEST_TIME] => 1208275307
[argv] => Array
(
)

[argc] => 0
)

[_FILES] => Array
(
)

[HTTP_POST_FILES] => Array
(
)

[_REQUEST] => Array
(
[first_name] => Ian
[last_name] => Oglesby
[email] => ian.oglesby1@btinternet.com
[password1] => hannah10
[password2] => hannah10
[submit] => Register
[submitted] => TRUE
[PHPSESSID] => 72b02f15f1f796b3e667476791390954
)

[live] =>
[email] => InsertRealAddressHere
[page_title] => Register
[_SESSION] => Array
(
[sid] => sid
)

[dbc] => Resource id #5
[fn] =>
[ln] =>
)




Please enter a valid email address!

An error occurred in script '/home/ogl10b7/public_html/EricsCarRepairs/register.php' on line 44:
preg_match() [function.preg-match]: No ending delimiter '^' found
Date/Time: 4-15-200817:01:47

Array
(
[GLOBALS] => Array
*RECURSION*
[_ENV] => Array
(
[PATH] => /usr/local/bin:/usr/bin:/bin
[PWD] => /
[LANG] => C
[SHLVL] => 1
[_] => /usr/sbin/apache2
)

[HTTP_ENV_VARS] => Array
(
[PATH] => /usr/local/bin:/usr/bin:/bin
[PWD] => /
[LANG] => C
[SHLVL] => 1
[_] => /usr/sbin/apache2
)

[_POST] => Array
(
[first_name] => Ian
[last_name] => Oglesby
[email] => ian.oglesby1@btinternet.com
[password1] => hannah10
[password2] => hannah10
[submit] => Register
[submitted] => TRUE
)

[HTTP_POST_VARS] => Array
(
[first_name] => Ian
[last_name] => Oglesby
[email] => ian.oglesby1@btinternet.com
[password1] => hannah10
[password2] => hannah10
[submit] => Register
[submitted] => TRUE
)

[_GET] => Array
(
)

[HTTP_GET_VARS] => Array
(
)

[_COOKIE] => Array
(
[PHPSESSID] => 72b02f15f1f796b3e667476791390954
)

[HTTP_COOKIE_VARS] => Array
(
[PHPSESSID] => 72b02f15f1f796b3e667476791390954
)

[_SERVER] => Array
(
[HTTP_ACCEPT] => image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
[HTTP_REFERER] => http://loki.computing.boston.ac.uk/~ogl10b7/EricsCarRepairs/register.php
[HTTP_ACCEPT_LANGUAGE] => en-gb
[CONTENT_TYPE] => application/x-www-form-urlencoded
[HTTP_UA_CPU] => x86
[HTTP_ACCEPT_ENCODING] => gzip, deflate
[HTTP_USER_AGENT] => Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; InfoPath.2)
[HTTP_HOST] => loki.computing.boston.ac.uk
[CONTENT_LENGTH] => 135
[HTTP_CONNECTION] => Keep-Alive
[HTTP_CACHE_CONTROL] => no-cache
[HTTP_COOKIE] => PHPSESSID=72b02f15f1f796b3e667476791390954
[PATH] => /usr/local/bin:/usr/bin:/bin
[SERVER_SIGNATURE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 Server at loki.computing.boston.ac.uk Port 80

[SERVER_SOFTWARE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8
[SERVER_NAME] => loki.computing.boston.ac.uk
[SERVER_ADDR] => 217.40.221.251
[SERVER_PORT] => 80
[REMOTE_ADDR] => 86.162.15.192
[DOCUMENT_ROOT] => /var/www/
[SERVER_ADMIN] => webmaster@localhost
[SCRIPT_FILENAME] => /home/ogl10b7/public_html/EricsCarRepairs/register.php
[REMOTE_PORT] => 53330
[GATEWAY_INTERFACE] => CGI/1.1
[SERVER_PROTOCOL] => HTTP/1.1
[REQUEST_METHOD] => POST
[QUERY_STRING] =>
[REQUEST_URI] => /~ogl10b7/EricsCarRepairs/register.php
[SCRIPT_NAME] => /~ogl10b7/EricsCarRepairs/register.php
[PHP_SELF] => /~ogl10b7/EricsCarRepairs/register.php
[REQUEST_TIME] => 1208275307
[argv] => Array
(
)

[argc] => 0
)

[HTTP_SERVER_VARS] => Array
(
[HTTP_ACCEPT] => image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
[HTTP_REFERER] => http://loki.computing.boston.ac.uk/~ogl10b7/EricsCarRepairs/register.php
[HTTP_ACCEPT_LANGUAGE] => en-gb
[CONTENT_TYPE] => application/x-www-form-urlencoded
[HTTP_UA_CPU] => x86
[HTTP_ACCEPT_ENCODING] => gzip, deflate
[HTTP_USER_AGENT] => Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; InfoPath.2)
[HTTP_HOST] => loki.computing.boston.ac.uk
[CONTENT_LENGTH] => 135
[HTTP_CONNECTION] => Keep-Alive
[HTTP_CACHE_CONTROL] => no-cache
[HTTP_COOKIE] => PHPSESSID=72b02f15f1f796b3e667476791390954
[PATH] => /usr/local/bin:/usr/bin:/bin
[SERVER_SIGNATURE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 Server at loki.computing.boston.ac.uk Port 80

[SERVER_SOFTWARE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8
[SERVER_NAME] => loki.computing.boston.ac.uk
[SERVER_ADDR] => 217.40.221.251
[SERVER_PORT] => 80
[REMOTE_ADDR] => 86.162.15.192
[DOCUMENT_ROOT] => /var/www/
[SERVER_ADMIN] => webmaster@localhost
[SCRIPT_FILENAME] => /home/ogl10b7/public_html/EricsCarRepairs/register.php
[REMOTE_PORT] => 53330
[GATEWAY_INTERFACE] => CGI/1.1
[SERVER_PROTOCOL] => HTTP/1.1
[REQUEST_METHOD] => POST
[QUERY_STRING] =>
[REQUEST_URI] => /~ogl10b7/EricsCarRepairs/register.php
[SCRIPT_NAME] => /~ogl10b7/EricsCarRepairs/register.php
[PHP_SELF] => /~ogl10b7/EricsCarRepairs/register.php
[REQUEST_TIME] => 1208275307
[argv] => Array
(
)

[argc] => 0
)

[_FILES] => Array
(
)

[HTTP_POST_FILES] => Array
(
)

[_REQUEST] => Array
(
[first_name] => Ian
[last_name] => Oglesby
[email] => ian.oglesby1@btinternet.com
[password1] => hannah10
[password2] => hannah10
[submit] => Register
[submitted] => TRUE
[PHPSESSID] => 72b02f15f1f796b3e667476791390954
)

[live] =>
[email] => InsertRealAddressHere
[page_title] => Register
[_SESSION] => Array
(
[sid] => sid
)

[dbc] => Resource id #5
[fn] =>
[ln] =>
[e] =>
)




Please enter a valid password!

Please try again.

Register
First Name:

Last Name:

Email:

Password: Use only letters and numbers. Must be between 4 and 20 characters long

Confirm Password:



Home
Register
Login
Forgot password
some other page
and again
  #4  
Old 15-Apr-2008, 10:24
oggie oggie is offline
New Member
 
Join Date: Nov 2007
Location: tattershall, UK
Posts: 23
oggie is on a distinguished road
Smile

Re: session error


hi sorted out now thanx. I am now trying to get this connected to the database but am getting this error now. Any ideas and solutions...


this is the code
PHP Code:

<?php

// Initialise a session.

# register.php
// This is the registration page for the site.

// Include the config file for error management and such.
require_once ('includes/config.inc.php');

// Set the page title and include the HTML header.
$page_title = 'Register';
include ('includes/header.php');

if (isset($_POST['submitted'])) { // Handle the form.

require_once ('includes/mysqlconnect.php'); // Connect to the database.

// Check for a fisrt name.
if (preg_match ('^[[:alpha:]\.\'\-]{2,15}$', stripslashes(trim($_POST['first_name'])))) {
$fn = escape_data($_POST['first_name']);
} else {
$fn = FALSE;
echo '<p><font color="red" size="+1">Please enter your first name!</font></p>';
}

// Check for a last name.
if (preg_match ('^[[:alpaha:]\.\'\-]{2,30}$', stripslashes(trim($_POST['last_name'])))) {
$ln = escape_data($_POST['last_name']);
} else {
$ln = FALSE;
echo '<p><font color="red" size="+1">Please enter your last name!</font></p>';
}

// Check for an email address.
if (preg_match ('^[[:alnum:]][a-z0-9_\.\-]*@[a-z0-9\.\-]+\.[a-z]{2,4}$', stripslashes(trim($POST['email'])))) {
$e = escape_data($_POST['email']);
} else {
$e = FALSE;
echo '<p><font color="red" size="+1">Please enter a valid email address!</font></p>';
}

// Check for a password and math against the confirmed password.
if (preg_match('^[[:alnum:]]{4,20}$', stripslashes(trim($_POST['password1'])))) {
if ($_POST['password1'] == $_POST['password2']) { 
$p = escape_data($_POST['password1']);
} else {
$p = FALSE;
echo '<p><font color="red" size="+1">Your password did not match the confirmed password!</font></p>';
}
} else {
$p = FALSE;
echo '<p><font color="red" size="+1">Please enter a valid password!</font></p>';
}

if ($fn && $ln && $e && $p) { // If everything's OK.

// Make sure the email address is available.
$query = "SELECT user_id FROM register WHERE email='$e'";
$result = mysql_query ($query) or trigger_error("Query: $query\n<br />MySQL ERROR: " . mysql_error());

if (mysql_num_rows($result) == 0) { // Available.

// Create the activation code.
$a = md5(uniqid(rand(), true));

// Add the user.
$query = "INSERT INTO register (email, pass, first_name, last_name, registration_date) VALUES ('$e', SHA('$p'), '$fn', '$ln', '$a', NOW()";
$result = mysql_query ($query) or trigger_error("QUERY: $query\n<br />MySQL ERROR:" . mysql_error());

if (mysql_affected_rows() == 1) { // If it ran OK.

// Send the email.
$body = "Thankyou for registering. To activate your account, please click on this link:\n\n";
$body .="http://www.whateveraddressyouwantthere.com/activate.php?x=" . mysql_insert_id() . "&y=$a";
mail($_POST['email'],'Registration confirmation',$body);

// Finish the page.
echo '<h3>Thankyou for registering! A confirmation email has been sent to your address. Please click on the link in that the email in order to activate your account.</h3>';
include ('includes/footer.html'); // Include the HTML footer.
exit();

} else { // If it did not run OK.
echo '<p><font color="red" size="+1">You could not be registerd due to a system error. We apologize for any inconvenience.</font></p>';
}

} else { // The email address is not available.
echo '<p><font color="red" size="+1"> That email has already been registered. If you have forgotten your password, use the link to have your password sent to you.</font></p>';
}

} else { // If one of the data testa failed.
echo '<p><font color="red" size="+1">Please try again.</font></p>';
}

mysql_close(); // Close the database connection.

} // End of the main submit conditional.
?>

<h1>Register</h1>
<form action="register.php" method="post">
<fieldset>

<p><b>First Name:</b> <input type="text" name="first_name" size="15" maxlength="15" value="<?php if (isset($_POST['first_name'])) echo $_POST['first_name']; ?>" /> </p>

<p><b>Last Name:</b> <input type="text" name="last_name" size="30" maxlength="30" value="<?php if (isset($_POST['last_name'])) echo $_POST['last_name']; ?>" /> </p>

<p><b>Email:</b> <input type="text" name="email" size="40" maxlength="40" value="<?php if (isset($_POST['email'])) echo $_POST['email']; ?>" /> </p>

<p><b>Password:</b> <input type="password" name="password1" size="20" maxlength="20" /><small>Use only letters and numbers. Must be between 4 and 20 characters long</small></p>

<p><b>Confirm Password:</b> <input type="password" name="password2" size="20" maxlength="20" /></p>
</fieldset>

<div align="center"><input type="submit" name="submit" value="Register" /></div>
<input type="hidden" name="submitted" value="TRUE" />

</form>

<?php // Include the HTML footer.
include ('includes/footer.php')
?>



this is what I am getting.
Code:
User Registration An error occurred in script '/home/ogl10b7/public_html/EricsCarRepairs/register.php' on line 20: preg_match() [function.preg-match]: No ending delimiter '^' found Date/Time: 4-15-200817:01:47 Array ( [GLOBALS] => Array *RECURSION* [_ENV] => Array ( [PATH] => /usr/local/bin:/usr/bin:/bin [PWD] => / [LANG] => C [SHLVL] => 1 [_] => /usr/sbin/apache2 ) [HTTP_ENV_VARS] => Array ( [PATH] => /usr/local/bin:/usr/bin:/bin [PWD] => / [LANG] => C [SHLVL] => 1 [_] => /usr/sbin/apache2 ) [_POST] => Array ( [first_name] => Ian [last_name] => Oglesby [email] => ian.oglesby1@btinternet.com [password1] => hannah10 [password2] => hannah10 [submit] => Register [submitted] => TRUE ) [HTTP_POST_VARS] => Array ( [first_name] => Ian [last_name] => Oglesby [email] => ian.oglesby1@btinternet.com [password1] => hannah10 [password2] => hannah10 [submit] => Register [submitted] => TRUE ) [_GET] => Array ( ) [HTTP_GET_VARS] => Array ( ) [_COOKIE] => Array ( [PHPSESSID] => 72b02f15f1f796b3e667476791390954 ) [HTTP_COOKIE_VARS] => Array ( [PHPSESSID] => 72b02f15f1f796b3e667476791390954 ) [_SERVER] => Array ( [HTTP_ACCEPT] => image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* [HTTP_REFERER] => http://loki.computing.boston.ac.uk/~ogl10b7/EricsCarRepairs/register.php [HTTP_ACCEPT_LANGUAGE] => en-gb [CONTENT_TYPE] => application/x-www-form-urlencoded [HTTP_UA_CPU] => x86 [HTTP_ACCEPT_ENCODING] => gzip, deflate [HTTP_USER_AGENT] => Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; InfoPath.2) [HTTP_HOST] => loki.computing.boston.ac.uk [CONTENT_LENGTH] => 135 [HTTP_CONNECTION] => Keep-Alive [HTTP_CACHE_CONTROL] => no-cache [HTTP_COOKIE] => PHPSESSID=72b02f15f1f796b3e667476791390954 [PATH] => /usr/local/bin:/usr/bin:/bin [SERVER_SIGNATURE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 Server at loki.computing.boston.ac.uk Port 80 [SERVER_SOFTWARE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 [SERVER_NAME] => loki.computing.boston.ac.uk [SERVER_ADDR] => 217.40.221.251 [SERVER_PORT] => 80 [REMOTE_ADDR] => 86.162.15.192 [DOCUMENT_ROOT] => /var/www/ [SERVER_ADMIN] => webmaster@localhost [SCRIPT_FILENAME] => /home/ogl10b7/public_html/EricsCarRepairs/register.php [REMOTE_PORT] => 53330 [GATEWAY_INTERFACE] => CGI/1.1 [SERVER_PROTOCOL] => HTTP/1.1 [REQUEST_METHOD] => POST [QUERY_STRING] => [REQUEST_URI] => /~ogl10b7/EricsCarRepairs/register.php [SCRIPT_NAME] => /~ogl10b7/EricsCarRepairs/register.php [PHP_SELF] => /~ogl10b7/EricsCarRepairs/register.php [REQUEST_TIME] => 1208275307 [argv] => Array ( ) [argc] => 0 ) [HTTP_SERVER_VARS] => Array ( [HTTP_ACCEPT] => image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* [HTTP_REFERER] => http://loki.computing.boston.ac.uk/~ogl10b7/EricsCarRepairs/register.php [HTTP_ACCEPT_LANGUAGE] => en-gb [CONTENT_TYPE] => application/x-www-form-urlencoded [HTTP_UA_CPU] => x86 [HTTP_ACCEPT_ENCODING] => gzip, deflate [HTTP_USER_AGENT] => Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; InfoPath.2) [HTTP_HOST] => loki.computing.boston.ac.uk [CONTENT_LENGTH] => 135 [HTTP_CONNECTION] => Keep-Alive [HTTP_CACHE_CONTROL] => no-cache [HTTP_COOKIE] => PHPSESSID=72b02f15f1f796b3e667476791390954 [PATH] => /usr/local/bin:/usr/bin:/bin [SERVER_SIGNATURE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 Server at loki.computing.boston.ac.uk Port 80 [SERVER_SOFTWARE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 [SERVER_NAME] => loki.computing.boston.ac.uk [SERVER_ADDR] => 217.40.221.251 [SERVER_PORT] => 80 [REMOTE_ADDR] => 86.162.15.192 [DOCUMENT_ROOT] => /var/www/ [SERVER_ADMIN] => webmaster@localhost [SCRIPT_FILENAME] => /home/ogl10b7/public_html/EricsCarRepairs/register.php [REMOTE_PORT] => 53330 [GATEWAY_INTERFACE] => CGI/1.1 [SERVER_PROTOCOL] => HTTP/1.1 [REQUEST_METHOD] => POST [QUERY_STRING] => [REQUEST_URI] => /~ogl10b7/EricsCarRepairs/register.php [SCRIPT_NAME] => /~ogl10b7/EricsCarRepairs/register.php [PHP_SELF] => /~ogl10b7/EricsCarRepairs/register.php [REQUEST_TIME] => 1208275307 [argv] => Array ( ) [argc] => 0 ) [_FILES] => Array ( ) [HTTP_POST_FILES] => Array ( ) [_REQUEST] => Array ( [first_name] => Ian [last_name] => Oglesby [email] => ian.oglesby1@btinternet.com [password1] => hannah10 [password2] => hannah10 [submit] => Register [submitted] => TRUE [PHPSESSID] => 72b02f15f1f796b3e667476791390954 ) [live] => [email] => InsertRealAddressHere [page_title] => Register [_SESSION] => Array ( [sid] => sid ) [dbc] => Resource id #5 ) Please enter your first name! An error occurred in script '/home/ogl10b7/public_html/EricsCarRepairs/register.php' on line 28: preg_match() [function.preg-match]: No ending delimiter '^' found Date/Time: 4-15-200817:01:47 Array ( [GLOBALS] => Array *RECURSION* [_ENV] => Array ( [PATH] => /usr/local/bin:/usr/bin:/bin [PWD] => / [LANG] => C [SHLVL] => 1 [_] => /usr/sbin/apache2 ) [HTTP_ENV_VARS] => Array ( [PATH] => /usr/local/bin:/usr/bin:/bin [PWD] => / [LANG] => C [SHLVL] => 1 [_] => /usr/sbin/apache2 ) [_POST] => Array ( [first_name] => Ian [last_name] => Oglesby [email] => ian.oglesby1@btinternet.com [password1] => hannah10 [password2] => hannah10 [submit] => Register [submitted] => TRUE ) [HTTP_POST_VARS] => Array ( [first_name] => Ian [last_name] => Oglesby [email] => ian.oglesby1@btinternet.com [password1] => hannah10 [password2] => hannah10 [submit] => Register [submitted] => TRUE ) [_GET] => Array ( ) [HTTP_GET_VARS] => Array ( ) [_COOKIE] => Array ( [PHPSESSID] => 72b02f15f1f796b3e667476791390954 ) [HTTP_COOKIE_VARS] => Array ( [PHPSESSID] => 72b02f15f1f796b3e667476791390954 ) [_SERVER] => Array ( [HTTP_ACCEPT] => image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* [HTTP_REFERER] => http://loki.computing.boston.ac.uk/~ogl10b7/EricsCarRepairs/register.php [HTTP_ACCEPT_LANGUAGE] => en-gb [CONTENT_TYPE] => application/x-www-form-urlencoded [HTTP_UA_CPU] => x86 [HTTP_ACCEPT_ENCODING] => gzip, deflate [HTTP_USER_AGENT] => Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; InfoPath.2) [HTTP_HOST] => loki.computing.boston.ac.uk [CONTENT_LENGTH] => 135 [HTTP_CONNECTION] => Keep-Alive [HTTP_CACHE_CONTROL] => no-cache [HTTP_COOKIE] => PHPSESSID=72b02f15f1f796b3e667476791390954 [PATH] => /usr/local/bin:/usr/bin:/bin [SERVER_SIGNATURE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 Server at loki.computing.boston.ac.uk Port 80 [SERVER_SOFTWARE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 [SERVER_NAME] => loki.computing.boston.ac.uk [SERVER_ADDR] => 217.40.221.251 [SERVER_PORT] => 80 [REMOTE_ADDR] => 86.162.15.192 [DOCUMENT_ROOT] => /var/www/ [SERVER_ADMIN] => webmaster@localhost [SCRIPT_FILENAME] => /home/ogl10b7/public_html/EricsCarRepairs/register.php [REMOTE_PORT] => 53330 [GATEWAY_INTERFACE] => CGI/1.1 [SERVER_PROTOCOL] => HTTP/1.1 [REQUEST_METHOD] => POST [QUERY_STRING] => [REQUEST_URI] => /~ogl10b7/EricsCarRepairs/register.php [SCRIPT_NAME] => /~ogl10b7/EricsCarRepairs/register.php [PHP_SELF] => /~ogl10b7/EricsCarRepairs/register.php [REQUEST_TIME] => 1208275307 [argv] => Array ( ) [argc] => 0 ) [HTTP_SERVER_VARS] => Array ( [HTTP_ACCEPT] => image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* [HTTP_REFERER] => http://loki.computing.boston.ac.uk/~ogl10b7/EricsCarRepairs/register.php [HTTP_ACCEPT_LANGUAGE] => en-gb [CONTENT_TYPE] => application/x-www-form-urlencoded [HTTP_UA_CPU] => x86 [HTTP_ACCEPT_ENCODING] => gzip, deflate [HTTP_USER_AGENT] => Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; InfoPath.2) [HTTP_HOST] => loki.computing.boston.ac.uk [CONTENT_LENGTH] => 135 [HTTP_CONNECTION] => Keep-Alive [HTTP_CACHE_CONTROL] => no-cache [HTTP_COOKIE] => PHPSESSID=72b02f15f1f796b3e667476791390954 [PATH] => /usr/local/bin:/usr/bin:/bin [SERVER_SIGNATURE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 Server at loki.computing.boston.ac.uk Port 80 [SERVER_SOFTWARE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 [SERVER_NAME] => loki.computing.boston.ac.uk [SERVER_ADDR] => 217.40.221.251 [SERVER_PORT] => 80 [REMOTE_ADDR] => 86.162.15.192 [DOCUMENT_ROOT] => /var/www/ [SERVER_ADMIN] => webmaster@localhost [SCRIPT_FILENAME] => /home/ogl10b7/public_html/EricsCarRepairs/register.php [REMOTE_PORT] => 53330 [GATEWAY_INTERFACE] => CGI/1.1 [SERVER_PROTOCOL] => HTTP/1.1 [REQUEST_METHOD] => POST [QUERY_STRING] => [REQUEST_URI] => /~ogl10b7/EricsCarRepairs/register.php [SCRIPT_NAME] => /~ogl10b7/EricsCarRepairs/register.php [PHP_SELF] => /~ogl10b7/EricsCarRepairs/register.php [REQUEST_TIME] => 1208275307 [argv] => Array ( ) [argc] => 0 ) [_FILES] => Array ( ) [HTTP_POST_FILES] => Array ( ) [_REQUEST] => Array ( [first_name] => Ian [last_name] => Oglesby [email] => ian.oglesby1@btinternet.com [password1] => hannah10 [password2] => hannah10 [submit] => Register [submitted] => TRUE [PHPSESSID] => 72b02f15f1f796b3e667476791390954 ) [live] => [email] => InsertRealAddressHere [page_title] => Register [_SESSION] => Array ( [sid] => sid ) [dbc] => Resource id #5 [fn] => ) Please enter your last name! An error occurred in script '/home/ogl10b7/public_html/EricsCarRepairs/register.php' on line 36: Undefined variable: POST Date/Time: 4-15-200817:01:47 Array ( [GLOBALS] => Array *RECURSION* [_ENV] => Array ( [PATH] => /usr/local/bin:/usr/bin:/bin [PWD] => / [LANG] => C [SHLVL] => 1 [_] => /usr/sbin/apache2 ) [HTTP_ENV_VARS] => Array ( [PATH] => /usr/local/bin:/usr/bin:/bin [PWD] => / [LANG] => C [SHLVL] => 1 [_] => /usr/sbin/apache2 ) [_POST] => Array ( [first_name] => Ian [last_name] => Oglesby [email] => ian.oglesby1@btinternet.com [password1] => hannah10 [password2] => hannah10 [submit] => Register [submitted] => TRUE ) [HTTP_POST_VARS] => Array ( [first_name] => Ian [last_name] => Oglesby [email] => ian.oglesby1@btinternet.com [password1] => hannah10 [password2] => hannah10 [submit] => Register [submitted] => TRUE ) [_GET] => Array ( ) [HTTP_GET_VARS] => Array ( ) [_COOKIE] => Array ( [PHPSESSID] => 72b02f15f1f796b3e667476791390954 ) [HTTP_COOKIE_VARS] => Array ( [PHPSESSID] => 72b02f15f1f796b3e667476791390954 ) [_SERVER] => Array ( [HTTP_ACCEPT] => image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* [HTTP_REFERER] => http://loki.computing.boston.ac.uk/~ogl10b7/EricsCarRepairs/register.php [HTTP_ACCEPT_LANGUAGE] => en-gb [CONTENT_TYPE] => application/x-www-form-urlencoded [HTTP_UA_CPU] => x86 [HTTP_ACCEPT_ENCODING] => gzip, deflate [HTTP_USER_AGENT] => Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; InfoPath.2) [HTTP_HOST] => loki.computing.boston.ac.uk [CONTENT_LENGTH] => 135 [HTTP_CONNECTION] => Keep-Alive [HTTP_CACHE_CONTROL] => no-cache [HTTP_COOKIE] => PHPSESSID=72b02f15f1f796b3e667476791390954 [PATH] => /usr/local/bin:/usr/bin:/bin [SERVER_SIGNATURE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 Server at loki.computing.boston.ac.uk Port 80 [SERVER_SOFTWARE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 [SERVER_NAME] => loki.computing.boston.ac.uk [SERVER_ADDR] => 217.40.221.251 [SERVER_PORT] => 80 [REMOTE_ADDR] => 86.162.15.192 [DOCUMENT_ROOT] => /var/www/ [SERVER_ADMIN] => webmaster@localhost [SCRIPT_FILENAME] => /home/ogl10b7/public_html/EricsCarRepairs/register.php [REMOTE_PORT] => 53330 [GATEWAY_INTERFACE] => CGI/1.1 [SERVER_PROTOCOL] => HTTP/1.1 [REQUEST_METHOD] => POST [QUERY_STRING] => [REQUEST_URI] => /~ogl10b7/EricsCarRepairs/register.php [SCRIPT_NAME] => /~ogl10b7/EricsCarRepairs/register.php [PHP_SELF] => /~ogl10b7/EricsCarRepairs/register.php [REQUEST_TIME] => 1208275307 [argv] => Array ( ) [argc] => 0 ) [HTTP_SERVER_VARS] => Array ( [HTTP_ACCEPT] => image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* [HTTP_REFERER] => http://loki.computing.boston.ac.uk/~ogl10b7/EricsCarRepairs/register.php [HTTP_ACCEPT_LANGUAGE] => en-gb [CONTENT_TYPE] => application/x-www-form-urlencoded [HTTP_UA_CPU] => x86 [HTTP_ACCEPT_ENCODING] => gzip, deflate [HTTP_USER_AGENT] => Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; InfoPath.2) [HTTP_HOST] => loki.computing.boston.ac.uk [CONTENT_LENGTH] => 135 [HTTP_CONNECTION] => Keep-Alive [HTTP_CACHE_CONTROL] => no-cache [HTTP_COOKIE] => PHPSESSID=72b02f15f1f796b3e667476791390954 [PATH] => /usr/local/bin:/usr/bin:/bin [SERVER_SIGNATURE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 Server at loki.computing.boston.ac.uk Port 80 [SERVER_SOFTWARE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 [SERVER_NAME] => loki.computing.boston.ac.uk [SERVER_ADDR] => 217.40.221.251 [SERVER_PORT] => 80 [REMOTE_ADDR] => 86.162.15.192 [DOCUMENT_ROOT] => /var/www/ [SERVER_ADMIN] => webmaster@localhost [SCRIPT_FILENAME] => /home/ogl10b7/public_html/EricsCarRepairs/register.php [REMOTE_PORT] => 53330 [GATEWAY_INTERFACE] => CGI/1.1 [SERVER_PROTOCOL] => HTTP/1.1 [REQUEST_METHOD] => POST [QUERY_STRING] => [REQUEST_URI] => /~ogl10b7/EricsCarRepairs/register.php [SCRIPT_NAME] => /~ogl10b7/EricsCarRepairs/register.php [PHP_SELF] => /~ogl10b7/EricsCarRepairs/register.php [REQUEST_TIME] => 1208275307 [argv] => Array ( ) [argc] => 0 ) [_FILES] => Array ( ) [HTTP_POST_FILES] => Array ( ) [_REQUEST] => Array ( [first_name] => Ian [last_name] => Oglesby [email] => ian.oglesby1@btinternet.com [password1] => hannah10 [password2] => hannah10 [submit] => Register [submitted] => TRUE [PHPSESSID] => 72b02f15f1f796b3e667476791390954 ) [live] => [email] => InsertRealAddressHere [page_title] => Register [_SESSION] => Array ( [sid] => sid ) [dbc] => Resource id #5 [fn] => [ln] => ) An error occurred in script '/home/ogl10b7/public_html/EricsCarRepairs/register.php' on line 36: preg_match() [function.preg-match]: No ending delimiter '^' found Date/Time: 4-15-200817:01:47 Array ( [GLOBALS] => Array *RECURSION* [_ENV] => Array ( [PATH] => /usr/local/bin:/usr/bin:/bin [PWD] => / [LANG] => C [SHLVL] => 1 [_] => /usr/sbin/apache2 ) [HTTP_ENV_VARS] => Array ( [PATH] => /usr/local/bin:/usr/bin:/bin [PWD] => / [LANG] => C [SHLVL] => 1 [_] => /usr/sbin/apache2 ) [_POST] => Array ( [first_name] => Ian [last_name] => Oglesby [email] => ian.oglesby1@btinternet.com [password1] => hannah10 [password2] => hannah10 [submit] => Register [submitted] => TRUE ) [HTTP_POST_VARS] => Array ( [first_name] => Ian [last_name] => Oglesby [email] => ian.oglesby1@btinternet.com [password1] => hannah10 [password2] => hannah10 [submit] => Register [submitted] => TRUE ) [_GET] => Array ( ) [HTTP_GET_VARS] => Array ( ) [_COOKIE] => Array ( [PHPSESSID] => 72b02f15f1f796b3e667476791390954 ) [HTTP_COOKIE_VARS] => Array ( [PHPSESSID] => 72b02f15f1f796b3e667476791390954 ) [_SERVER] => Array ( [HTTP_ACCEPT] => image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* [HTTP_REFERER] => http://loki.computing.boston.ac.uk/~ogl10b7/EricsCarRepairs/register.php [HTTP_ACCEPT_LANGUAGE] => en-gb [CONTENT_TYPE] => application/x-www-form-urlencoded [HTTP_UA_CPU] => x86 [HTTP_ACCEPT_ENCODING] => gzip, deflate [HTTP_USER_AGENT] => Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; InfoPath.2) [HTTP_HOST] => loki.computing.boston.ac.uk [CONTENT_LENGTH] => 135 [HTTP_CONNECTION] => Keep-Alive [HTTP_CACHE_CONTROL] => no-cache [HTTP_COOKIE] => PHPSESSID=72b02f15f1f796b3e667476791390954 [PATH] => /usr/local/bin:/usr/bin:/bin [SERVER_SIGNATURE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 Server at loki.computing.boston.ac.uk Port 80 [SERVER_SOFTWARE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 [SERVER_NAME] => loki.computing.boston.ac.uk [SERVER_ADDR] => 217.40.221.251 [SERVER_PORT] => 80 [REMOTE_ADDR] => 86.162.15.192 [DOCUMENT_ROOT] => /var/www/ [SERVER_ADMIN] => webmaster@localhost [SCRIPT_FILENAME] => /home/ogl10b7/public_html/EricsCarRepairs/register.php [REMOTE_PORT] => 53330 [GATEWAY_INTERFACE] => CGI/1.1 [SERVER_PROTOCOL] => HTTP/1.1 [REQUEST_METHOD] => POST [QUERY_STRING] => [REQUEST_URI] => /~ogl10b7/EricsCarRepairs/register.php [SCRIPT_NAME] => /~ogl10b7/EricsCarRepairs/register.php [PHP_SELF] => /~ogl10b7/EricsCarRepairs/register.php [REQUEST_TIME] => 1208275307 [argv] => Array ( ) [argc] => 0 ) [HTTP_SERVER_VARS] => Array ( [HTTP_ACCEPT] => image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* [HTTP_REFERER] => http://loki.computing.boston.ac.uk/~ogl10b7/EricsCarRepairs/register.php [HTTP_ACCEPT_LANGUAGE] => en-gb [CONTENT_TYPE] => application/x-www-form-urlencoded [HTTP_UA_CPU] => x86 [HTTP_ACCEPT_ENCODING] => gzip, deflate [HTTP_USER_AGENT] => Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; InfoPath.2) [HTTP_HOST] => loki.computing.boston.ac.uk [CONTENT_LENGTH] => 135 [HTTP_CONNECTION] => Keep-Alive [HTTP_CACHE_CONTROL] => no-cache [HTTP_COOKIE] => PHPSESSID=72b02f15f1f796b3e667476791390954 [PATH] => /usr/local/bin:/usr/bin:/bin [SERVER_SIGNATURE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 Server at loki.computing.boston.ac.uk Port 80 [SERVER_SOFTWARE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 [SERVER_NAME] => loki.computing.boston.ac.uk [SERVER_ADDR] => 217.40.221.251 [SERVER_PORT] => 80 [REMOTE_ADDR] => 86.162.15.192 [DOCUMENT_ROOT] => /var/www/ [SERVER_ADMIN] => webmaster@localhost [SCRIPT_FILENAME] => /home/ogl10b7/public_html/EricsCarRepairs/register.php [REMOTE_PORT] => 53330 [GATEWAY_INTERFACE] => CGI/1.1 [SERVER_PROTOCOL] => HTTP/1.1 [REQUEST_METHOD] => POST [QUERY_STRING] => [REQUEST_URI] => /~ogl10b7/EricsCarRepairs/register.php [SCRIPT_NAME] => /~ogl10b7/EricsCarRepairs/register.php [PHP_SELF] => /~ogl10b7/EricsCarRepairs/register.php [REQUEST_TIME] => 1208275307 [argv] => Array ( ) [argc] => 0 ) [_FILES] => Array ( ) [HTTP_POST_FILES] => Array ( ) [_REQUEST] => Array ( [first_name] => Ian [last_name] => Oglesby [email] => ian.oglesby1@btinternet.com [password1] => hannah10 [password2] => hannah10 [submit] => Register [submitted] => TRUE [PHPSESSID] => 72b02f15f1f796b3e667476791390954 ) [live] => [email] => InsertRealAddressHere [page_title] => Register [_SESSION] => Array ( [sid] => sid ) [dbc] => Resource id #5 [fn] => [ln] => ) Please enter a valid email address! An error occurred in script '/home/ogl10b7/public_html/EricsCarRepairs/register.php' on line 44: preg_match() [function.preg-match]: No ending delimiter '^' found Date/Time: 4-15-200817:01:47 Array ( [GLOBALS] => Array *RECURSION* [_ENV] => Array ( [PATH] => /usr/local/bin:/usr/bin:/bin [PWD] => / [LANG] => C [SHLVL] => 1 [_] => /usr/sbin/apache2 ) [HTTP_ENV_VARS] => Array ( [PATH] => /usr/local/bin:/usr/bin:/bin [PWD] => / [LANG] => C [SHLVL] => 1 [_] => /usr/sbin/apache2 ) [_POST] => Array ( [first_name] => Ian [last_name] => Oglesby [email] => ian.oglesby1@btinternet.com [password1] => hannah10 [password2] => hannah10 [submit] => Register [submitted] => TRUE ) [HTTP_POST_VARS] => Array ( [first_name] => Ian [last_name] => Oglesby [email] => ian.oglesby1@btinternet.com [password1] => hannah10 [password2] => hannah10 [submit] => Register [submitted] => TRUE ) [_GET] => Array ( ) [HTTP_GET_VARS] => Array ( ) [_COOKIE] => Array ( [PHPSESSID] => 72b02f15f1f796b3e667476791390954 ) [HTTP_COOKIE_VARS] => Array ( [PHPSESSID] => 72b02f15f1f796b3e667476791390954 ) [_SERVER] => Array ( [HTTP_ACCEPT] => image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* [HTTP_REFERER] => http://loki.computing.boston.ac.uk/~ogl10b7/EricsCarRepairs/register.php [HTTP_ACCEPT_LANGUAGE] => en-gb [CONTENT_TYPE] => application/x-www-form-urlencoded [HTTP_UA_CPU] => x86 [HTTP_ACCEPT_ENCODING] => gzip, deflate [HTTP_USER_AGENT] => Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; InfoPath.2) [HTTP_HOST] => loki.computing.boston.ac.uk [CONTENT_LENGTH] => 135 [HTTP_CONNECTION] => Keep-Alive [HTTP_CACHE_CONTROL] => no-cache [HTTP_COOKIE] => PHPSESSID=72b02f15f1f796b3e667476791390954 [PATH] => /usr/local/bin:/usr/bin:/bin [SERVER_SIGNATURE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 Server at loki.computing.boston.ac.uk Port 80 [SERVER_SOFTWARE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 [SERVER_NAME] => loki.computing.boston.ac.uk [SERVER_ADDR] => 217.40.221.251 [SERVER_PORT] => 80 [REMOTE_ADDR] => 86.162.15.192 [DOCUMENT_ROOT] => /var/www/ [SERVER_ADMIN] => webmaster@localhost [SCRIPT_FILENAME] => /home/ogl10b7/public_html/EricsCarRepairs/register.php [REMOTE_PORT] => 53330 [GATEWAY_INTERFACE] => CGI/1.1 [SERVER_PROTOCOL] => HTTP/1.1 [REQUEST_METHOD] => POST [QUERY_STRING] => [REQUEST_URI] => /~ogl10b7/EricsCarRepairs/register.php [SCRIPT_NAME] => /~ogl10b7/EricsCarRepairs/register.php [PHP_SELF] => /~ogl10b7/EricsCarRepairs/register.php [REQUEST_TIME] => 1208275307 [argv] => Array ( ) [argc] => 0 ) [HTTP_SERVER_VARS] => Array ( [HTTP_ACCEPT] => image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* [HTTP_REFERER] => http://loki.computing.boston.ac.uk/~ogl10b7/EricsCarRepairs/register.php [HTTP_ACCEPT_LANGUAGE] => en-gb [CONTENT_TYPE] => application/x-www-form-urlencoded [HTTP_UA_CPU] => x86 [HTTP_ACCEPT_ENCODING] => gzip, deflate [HTTP_USER_AGENT] => Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; InfoPath.2) [HTTP_HOST] => loki.computing.boston.ac.uk [CONTENT_LENGTH] => 135 [HTTP_CONNECTION] => Keep-Alive [HTTP_CACHE_CONTROL] => no-cache [HTTP_COOKIE] => PHPSESSID=72b02f15f1f796b3e667476791390954 [PATH] => /usr/local/bin:/usr/bin:/bin [SERVER_SIGNATURE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 Server at loki.computing.boston.ac.uk Port 80 [SERVER_SOFTWARE] => Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 mod_jk/1.2.18 PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 [SERVER_NAME] => loki.computing.boston.ac.uk [SERVER_ADDR] => 217.40.221.251 [SERVER_PORT] => 80 [REMOTE_ADDR] => 86.162.15.192 [DOCUMENT_ROOT] => /var/www/ [SERVER_ADMIN] => webmaster@localhost [SCRIPT_FILENAME] => /home/ogl10b7/public_html/EricsCarRepairs/register.php [REMOTE_PORT] => 53330 [GATEWAY_INTERFACE] => CGI/1.1 [SERVER_PROTOCOL] => HTTP/1.1 [REQUEST_METHOD] => POST [QUERY_STRING] => [REQUEST_URI] => /~ogl10b7/EricsCarRepairs/register.php [SCRIPT_NAME] => /~ogl10b7/EricsCarRepairs/register.php [PHP_SELF] => /~ogl10b7/EricsCarRepairs/register.php [REQUEST_TIME] => 1208275307 [argv] => Array ( ) [argc] => 0 ) [_FILES] => Array ( ) [HTTP_POST_FILES] => Array ( ) [_REQUEST] => Array ( [first_name] => Ian [last_name] => Oglesby [email] => ian.oglesby1@btinternet.com [password1] => hannah10 [password2] => hannah10 [submit] => Register [submitted] => TRUE [PHPSESSID] => 72b02f15f1f796b3e667476791390954 ) [live] => [email] => InsertRealAddressHere [page_title] => Register [_SESSION] => Array ( [sid] => sid ) [dbc] => Resource id #5 [fn] => [ln] => [e] => )



Please enter a valid password!

Please try again.

Register
First Name:

Last Name:

Email:

Password: Use only letters and numbers. Must be between 4 and 20 characters long

Confirm Password:



Home
Register
Login
Forgot password
some other page
and again
  #5  
Old 15-Apr-2008, 10:25
oggie oggie is offline
New Member