Hey.. I've been working on these sign up / log in forms for my new Game Site, and everything else in the game works but the registration!! I keep ketting the unexpected $end and Im tired of it! Here is the code... SOMEBODY PLEASE HELP ME!! I'm going crazy! haha - <?php
-
//This contains user stuffs
-
switch($_GET['action'])
-
{
-
case 'newuser': new_user_form(); break;
-
case 'newusersub': new_user_submit(); break;
-
case 'edituser': edit_user_begin(); break;
-
case 'edituserform': edit_user_form(); break;
-
case 'editusersub': edit_user_sub(); break;
-
case 'invbeg': inv_user_begin(); break;
-
case 'invuser': inv_user_view(); break;
-
case 'deleinv': inv_delete(); break;
-
case 'creditform': credit_user_form(); break;
-
case 'creditsub': credit_user_submit(); break;
-
case 'masscredit': mcredit_user_form(); break;
-
case 'masscreditsub': mcredit_user_submit(); break;
-
case 'reportsview': reports_view(); break;
-
case 'repclear': report_clear(); break;
-
case 'deluser': deluser(); break;
-
case 'forcelogout': forcelogout(); break;
-
}
-
function htmlspcl($in)
-
{
-
return str_replace("'", "'", htmlspecialchars($in));
-
}
-
function new_user_form()
-
{
-
print "Registration<br />
-
<form action='register.php method=post?action=newusersub' method='post'>
-
Username: <input type='text' name='username' /><br />
-
Email: <input type='text' name='email' /><br />
-
Password: <input type='text' name='userpass' /><br />
-
Your Referrers ID:</td><td><input type=text name=referrer value='".$_GET["REF"]."'><br /> <br />
-
<input type='submit' value='Create User' /></form>";
-
}
-
{
-
if($_POST['password'] != $_POST['cpassword'])
-
{
-
print "<b>Registration</b><form action=register.php method=post><table width='75%' border='0'>
-
<tr>
-
<td colspan='2' align='center'><span style='color:red; font-weight: 800;'>! ERROR: The passwords did not match</span></td>
-
</tr>
-
<tr>
-
<td width='50%'>Username:</td><td><input type=text name='username'></td>
-
</tr>
-
<tr>
-
<td width='50%'>Password:</td><td><input type=password name='userpass'></td>
-
</tr>
-
<tr>
-
<td width='50%'>Confirm Password:</td><td><input type=password name='cpassword'></td>
-
</tr>
-
<tr>
-
<td width='50%'>E-Mail Address:</td><td><input type=text name='email' ><br> <font color=red>Must be valid in order to activate your account!!!!!!</font></td>
-
</tr>
-
<tr>
-
<td width='50%'>Your Referrers ID:</td><td><input type=text name=referrer value=".$_GET["REF"]."'></td>
-
</tr>
-
<tr>
-
<td colspan='2' align='center'><input type='submit' value='Create User' /></td>
-
</tr></table></form>";
-
}
-
exit;
-
{
-
$r=@mysql_fetch_array($q);
-
$pass=strip_tags($r['userpass']);
-
$pass=md5($pass);
-
$username=($r['username']);
-
$email=($r['email']);
-
$money=($r['money']);
-
$db->query("INSERT INTO users (username, userpass,level, money, crystals, donatordays, energy, maxenergy, will, maxwill,brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney) VALUES( '{$_POST['username']}', md5('{$_POST['userpass']}'), '1', '1000', '0', '3', '12', '12', 100, 100, '3', '3', '100', '100', 1, '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', -1)");
-
$i=@mysql_insert_id($c);
-
-
mail( $_POST['email'], "Murder Town Account Validation",
-
"Hi {$username},
-
-
Your email has just been used to register an account on Mafia Fight Club.
-
-
To validate your account, copy and paste this into your browsers address bar:
-
http://www.murder-town.com/validate.php?act=val&token=$key
-
<a href='http://www.murder-town.com/validate.php?act=val&token=$key'>AOL users click here to validate your account</a>
-
-
Or to cancel the registration:
-
http://www.murder-town.com/validate.php?act=can&token=$key
-
<a href='http://www.murder-town.com/validate.php?act=can&token=$key'>AOL users click here to cancel your account</a>
-
-
Username: $username
-
Password: {$_POST['userpass']}
-
-
Thanks,
-
Diego ", "From: validations@murder-town.com");
-
mysql_query("UPDATE users SET crystals='crystals+8' WHERE userid={$_POST['referrer']}",$c) or print mysql_error();
-
print "<b>Registration Complete</b><br />
-
Please check your email to validate your Mafia Fight Club account and begin playing or go login.<br>
-
<b>Note:</b> The email may have been sent to your spam/junk box, please check these if you cannot find it.<br>";
-
$q = mysql_query("SELECT `username` FROM `users` WHERE `userid` = ".$_POST["referrer"]."") or print mysql_error();
-
print "<i>For reffering you to Murder Town, ".mysql_result($q,0,0)." has recieved eight crystals!";
-
}
-
{
-
print "<b>Registration Complete</b><br>
-
Please check your email..our validation link is acting abnormal so if it doesnt not work, message Diego at joerollsresurrected@hotmail.com to validate your Mafia Fight Club account and begin playing.<br>
-
<b>Note:</b> The email may have been sent to your spam/junk box, please check these if you cannot find it.<br><b>You have until midnight EST to validate your account, and the staff is online at all times.<br> Please do so as soon as possible or it will be deleted.</b>";
-
}
-
{
-
print "<b>Registration</b><br />
-
You will receive an email to the address you specify, follow the instructions there to validate your account.
-
<form action=register.php method=post><table width='400' border='1'>
-
<tr>
-
<td width='50%'>Username:</td><td><input type=text name=userid></td>
-
</tr>
-
<tr>
-
<td width='50%'>Password:</td><td><input type=password name=password></td>
-
</tr>
-
<tr>
-
<td width='50%'>Confirm Password:</td><td><input type=password name=cpassword></td>
-
</tr>
-
<tr>
-
<td width='50%'>E-Mail Address:</td><td><input type=text name=email><br> <font color=red>Must be valid</font></td>
-
</tr>
-
<tr>
-
<td width='50%'>Your Referrers ID:</td><td><input type=text name=referrer value='".$_GET["REF"]."'></td>
-
</tr>
-
<tr>
-
<td width='50%'>Promo Code:</td><td><input type=text name=promo></td>
-
</tr>
-
<tr>
-
<td colspan='2' align='center'><input type='submit' value='Register' /></td>
-
</tr></table></form>";
-
{
-
print "Registration Complete!<br />
-
<a href='login.php'>> Go to Login</a>";
-
}
-
$h->endpage();
-
?>
1 6467 nathj 938
Recognized Expert Contributor
Hi,
I've had a look over the code and I think the problem is with the { characters you've got, the } don't atch up. One example of this is on line 72 - it appears that there is a'{' that is not needed.
There are a couple of overs with the IF structure you use. I'd read through the code and make sure they all match properly. Then try it again.
Cheers
nathj
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Janwillem Borleffs |
last post by:
Q: I'm getting an unexpected $ or $end parse/syntax error, what's causing
this?
A: This is caused when an expression is started with an opening brace, but
the closing brace is omitted.
Examples:
if ($condition) {
....
// No closing brace; the error is thrown
|
by: Wescotte |
last post by:
The error message Parse error: syntax error, unexpected $end in FILE on
line X is one I run into frequently and I know the cause is I missed an
ending quote.
Is there an easy way to determine where the inital " started? I find
myself adding /* */ blocks or cutting/pasting sections of code out in
order to find where the error occured.
Wouldn't it it be nice if the warning message included the line in teh
source where the initial quote ...
|
by: kestrel |
last post by:
I have some html code that is supposed to be displayed by php echo. But for some reason i keep getting a syntax error, and i cant figure out what is going on.
Heres what i have
<?php
if(isset($_GET)) {
echo "<div id="visible">";
echo "<span onclick="swapform()">Log In Form</span>";
echo "</div>";
echo "<div id="theform" style="visibility: hidden">";
|
by: rhys |
last post by:
My Gurus and Angels --
Please pardon this old-school programmer, only recently enlightened to open-source, having been trapped in the convenience of proprietary lingos for way too long. My shortcomings will soon become apparent.
I am developing an estimating construction system, using PHP5 and MySQL 5.0.24a with Ubuntu. I have a main "projects" file, and 2 detail files, one for piping and one for equipment. Each of these files will have...
|
by: praclarush |
last post by:
I've just started php, and this is a class assignment, but my question is I’m getting this error PHP Parse error: syntax error, unexpected T_IF, expecting T_VARIABLE or '$' in C:\wamp\www\ssp\SSP04\guessingGame.php on line 42. I’ve tried to make sense of it but I’m at a lose, there error is referring to this segment of the code.
else{
if(!isset($_GET)){
echo "<p>****</p>";
$guess = "****";
}//end if
//declaring some...
| |
by: ajd335 |
last post by:
Hi all...
I am getting an error Parse error: syntax error, unexpected $end in http:/..... on line 117...(117 is the EOF)..
can you plz help me out..I have checked out for the < , > ,{ ,} etc....
I donno where m wrong....
<?php
class S_Shipping {
// Private variables.
|
by: fburn |
last post by:
I need some help with an error I'm getting using php 5.2.5 running on linux.
I receive an error:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /var/www/html/inventoryControl/supplier.php on line 26 (line number changed to match code tags)
The code is as follows:
// get a supplier using the supplier id
|
by: akohistani |
last post by:
I am having Parse error problem with my newly purchased Php upload script I have uploaded the script and I get the error below
Parse error: syntax error, unexpected $end in URL/functions.php on line 400
Someone please help me I contacted the owner of the script where I purchased he is not replying me I bought it from http://www.scubadivingcalculators.com/
and this is the url where I have uploaded the script...
|
by: benicio |
last post by:
Parse error: syntax error, unexpected T_STRING, expecting '(' in C:\wamp\www\study_group\includes\functions.php on line 19
I got this error and this syntax is from 8 to 19th line.
<?php
$subject_set = get_all_subjects();
while ($subject = mysql_fetch_array($subject_set)) {
echo "<li>{$subject}</li>";
$page_set = get_pages_for_subject($subject);
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| | |