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

Reply
 
LinkBack Thread Tools Display Modes
Old 02-20-2008   #1 (permalink)
Registered User
 
Join Date: Feb 2008
Posts: 3

Angry Complete Membership(register.php)...FOR THE LOVE OF GOD HELP

I downloaded the zip file, unzipped it, and uploaded it to my server. I made the database tables and all that. The only thing I changed is the website name in the email, unless I am missing something. But when the registration is submitted, I get the error message "Something wrong with the script," or whatever it is. This will be the second time completely redoing the membership part using this script. The very first time I set up the scripts, it worked fine. After that I just kept getting the same damn error message. PLEASE HELP ME...

<?php

include 'config.php';

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

$first = addslashes(trim($_POST['firstname']));
$surname = addslashes(trim($_POST['surname']));
$username = addslashes(trim($_POST['username']));
$email = addslashes(trim($_POST['email']));
$pass = addslashes(trim($_POST['password']));
$conf = addslashes(trim($_POST['confirm']));

$ip = $_SERVER['REMOTE_ADDR'];
$date = date("d, m y");

if ( $_POST['password'] == $_POST['confirm'] )
{}else{

echo '<script>alert("Your passwords were not the same, please enter the same password in each field.");</script>';
echo '<script>history.back(1);</script>';
exit;

}

$password = md5($pass);

if ((((( empty($first) ) || ( empty($surname) ) || ( empty($username) ) || ( empty($email) ) || ( empty($pass) )))))
{

echo '<script>alert("One or more fields was left empty, please try again.");</script>';
echo '<script>history.back(1);</script>';
exit;

}

if((!strstr($email , "@")) || (!strstr($email , ".")))
{

echo '<script>alert("You entered an invalid email address. Please try again.");</script>';
echo '<script>history.back(1);</script>';
exit;

}

$q = mysql_query("SELECT * FROM Users WHERE Username = '$username'") or die(mysql_error());
if(mysql_num_rows($q) > 0)
{

echo '<script>alert("The username you entered is already in use, please try again.");</script>';
echo '<script>history.back(1);</script>';
exit;

}

$name = $first . ' ' . $surname;
$actkey = mt_rand(1, 500).'f78dj899dd';
$act = sha1($actkey);

$query = mysql_query("INSERT INTO Users (Username, Password, Name, Email, Date, IP, Actkey) VALUES ('$username','$password','$name','$email','$date', '$ip','$act')") or die(mysql_error());
$send = mail($email , "Registration Confirmation" , "Thank you for registering with Scarringthesurface.\n\nYour username and password is below, along with details on how to activate your account.\n\nUser: ".$username."\nPass: ".$pass."\n\nClick the link below to activate your account:\nhttp://scarringthesurface.com/accounts/activate.php?id=".$act."\n\nPlease do not reply, this is an automated mailer.\n\nThanks", "FROM: auto@mailer.com");

if(($query)&&($send))
{

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

<body>

<div id="success">
<p>Thank you for registering, you will recieve an email soon with your login details and your activation link so that you can activate your account.</p>
<p><a href="login.php">Click here</a> to login once you have activated.</p>
</div>

</body>
</html>
';

} else {

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

<body>

<div id="error">
<p>We are sorry, there appears to be a problem with our script at the moment.</p>
<p>Your data was not lost. Username: '.$username.' | Password: '.$pass.' | Email: '.$email.' | Full name: '.$name.'</p>
<p>Please try again later.</p>
</div>

</body>
</html>
';

}

} else {

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

<body>

<div id="wrapper">

<div id="head">the registration page</div>
<br>
<div id="main">
<p>Welcome to the registration, fill out the form below and hit Submit. All fields are required,so fill them all out! </p>
<form action="<?= $_SERVER['PHP_SELF'] ?>" method="post">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr class="firstRow">
<td width="50%">First name </td>
<td width="50%"><input name="firstname" type="text" class="textBox" id="firstname"></td>
</tr>
<tr class="secondRow">
<td>Surname</td>
<td><input name="surname" type="text" class="textBox" id="surname"></td>
</tr>
<tr class="firstRow">
<td>Email Address </td>
<td><input name="email" type="text" class="textBox" id="email"></td>
</tr>
<tr class="secondRow">
<td>Username</td>
<td><input name="username" type="text" class="textBox" id="username"></td>
</tr>
<tr class="firstRow">
<td>Password</td>
<td><input name="password" type="password" class="textBox" id="password"></td>
</tr>
<tr class="secondRow">
<td>Confirm Password </td>
<td><input name="confirm" type="password" class="textBox" id="confirm"></td>
</tr>
<tr class="firstRow">
<td>Register</td>
<td><input name="submit" type="submit" class="textBox" value="Submit"></td>
</tr>
</table>
</form>
Upon confirmation of your details, you will be sent an email containing your username, password and details on how to activate your account so as to be able to use this website. </div>

</div>

</body>
</html>

<? } mysql_close($l); ?>
thepoor666 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-21-2008   #2 (permalink)
Registered User
 
