Code produces blank screen???

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Linkjames
Forum Commoner
Posts: 90
Joined: Tue Sep 16, 2003 8:39 am

Code produces blank screen???

Post by Linkjames »

This is a double opt in email code. It should check the verification against the database and either activate the account or produce an error. It simply produces a blank screen. I assumed it was a missing ; or } but I can't find anything missing. Anyone spot the problem? Cheers guys - Linkjames

Code: Select all

<? // First part of script time script ?>
<?PHP include("includes/exetime1.php"); ?>
<?PHP include("template/textcolour.php"); ?>
<body bgcolor="<?php echo $bgcolor ?>" text="<?php echo $text ?>" link="<?php echo $link ?>" vlink="<?php echo $vlink ?>" alink="<?php echo $alink ?>">
<?PHP include("template/tablestart.php"); ?>
<?PHP include("template/font.php"); ?>
<FONT face="<?php echo $face ?>" size="<?php echo $size ?>">
<?PHP
//Connect to MySql
include("includes/connect.php");
//Select Database
include("includes/dbselect.php");
$verifycode = $_GET['verifycode'];
$result = @mysql_query("SELECT * FROM users WHERE verifycode LIKE '$verifycode'");
if (mysql_num_rows($result) == 0) {
echo 'There was an error activating your account. You may need to sign up again';
}
else {
$row = mysql_fetch_array($result);
$code = ('');
&verifyed = ('1');
$id = $row['id'];
$username = $row['username'];
$email = $row['email'];
$verifyresult = @mysql_query("UPDATE users SET verifycode = '$code', verifyed = '$verifyed' WHERE id = '$id'");
echo 'Thank you';
echo $username;
echo 'Your email';
echo $email ;
echo 'has been varified and you are now logged in. Click here to go to the home page.';
}
?>
<?PHP
// Second part of script time script ?>
<?PHP include("includes/exetime2.php"); ?>
<?PHP include("template/tableend.php"); ?>
</font>
</body>
Linkjames
Forum Commoner
Posts: 90
Joined: Tue Sep 16, 2003 8:39 am

Post by Linkjames »

Typical. Put and & in front of

Code: Select all

verifyed = ('1');
Post Reply