|
Posted by Juliette on 11/05/05 07:31
Ehartwig wrote:
> I recently created a script for user verification, solved my emailing
> issues, and then re-created the script in order to work well with the
> new PHP 5 that I installed on my server. After submitting user
> information into my creation script, I get the following error from the
> page that is suppose to insert the user data into the database, create
> a code, then send an email out for verification.
>
> Parse error: parse error, unexpected $end in
> c:\wamp\www\thread\create\add2tbl.php on line 31
>
> Below are the files in which I am using:
>
> add2tbl.php
>
> <?php
> require "mailfunctions.php";
> $username = $_POST['username'];
> $md5password2 = md5($_POST['pass2']);
> $email = $_POST['email'];
> $md5password = md5($_POST['pass']);
> if(isset($_POST['username'])) {
> if ($md5password == $md5password2) {
> $db = dbc();
> $code = codegen();
> $user = insertuser($username, $md5password, $email, $code);
> if ($user == FALSE) {
> die("There has been an error in adding you to the Database. Please
> EMail the admin.");
> }
> else {
> echo "<b>Passwords do not match!</b> ";
> }
> include("/top.html");
>
> $mail = mailauth($username);
> if ($mail) {
> echo '
> <p class = "subtitle">Success! Check your email.</p>';
> } else {
> echo '
> <p class = "subtitle">We are sorry. The request did not go through
> successfully due to an error in the Mail server. Please contact the
> Admin.</p>';
>
> }
> include("/bottom.html");
> }
> ?>
>
<snip>
You are missing a closing bracket in the add2tbl.php file.
Based on the layout, my guess would be that it should come after:
> if ($user == FALSE) {
> die("There has been an error in adding you to the Database.
Please EMail the admin.");
Even so, could just as easily go elsewhere as your indenting is pretty
inconsistent (I didn't study the code).
Grz, J.
Navigation:
[Reply to this message]
|