Join Date: Sep 2007
Posts: 9

First of all, do you really expect to get help using all the vulgarity?
Second of all, unless you ACTUALLY provide the exact error msg, we cant help you what so ever.
alteredillusion is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-21-2008   #3 (permalink)
Janitor of Lunacy
 
tamlin's Avatar
 
Join Date: May 2006
Location: Sitting in the Wishing Chair
Posts: 4,593

Quote:
Originally Posted by alteredillusion View Post
unless you ACTUALLY provide the exact error msg, we cant help you what so ever.
Heh heh...yeah. "Something wrong with the script" isn't exactly much help to anyone.
__________________


Religion: It's all fun and games until someone gets burned at the stake...
tamlin is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-21-2008   #4 (permalink)
Registered User
 
Join Date: Feb 2008
Posts: 3

This tells me you haven't looked at the script, since the error message is written in the code.
thepoor666 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-21-2008   #5 (permalink)
Eternal Being
 
Join Date: Feb 2006
Location: Finland
Posts: 239

Quote:
I get the error message "Something wrong with the script," or whatever it is
Let us know what the "whatever it is", actually is. Take a printscreen or copy paste the whole text here.
__________________
Telos is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-22-2008   #6 (permalink)
Registered User
 
Join Date: Feb 2008
Posts: 3

<div id="error">
<p>We are sorry, there appears to be a problem with our script at the moment.</p>
<p>Your data was not lost. Username: '.$username.' | Password: '.$pass.' | Email: '.$email.' | Full name: '.$name.'</p>
<p>Please try again later.</p>
</div>

I have a feeling it has something to do with the mail part, but I'm not sure.
thepoor666 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-22-2008   #7 (permalink)
Registered User
 
Join Date: Oct 2007
Posts: 10

Is it a custom error that you have setup in the webserver? Because this isnt the erro that PHP shows when it encounters an error.
cancer10 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-28-2008   #8 (permalink)
Registered User
 
Join Date: Mar 2008
Posts: 1

Cool Complete Membership

Another newbie question...

I installed the script and everything works except the e-mail activation? However, I do see the username & password correctly added in the mysql. I get the following error:

"We are sorry, there appears to be a problem with our script at the moment.

Your data was not lost. Username: myname | Password: xxxxx| Email: name@name.net | Full name: jane doe

Please try again later."

How do I setup the script correctly with the webserver so the user can receive the e-mail activation? I made sure all the "CHANGETHISURL.COM" was changed and all other urls. Thank you. Arnold

Last edited by iaqsuk; 03-28-2008 at 07:48 PM. Reason: corrections
iaqsuk is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-29-2008   #9 (permalink)
Registered User
 
Join Date: Aug 2004
Posts: 105

Be certain this part of the code is correctly changed;

PHP Code:
"FROM: auto@mailer.com"
Also realize some web hosts will not allow the "FROM" field to be used when sending mail with php.
Jolt 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
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
A Complete Membership System tutorial stingerblue HTML / PHP / ASP / JS 2 05-18-2005 05:19 AM


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

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