Mombu the Php Forum

  Mombu the Php Forum > Php > parse error


User Name
Password
REGISTER NOW! Search Today's Posts Mark Forums Read


Reply
 
Thread Tools Search this Thread Display Modes
1 19th November 09:00
linda
External User
 
Posts: 1
Default parse error



Can anyone see the error! I've been looking for over three hours and I just
can find it. I'm getting a parse error. I just can't find it, what am I
missing? Sigh.... I hoping someone else can see it.

Best wishes,
Linda

<?php
$title = 'Register';
include_once 'includes/header.html';
?>
//Check if the form has been submitted.
if (isset($_POST[submitted])) {

$errors = array(); //Initialize error array.

//Check for a name.
if (empty($_POST['name'])) {
$errors[] = 'You forgot to enter your name.';
}

//Check for an email address.
if (empty($_POST['email'])) {
$errors[] = 'You forgot to enter your email address.';
}

//Check for a password and match against the confirmed password.
if (empty($_POST['password1'])) {
if ($_POST['password1'] !=$_POST['password2']) {
$errors[] = 'Your passwords did not match.';
}
} else{
$errors[] = 'You forgot to enter your password.';
}

//Register the user here.


//Send them an email.
$body = "Thank you for registering with us.\n\nYour Password Is:
'{$_POST['password1']}'.\n\nSincerely Admin\nMy domain name";
mail ($_POST['email']), 'Thank you for registering', $body, 'From:
admin@mydomain.co.uk';

echo '<h2>Thank You!</h2>
<p>You are now registered. An email has been sent to your email address
confirming the information.<br />';

//Report the errors.
}else{

echo '<h2>Error!</h2>\n
<p>The following error(s) occured:<br /></p>';

foreach ($errors as $msg) { //Print each error message.
echo " - $msg<br />\n";
}
echo '</p><p>Please correct the fields.<br /></p>';
} else{
//Display the form.
?>

<fieldset>
<legend><h2>Register For An Account</h2></legend>
<form action="register.php" method="POST">
<input type="hidden" value="TRUE" name="submitted" />
<p align="left">Please ensure the email you supply is valid, as accounts
where email confirmations bounced back after registration <b>are
deleted</b>!</p>
<table>
<tr>
<td>Name: </td>
<td><input type="text" name="name" size="50" /></td>
</tr>
<tr>
<td>Email Address: </td>
<td><input type="text" name="email" size="50" /></td>
</tr>
<tr>
<td>Password: </td>
<td><input type="password" name="password1" /></td>
</tr>
<tr>
<td>Confirm Password: </td>
<td><input type="password" name="password2" /></td>
</tr>
<tr>
<td COLSPAN="2" align="right"><input type="submit" value="Register" /></td>
</tr>
</table>
</form>
</fieldset>


<?php
}//Close the main IF_ELSE.
include_once 'includes/footer.html';
?>
  Reply With Quote
SPONSORED LINKS BY GOOGLE

 


2 28th July 07:20
lindsay
php
Mombu User
 
Join Date: Jul 2008
Location: los angales, ca
Posts: 1
lindsay is on a distinguished road
Default Re: parse error



Hi Linda,

This is a good PHP site i use, they might have an answer to your problem, i recommend you check it out.

http://www.fixya.com/support/p926112-php_group_php

Good luck,
Linds.
lindsay is offline   Reply With Quote
SPONSORED LINKS BY GOOGLE

 


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes







Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
Also visit Ogoun the Usenet Archive
666