Jump to content
MakeWebGames

Chuckster

Members
  • Posts

    30
  • Joined

  • Last visited

    Never

Chuckster's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi guys. Ive recently just got a registration for surveys for my game. But i cant seem to get it it work in a page called surveys.php Heres the code im using, but its all errored up.:   <?php include "globals.php"; print <<<EOF <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script type="text/javascript" src="http://www.cpalead.com/mygateway.php?pub=115449&gateid=MTI5NTky"></script> </head> </html> ?>   Please help me! Thanks
  2. So any other ideas??? Or could someone possibly post a working register.php? ?(
  3. yes its included :/
  4. User defo has all privs.   <? $conn = mysql_connect("localhost","MY USERNAME","MY PASS"); $db = mysql_select_db("DATABASE NAME"); ?>
  5. Now im getting , No database selected XD In the dbconfig file the database and all that is DEFO correct.
  6. hmm ok. But whats the deal with it not inserting a new user to the database?
  7. Also, i think another problem is that when i make an account, its not inserting to the database. It says ive succecfully made an account, but there is still no users in the database... I think that problem may be coming from a different part of the code.
  8. Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /***/***/***/register.php on line 13 :s
  9. Thanks, but now thw error is : Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home2/mafiakil/public_html/GRPG/register.php on line 12 :(
  10. could you please tell me what lines to replace??? I have no isea were to place that code ;)
  11. thats a replacment of line 11. Right? Well i replaced that, and still the same error. Isnt the error on line 13?
  12. Ohh, and i also removed that line, no longer getting that error, but nw it wont let me login. So i still think the register.php is fuked:(
  13. This is the wrong section. I know. Wont let me make a thread in support. When i try to register, im getting this error: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /***/***/public_html/GRPG/register.php on line 13 This is my register.php <? include 'nliheader.php'; if (isset($_POST['submit'])) { $username = strip_tags($_POST["newname"]); $signuptime = time(); $password = $_POST["newpass"]; $password2 = $_POST["newpassagain"]; $email = $_POST["email"]; $checkuser = mysql_query("SELECT * FROM `grpgusers` WHERE `username`='$username'"); $username_exist = mysql_num_rows($checkuser); if($username_exist > 0){ $message .= "<div>I'm sorry but the username you chose has already been taken. Please pick another one.</div>"; } if(strlen($username) < 4 or strlen($username) > 20){ $message .= "<div>The username you chose has " . strlen($username) . " characters. You need to have between 4 and 20 characters.</div>"; } if(strlen($password) < 4 or strlen($username) > 20){ $message .= "<div>The password you chose has " . strlen($password) . " characters. You need to have between 4 and 20 characters.</div>"; } if($password != $password2){ $message .= "<div>Your passwords don't match. Please try again.</div>"; } if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)) { $message .= "<div>The e-mail address you entered was invalid.</div>"; } //insert the values if (!isset($message)){ $result= mysql_query("INSERT INTO `grpgusers` (ip, username, password, email, signuptime, lastactive)". "VALUES ('".$_SERVER['REMOTE_ADDR']."', '$username', '$password', '$email', '$signuptime', '$signuptime')"); echo Message('Your account has been created successfully! Redirecting to login page in 5 seconds. <meta http-equiv="refresh" content="5;url=login.php">'); if ($_POST['referer'] != ""){ $result= mysql_query("INSERT INTO `referrals` (`when`, `referrer`, `referred`)". "VALUES ('$signuptime', '".$_POST['referer']."', '".$username."')"); } die(); } } ?> <? if (isset($message)) { echo Message($message); } ?> <tr><td class="contenthead"> .: Register </td></tr> <tr><td class="contentcontent"> <table width='28%' border='0' align='center' cellpadding='0' cellspacing='0'> <form name='register' method='post' action='register.php'> <tr> <td height='26'><font size='2' face='verdana'>Username</font></td> <td><font size='2' face='verdana'> <input type='text' name='newname'> </font></td> </tr> <tr> <td height='28'><font size='2' face='verdana'>Password</font></td> <td><font size='2' face='verdana'> <input type='password' name='newpass'> </font></td> </tr> <tr> <td height='28'><font size='2' face='verdana'>Confirm Password</font></td> <td><font size='2' face='verdana'> <input type='password' name='newpassagain'> </font></td> </tr> <tr> <td height='26'><font size='2' face='verdana'>Email address</font></td> <td><font size='2' face='verdana'> <input type='text' name='email'> </font></td> </tr> <tr> <td></td> <td><font size='2' face='verdana'> <input type='hidden' name='referer' value='<? echo $_GET['referer'] ?>'> <input type='submit' name='submit' value='Register'> </font></td> </tr> </table> </form> <center> © 2007 MyNeoCorp Productions </center> </td></tr> <? include 'nlifooter.php'; ?>   Wheres the problem there? ?(
  14. when someone trys to goto the page when not loged in it just redirrects them back to teh login page :/
  15. Thanks alot danny. But just so you know, It doesnt work if you make them donator only citys from staff panel XD Only works if you do it through phpmyadmin XD Anyway, i would rather do it that way anyway ;)
×
×
  • Create New...