Go Back   BioRUST Forums > Graphics Software & Support > HTML / PHP / ASP / JS

Reply
 
LinkBack Thread Tools Display Modes
Old 11-05-2007   #1 (permalink)
Registered User
 
Join Date: Nov 2007
Posts: 2

A Complete Membership System - [Dont know if its a problem]

hi, when i use the script for resending the mail when i put a mail that is in the database the script runs smoothly.
but when i put an emal that it isnt on the database it returns a blank page... i dont know where is the error, but, something is wrong

this is the code
PHP Code:
<?php
include 'config.php';

if(isset(
$_POST['resend']))
{

$email trim($_POST['email']);

$query mysql_query("SELECT Actkey FROM Users WHERE Email = '$email' LIMIT 1") or die(mysql_error());

while(
$row mysql_fetch_array($query)){

$act $row['Actkey'];

if(
mysql_num_rows($query) > 0)
{

$send mail($email "Activate your account" "Thank you for registering with YourWebsite.\n\nClick the link below to activate your account:\nhttp://CHANGETHISURL.COM/activate.php?id=".$act."\n\nPlease do not reply, this is an automated mailer.\n\nThanks""FROM: auto@mailer.com");

if(
$send){

echo 
'
<html>
<head>
<title>Success</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>

<body>

<div id="wrapper">

<div id="head">the resend activation email page</div>
<br>
<div id="success">
<p>The validation email was successfully sent. <a href="login.php">Click here</a> to login once you have activated.</p>
</div>
</div>

</body>
</html>
'
;

} else {

echo 
'
<html>
<head>
<title>Error</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>

<body>

<div id="wrapper">

<div id="head">the resend activation email page</div>
<br>
<div id="error">
<p>Ha, what an act. There has been an error processing your activation email. Please contact the administrator.</p>
</div>
</div>

</body>
</html>
'
;

}

} else {

echo 
'
<html>
<head>
<title>Error</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>

<body>

<div id="wrapper">

<div id="head">the resend activation email page</div>
<br>
<div id="error">
<p>Sorry, your email was not found in the database, please enter an email address that you have registered with and not recieved and email with.</p>
</div>
</div>

</body>
</html>
'
;

}

}

} else {

?>
<html>
<head>
<title>Resend validation email</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>

<body>

<div id="wrapper">

<div id="head">the resend activation email page</div>
<br>
<div id="main">
<p>Ok, so your activation email didn't get sent? DAMN S**T C*H(#@ ((@J no, stop swearing, put that bottle down. You don't need it. We need each other. I'm here to resend your email, so enter your email address, and I will send the validation link to that email, provided you have registered ofcourse, if you are trying to hack me, what a sad guy, taking advantage of my emotions like that... jeez.</p>
<form method="post" action="<?= $_SERVER['PHP_SELF'?>">
<p>Email:<br>
<input name="email" type="text">
<p>
<input name="resend" type="submit" id="resend" value="Resend">
</form>
</p>
Once you enter your email and hit resend, I will make sure your email is valid, then send you out your validation link. If it doesn't come, try me again! I'm not a one night stand you know...
<p>By the way, I am very (case) sensitive so enter the email exactly as you registered with it. </p>
</div>
</div>

</body>
</html>
<? mysql_close($l); ?>
TIA
sorry about my poor english
shinydarkstone is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-05-2007   #2 (permalink)
PHP Lover
 
Join Date: May 2007
Location: Zug, Switzerland
Posts: 84

Do you get any error message at all? At the top of your page you can set
PHP Code:
error_reporting(E_ALL); 
and then we can see what error you get
__________________
You can call me Greg or Greggy, as you wish
Gjbphp is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-05-2007   #3 (permalink)
Registered User
 
Join Date: Nov 2007
Posts: 2

lol, nope, it still displaying the page empty
but thats a nice advice tnx
shinydarkstone is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-06-2007   #4 (permalink)
Rusty Bio-Hazard!
 
notjustgraphics's Avatar
 
Join Date: Sep 2006
Location: Toronto, Ontario, Canada
Posts: 1,026

Send a message via MSN to notjustgraphics
If you're getting a blank page and no error code is generated, check your error logs if you can.

Mike.
__________________
notjustgraphics is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-06-2007   #5 (permalink)
PHP Lover
 
Join Date: May 2007
Location: Zug, Switzerland
Posts: 84

Can you also post the code in the config for me please, because this code here, looks like it evaluates and executes fine. The only thing that will stop execution is the die(mysql_error()); but then you get an error

What you can do is try commenting out different parts of the code so something like

PHP Code:
if($send){

/*

echo '
<html>
<head>
<title>Success</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>

<body>

<div id="wrapper">

<div id="head">the resend activation email page</div>
<br>
<div id="success">
<p>The validation email was successfully sent. <a href="login.php">Click here</a> to login once you have activated.</p>
</div>
</div>

</body>
</html>
';
*/

################added this here ################
echo 'This would have sent';

} else {

/*
echo '
<html>
<head>
<title>Error</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>

<body>

<div id="wrapper">

<div id="head">the resend activation email page</div>
<br>
<div id="error">
<p>Ha, what an act. There has been an error processing your activation email. Please contact the administrator.</p>
</div>
</div>

</body>
</html>
';
*/

################added this here ################
echo 'This would not have sent';

just to check if the code blocks are executing alright and then try narrowing things down from there.
__________________
You can call me Greg or Greggy, as you wish
Gjbphp is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
A Complete Membership System - [PROBLEM] Javva HTML / PHP / ASP / JS 1 05-25-2007 11:45 AM
FAQ: A Complete Membership System scrowler BioRUST Specific Threads 13 01-18-2007 11:16 PM
A Complete Membership System Tones HTML / PHP / ASP / JS 0 01-14-2007 02:42 PM
RE: A Complete Membership System ThEMakeR HTML / PHP / ASP / JS 0 07-18-2006 12:59 PM


All times are GMT +1. The time now is 08:49 AM.
Content Relevant URLs by vBSEO 3.2.0 RC7

Design & Content © BioRUST 2007 :: PRIVACY STATEMENT :: LEGAL INFORMATION :: ADVERTISING MEDIA KIT