SitePoint Sponsor

User Tag List

Results 1 to 25 of 25
  1. #1
    SitePoint Guru TacMaf's Avatar
    Join Date
    Dec 2005
    Location
    Manchester, United Kingdom
    Posts
    663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy Register Script Help

    OK well at first I had a perfectly good profile script but I changd it so an email was sent containing a randon password.

    Here is my form:

    PHP Code:
    <form name="form1" method="post" action="register2.php">
    <
    table align=center border=1 bordercolor=black bgcolor=#5e5e5e cellspacing=0 cellpadding=2>
    <tr><td align=center background=tablebg.jpg><font face=verdana size=1 color=white><b>Registration</td></tr>
    <
    tr bgcolor=#333333><td align=center><font face=verdana size=1 color=white><b>*Please Only Click "Register" Once*</td></tr>
    <tr><td>
    <
    font face=verdana size=1>
    Username: <input type="text" style="background: #a7a7a7; color: black; font-size: 8pt; font-family: verdana; border-width: 1; border-color: black;" name=username  value=""><br>
    Email: <input type="text" style="background: #a7a7a7; color: black; font-size: 8pt; font-family: verdana; border-width: 1; border-color: black;" name=email value=""><br>
    Confirm Email: <input type="text" style="background: #a7a7a7; color: black; font-size: 8pt; font-family: verdana; border-width: 1; border-color: black;" name=email1 value=""><br>
    Starting Location: <select style="background:  BFBEBE; color: black; border-width: 1; border-color: black;" name=location>
    <
    option value=GreaterManchester>Greater Manchester
    <option value=London>London
    <option value=Birmingham>Birmingham
    <option value=Lancashire>Lancashire
    <option value=Cumbria>Cumbria
    <option value=Essex>Essex
    <option value=Cardiff>Cardiff
    <option value=Edinburgh>Edinburgh
    </select></td></tr>
    <
    tr><td align=center><input type=submit style="background: #a7a7a7; color: black; font-size: 8pt; font-family: verdana; border-width: 1; border-color: black;" name=submit value="submit"></td></tr>
    </
    form




    here is the script:

    PHP Code:
    <?php
    session_start
    ();
    include_once
    "connect.php";
    if (isset(
    $_SESSION['username'])){
    header("Location: login_success.php");
    exit();
    }

    if (
    $_POST['submit']){
    // Define post fields into simple variables
    $reg_username $_POST['username'];
    $email $_POST['email'];
    $email1 $_POST['email1'];
    $location=strip_tags($_POST['location']);
    $reg_username=trim($reg_username);
    $today gmdate('Y-m-d h:i:s');
    $reg_username stripslashes($reg_username);
    $email stripslashes($email);
    $quote stripslashes($quote);
    $reg_username strip_tags($reg_username);
    $email strip_tags($email);
    if((!
    $reg_username) || (!$email) || (!$location)){
    echo 
    "Please fill in all fields!";
    include 
    'register5.php';
    exit();
    }else{
    if (
    $email != $email1){
    echo 
    "Emails dont match!";
    include 
    'register5.php';
    exit();
    }elseif (
    $email == $email1){
    if (
    ereg('[^A-Za-z]'$reg_username)) {
    echo 
    "Username can only contain letters!";
    include 
    'register5.php';
    exit();
    }elseif (!
    ereg('[^A-Za-z]'$reg_username)) {
    if (
    strlen($reg_username) <= || strlen($reg_username) >= 40){
    echo 
    "The username is to big or to small!";
    include 
    'register5.php';
    exit();
    }elseif (
    strlen($reg_username) > || strlen($reg_username) < 40){


    $sql_email_check mysql_query("SELECT email FROM users
                WHERE email='
    $email' AND status='Alive'");
    $sql_username_check mysql_query("SELECT username FROM users
                WHERE username='
    $reg_username'");

    $email_check mysql_num_rows($sql_email_check);
    $username_check mysql_num_rows($sql_username_check);

    if((
    $email_check 0) || ($username_check 0)){
        echo 
    "Im sorry but there has been an error please read on..<br />";
        if(
    $email_check 0){
        echo 
    "That email is already being used!";
            include 
    'register5.php';
    exit();
            unset(
    $email);
        }
        if(
    $username_check 0){
            echo 
    "Your desired username is already in use!";
            include 
    'register5.php';
            exit();
            unset(
    $reg_username);
        }


    $ip $_SERVER['REMOTE_ADDR'];

    $random_password22=rand(11111,99999999);

    mysql_query("INSERT INTO `user_info` ( `id` , `username`)
    VALUES (
    '', '
    $reg_username')");

    mysql_query("INSERT INTO `users` ( `id` , `username` , `password` , `activated` , `money` , `online` , `crimechance` , `lastcrime` , `rankpoints` , `userlevel` , `lasttop` , `status` , `regged` , `rank` , `layout` , `email` , `quote` , `image` , `location` , `bullets` , `gtachance` , `lastgta` , `lasttravel` , `bank` , `banktime` , `last_race` , `music` , `crew` , `get_away_time` , `get_away` , `health` , `energy` , `last_ext` , `lasttran` , `drugprices` , `drugs` , `l_ip` , `r_ip` , `crew_invite` , `referral` , `weapon` , `mission` , `points` , `lpv` , `page` , `editor` , `food_chance` , `last_food` , `last_order` , `freinds` , `protection` , `plane` , `married` , `oc` , `last_oc` , `atm` , `last_bank` , `last_attempted` , `last_kill` , `ver_code` , `last_script_check` , `global` , `poll` , `clicks` , `click_rate` , `tut` , `drugs_from` , `total_drugs_mission` )
    VALUES (
    '', '
    $reg_username', '$random_password22', '1', '10000', '', '0-0-0-0-0-0-0', '', '0', '0', '', 'Alive', '$today', 'Scum', '0', '$email', 'No quote', 'images/default.jpg', '$location', '0', '0-0-0', '', '', '0', '', '', '', '0', '', '0', '100', '100', '', '', '0-0-0-0-0', '0-0-0-0-0', '127.0.0.1', '$ip', '0', '0', 'None', '1', '0', '', '', '0', '0-0-0', '', '', 'None', 'None', 'None', '', '0', '', 'False', '', '', '', '456', '', '0', '', '0', '', '0', '', '0' )");





         
    $userid mysql_insert_id();
        
    // Let's mail the user!
        
    $subject "Tactical Mafia Account!";
        
    $message "Dear $reg_username,

        Hello 
    $reg_username , Welcome To Tactical Mafia. Thank You for Registering. Below you will find the Information in which to login.
        Please enter this information at the login screen in order to play Tactical Mafia. You can change your password on the game.


        Login with the following information:
        Username: 
    $reg_username
        Password: 
    $random_password22

        Thanks!
        Tactical Mafia Staff.

        This is an automated response, please do not reply!"
    ;

        
    mail($email$subject$message,
            
    "From: Tactical Mafia<support@tacticalmafia.com>");
       echo 
    "Your account has been registered! Check your email for your info!";
       } }}}}}

    ?>



    The Problem is that when "submit" is clicked it takes you to the register script page (which is blank because its all hidden php code) but doesnt say anything like "registration successful" like it should. Can anybody see anything wrong with the script?
    Thanks
    TM
    p.s. you can see for yourself at www.tacticalmafia.com/register5.php

  2. #2
    SitePoint Guru TacMaf's Avatar
    Join Date
    Dec 2005
    Location
    Manchester, United Kingdom
    Posts
    663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    please help :'(

  3. #3
    SitePoint Guru TacMaf's Avatar
    Join Date
    Dec 2005
    Location
    Manchester, United Kingdom
    Posts
    663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    please? anyone?

  4. #4
    SitePoint Guru TacMaf's Avatar
    Join Date
    Dec 2005
    Location
    Manchester, United Kingdom
    Posts
    663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    :s

  5. #5
    SitePoint Guru hifigrafix's Avatar
    Join Date
    Oct 2005
    Location
    Nashville, TN
    Posts
    628
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is the email going out to the registree? Do you have a file named "login_success.php" uploaded? It should be "including" a login_success.php page once the registration is complete -

    Also, if you snagged this code from a tutorial you should be sure to include the authors details so he/she gets credit for the script.

    thnx

  6. #6
    SitePoint Guru TacMaf's Avatar
    Join Date
    Dec 2005
    Location
    Manchester, United Kingdom
    Posts
    663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    that didnt work

  7. #7
    SitePoint Guru TacMaf's Avatar
    Join Date
    Dec 2005
    Location
    Manchester, United Kingdom
    Posts
    663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    when "submit" is clicked it just takes me to "register2.php" and displays nothing, and also nothin goes into the database or email inbox.

  8. #8
    SitePoint Guru TacMaf's Avatar
    Join Date
    Dec 2005
    Location
    Manchester, United Kingdom
    Posts
    663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the script is from one of my friend's games which he let me have and it works perfectly on there

  9. #9
    SitePoint Member
    Join Date
    Dec 2005
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, you could always take out where it send a random email.. If you said it was working fine before.. Or you could link you're script to members home after you register.. I'm not sure, I'd have to fully look into you're code, but those are my guesses..

  10. #10
    SitePoint Guru TacMaf's Avatar
    Join Date
    Dec 2005
    Location
    Manchester, United Kingdom
    Posts
    663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ive tried everything, but still nothin goes into the db

  11. #11
    SitePoint Guru TacMaf's Avatar
    Join Date
    Dec 2005
    Location
    Manchester, United Kingdom
    Posts
    663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    wierd, if i make the insert into wrong, it tells me its wrong, but if its right, nothing happens

  12. #12
    SitePoint Guru TacMaf's Avatar
    Join Date
    Dec 2005
    Location
    Manchester, United Kingdom
    Posts
    663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    now for some reason there is a parse error on line 115, which doesnt exist.

  13. #13
    SitePoint Guru TacMaf's Avatar
    Join Date
    Dec 2005
    Location
    Manchester, United Kingdom
    Posts
    663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thats solved but still, why doesnt it work? all it does is checks if the form is done properly, but if it is it doesnt register them

  14. #14
    SitePoint Member
    Join Date
    Nov 2005
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you are using mysql for a database, try this...

    $msg=mysql_errno(the link to the server).": ".mysql_error(the link to the server);
    print($msg);

    instead of "the link to your server" you put the link you get when you connect.

    For example if you connect this way -->$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');

    Your link would be $link.

    This way if you have an error in your sql statement you will get some info from the server and it will be easier for some of us to point you in the right direction.

  15. #15
    SitePoint Guru TacMaf's Avatar
    Join Date
    Dec 2005
    Location
    Manchester, United Kingdom
    Posts
    663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    there isnt a problem with the sql otherwise the error would display. i tested it by purposely doing the sql wrong and the error displayed. but when i do it right its fine.

  16. #16
    SitePoint Guru TacMaf's Avatar
    Join Date
    Dec 2005
    Location
    Manchester, United Kingdom
    Posts
    663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    still no idea?

  17. #17
    SitePoint Guru TacMaf's Avatar
    Join Date
    Dec 2005
    Location
    Manchester, United Kingdom
    Posts
    663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    im truely confused why isnt it workin ?

  18. #18
    SitePoint Guru TacMaf's Avatar
    Join Date
    Dec 2005
    Location
    Manchester, United Kingdom
    Posts
    663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    $ip $_SERVER['REMOTE_ADDR'];

    $random_password22=rand(11111,99999999);

    mysql_query("INSERT INTO `user_info` ( `id` , `username`)
    VALUES (
    '', '
    $reg_username')");

    mysql_query("INSERT INTO `users` ( `id` , `username` , `password` , `activated` , `money` , `online` , `crimechance` , `lastcrime` , `rankpoints` , `userlevel` , `lasttop` , `status` , `regged` , `rank` , `layout` , `email` , `quote` , `image` , `location` , `bullets` , `gtachance` , `lastgta` , `lasttravel` , `bank` , `banktime` , `last_race` , `music` , `crew` , `get_away_time` , `get_away` , `health` , `energy` , `last_ext` , `lasttran` , `drugprices` , `drugs` , `l_ip` , `r_ip` , `crew_invite` , `referral` , `weapon` , `mission` , `points` , `lpv` , `page` , `editor` , `food_chance` , `last_food` , `last_order` , `freinds` , `protection` , `plane` , `married` , `oc` , `last_oc` , `atm` , `last_bank` , `last_attempted` , `last_kill` , `ver_code` , `last_script_check` , `global` , `poll` , `clicks` , `click_rate` , `tut` , `drugs_from` , `total_drugs_mission` )
    VALUES (
    '', '
    $reg_username', '$random_password22', '1', '10000', '', '0-0-0-0-0-0-0', '', '0', '0', '', 'Alive', '$today', 'Scum', '0', '$email', 'No quote', 'images/default.jpg', '$location', '0', '0-0-0', '', '', '0', '', '', '', '0', '', '0', '100', '100', '', '', '0-0-0-0-0', '0-0-0-0-0', '127.0.0.1', '$ip', '0', '0', 'None', '1', '0', '', '', '0', '0-0-0', '', '', 'None', 'None', 'None', '', '0', '', 'False', '', '', '', '456', '', '0', '', '0', '', '0', '', '0' )");





         
    $userid mysql_insert_id();
        
    // Let's mail the user!
        
    $subject "Tactical Mafia Account!";
        
    $message "Dear $reg_username,

        Hello 
    $reg_username , Welcome To Tactical Mafia. Thank You for Registering. Below you will find the Information in which to login.
        Please enter this information at the login screen in order to play Tactical Mafia. You can change your password on the game.


        Login with the following information:
        Username: 
    $reg_username
        Password: 
    $random_password22

        Thanks!
        Tactical Mafia Staff.

        This is an automated response, please do not reply!"
    ;

        
    mail($email$subject$message,
            
    "From: Tactical Mafia<support@tacticalmafia.com>");
       echo 
    "Your account has been registered! Check your email for your info!";
       } }}}}}

    ?> 
    this is the part that doesnt work. Up to here the script works fine.

  19. #19
    SitePoint Guru TacMaf's Avatar
    Join Date
    Dec 2005
    Location
    Manchester, United Kingdom
    Posts
    663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    still no help :'(

  20. #20
    SitePoint Guru TacMaf's Avatar
    Join Date
    Dec 2005
    Location
    Manchester, United Kingdom
    Posts
    663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well u made alot of people unhappy at christmas by not helping *violins playing* :'( ... only joking

  21. #21
    Wadge! F4nat1c's Avatar
    Join Date
    Oct 2005
    Location
    South Wales, UK
    Posts
    1,134
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your making it extremely hard to help because we cant look through the posts to see what people have tried. Instead of posting loads and loads of times, try putting one more new post in, with the problem, the code you have, what you've tried etc, then just leaving it and then waiting for replies.

  22. #22
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,806
    Mentioned
    157 Post(s)
    Tagged
    3 Thread(s)
    I'm guessing that your id's are auto-incremented fields.....
    If so, a value isn't required on the insert.
    PHP Code:
    <?php 
    session_start
    (); 
    include_once
    "connect.php"
    if (isset(
    $_SESSION['username'])){ 
    header("Location: login_success.php"); 
    exit(); 


    if (
    $_POST['submit']){ 
    // Define post fields into simple variables 
    $reg_username $_POST['username']; 
    $email $_POST['email']; 
    $email1 $_POST['email1']; 
    $location=strip_tags($_POST['location']); 
    $reg_username=trim($reg_username); 
    $today gmdate('Y-m-d h:i:s'); 
    $reg_username stripslashes($reg_username); 
    $email stripslashes($email); 
    $quote stripslashes($quote); 
    $reg_username strip_tags($reg_username); 
    $email strip_tags($email); 
    if((!
    $reg_username) || (!$email) || (!$location)){ 
        echo 
    "Please fill in all fields!"
        include 
    'register5.php'
        exit(); 
    }else{ 
    if (
    $email != $email1){ 
        echo 
    "Emails dont match!"
        include 
    'register5.php'
        exit(); 
    }elseif (
    $email == $email1){ 
    if (
    ereg('[^A-Za-z]'$reg_username)) { 
        echo 
    "Username can only contain letters!"
        include 
    'register5.php'
        exit(); 
    }elseif (!
    ereg('[^A-Za-z]'$reg_username)) { 
    if (
    strlen($reg_username) <= || strlen($reg_username) >= 40){ 
        echo 
    "The username is to big or to small!"
        include 
    'register5.php'
        exit(); 
    }elseif (
    strlen($reg_username) > || strlen($reg_username) < 40){ 


    $sql_email_check mysql_query("SELECT email FROM users 
                WHERE email='
    $email' AND status='Alive'"); 
    $sql_username_check mysql_query("SELECT username FROM users 
                WHERE username='
    $reg_username'"); 

    $email_check mysql_num_rows($sql_email_check); 
    $username_check mysql_num_rows($sql_username_check); 

    if((
    $email_check 0) || ($username_check 0)){ 
        echo 
    "Im sorry but there has been an error please read on..<br />"
        if(
    $email_check 0){ 
        echo 
    "That email is already being used!"
            include 
    'register5.php'
    exit(); 
            unset(
    $email); 
        } 
        if(
    $username_check 0){ 
            echo 
    "Your desired username is already in use!"
            include 
    'register5.php'
            exit(); 
            unset(
    $reg_username); 
        } 


    $ip $_SERVER['REMOTE_ADDR']; 

    $random_password22=rand(11111,99999999); 

    mysql_query("INSERT INTO `user_info` (`username`) 
    VALUES ('"
    $reg_username ."')"); 

    mysql_query("INSERT INTO `users` (`username` , `password` , `activated` , `money` , `online` , `crimechance` , `lastcrime` , `rankpoints` , `userlevel` , `lasttop` , `status` , `regged` , `rank` , `layout` , `email` , `quote` , `image` , `location` , `bullets` , `gtachance` , `lastgta` , `lasttravel` , `bank` , `banktime` , `last_race` , `music` , `crew` , `get_away_time` , `get_away` , `health` , `energy` , `last_ext` , `lasttran` , `drugprices` , `drugs` , `l_ip` , `r_ip` , `crew_invite` , `referral` , `weapon` , `mission` , `points` , `lpv` , `page` , `editor` , `food_chance` , `last_food` , `last_order` , `freinds` , `protection` , `plane` , `married` , `oc` , `last_oc` , `atm` , `last_bank` , `last_attempted` , `last_kill` , `ver_code` , `last_script_check` , `global` , `poll` , `clicks` , `click_rate` , `tut` , `drugs_from` , `total_drugs_mission` ) 
    VALUES ( 
    '"
    $reg_username ."', '"$random_password22."', '1', '10000', '', '0-0-0-0-0-0-0', '', '0', '0', '', 'Alive', '"$today"', 'Scum', '0', '"$email"', 'No quote', 'images/default.jpg', '"$location ."', '0', '0-0-0', '', '', '0', '', '', '', '0', '', '0', '100', '100', '', '', '0-0-0-0-0', '0-0-0-0-0', '127.0.0.1', '$ip', '0', '0', 'None', '1', '0', '', '', '0', '0-0-0', '', '', 'None', 'None', 'None', '', '0', '', 'False', '', '', '', '456', '', '0', '', '0', '', '0', '', '0' )"); 





         
    $userid mysql_insert_id(); 
        
    // Let's mail the user! 
        
    $subject "Tactical Mafia Account!"
        
    $message "Dear $reg_username

        Hello 
    $reg_username , Welcome To Tactical Mafia. Thank You for Registering. Below you will find the Information in which to login. 
        Please enter this information at the login screen in order to play Tactical Mafia. You can change your password on the game. 


        Login with the following information: 
        Username: 
    $reg_username 
        Password: 
    $random_password22 

        Thanks! 
        Tactical Mafia Staff. 

        This is an automated response, please do not reply!"


        
    mail($email$subject$message
            
    "From: Tactical Mafia<support@tacticalmafia.com>"); 
       echo 
    "Your account has been registered! Check your email for your info!"
       } 
       }
       }
       }
       }
       } 

    ?>
    Try that

    Spike

  23. #23
    SitePoint Guru TacMaf's Avatar
    Join Date
    Dec 2005
    Location
    Manchester, United Kingdom
    Posts
    663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    that does the same, when register is clicked, if there is an error in what has been filled in in the form it tells you but if the form is ok it just takes me to register2.php and shows a blank page.

  24. #24
    SitePoint Guru aamonkey's Avatar
    Join Date
    Sep 2004
    Location
    kansas
    Posts
    953
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I cleaned up your code quite a bit (all those nested if statements were messy and redundant) and added some error checking to your queries. hope it helps.

    PHP Code:
      
      <?php
      
      session_start
    ();
      include_once
    "connect.php";
      if (isset(
    $_SESSION['username'])){
          
    header("Location: login_success.php");
          exit();
      }
      
      if (
    $_POST['submit']){
          
    // Define post fields into simple variables
          
    $reg_username $_POST['username'];
          
    $email $_POST['email'];
          
    $email1 $_POST['email1'];
          
    $location strip_tags($_POST['location']);
          
    $reg_username trim($reg_username);
          
    $today gmdate('Y-m-d h:i:s');
          
    $reg_username stripslashes($reg_username);
          
    $email stripslashes($email);
          
    $quote stripslashes($quote);
          
    $reg_username strip_tags($reg_username);
          
    $email strip_tags($email);
          
          if(
    $reg_username == '' || $email == '' || $location == ''){
              echo 
    "Please fill in all fields!";
              include 
    'register5.php';
              exit();
          }
          if (
    $email != $email1){
              echo 
    "Emails dont match!";
              include 
    'register5.php';
              exit();
          }
          if (
    ereg('[^A-Za-z]'$reg_username)) {
              echo 
    "Username can only contain letters!";
              include 
    'register5.php';
              exit();
          }
          if (
    strlen($reg_username) <= || strlen($reg_username) >= 40){
              echo 
    "The username is to big or to small!";
              include 
    'register5.php';
              exit();
          }
      
         
    $sql_email_check mysql_query("SELECT email FROM users WHERE email='$email' AND status='Alive'") or die('Could not do email check:<br />' mysql_error());
         
    $sql_username_check mysql_query("SELECT username FROM users WHERE username='$reg_username'") or die('Could not do username check:<br />' mysql_error());;
          
    $email_check mysql_num_rows($sql_email_check);
          
    $username_check mysql_num_rows($sql_username_check);
      
          if(
    $email_check 0){
              echo 
    "That email is already being used!";
              include 
    'register5.php';
              exit();
          }
          if(
    $username_check 0){
              echo 
    "Your desired username is already in use!";
              include 
    'register5.php';
              exit();
          }
      
          
    $ip $_SERVER['REMOTE_ADDR'];
          
    $random_password22=rand(11111,99999999);
              
         
    mysql_query("INSERT INTO `user_info` ( `id` , `username`) VALUES ('', '$reg_username')") or die ('Could not insert into user_info table:<br />' mysql_error());
              
         
    mysql_query("INSERT INTO `users` ( `id` , `username` , `password` , `activated` , `money` , `online` , `crimechance` , `lastcrime` , `rankpoints` , `userlevel` , `lasttop` , `status` , `regged` , `rank` , `layout` , `email` , `quote` , `image` , `location` , `bullets` , `gtachance` , `lastgta` , `lasttravel` , `bank` , `banktime` , `last_race` , `music` , `crew` , `get_away_time` , `get_away` , `health` , `energy` , `last_ext` , `lasttran` , `drugprices` , `drugs` , `l_ip` , `r_ip` , `crew_invite` , `referral` , `weapon` , `mission` , `points` , `lpv` , `page` , `editor` , `food_chance` , `last_food` , `last_order` , `freinds` , `protection` , `plane` , `married` , `oc` , `last_oc` , `atm` , `last_bank` , `last_attempted` , `last_kill` , `ver_code` , `last_script_check` , `global` , `poll` , `clicks` , `click_rate` , `tut` , `drugs_from` , `total_drugs_mission` ) VALUES ('', '$reg_username', '$random_password22', '1', '10000', '', '0-0-0-0-0-0-0', '', '0', '0', '', 'Alive', '$today', 'Scum', '0', '$email', 'No quote', 'images/default.jpg', '$location', '0', '0-0-0', '', '', '0', '', '', '', '0', '', '0', '100', '100', '', '', '0-0-0-0-0', '0-0-0-0-0', '127.0.0.1', '$ip', '0', '0', 'None', '1', '0', '', '', '0', '0-0-0', '', '', 'None', 'None', 'None', '', '0', '', 'False', '', '', '', '456', '', '0', '', '0', '', '0', '', '0' )") or die ('Could not insert into users table:<br />' mysql_error());
      
          
    $userid mysql_insert_id();
          
    // Let's mail the user!
          
    $subject "Tactical Mafia Account!";
          
    $message "Dear $reg_username,
      
         Hello 
    $reg_username , Welcome To Tactical Mafia. Thank You for Registering. Below you will find the Information in which to login.
         Please enter this information at the login screen in order to play Tactical Mafia. You can change your password on the game.
      
      
          Login with the following information:
          Username: 
    $reg_username
          Password: 
    $random_password22
      
          Thanks!
      
          Tactical Mafia Staff.
      
          This is an automated response, please do not reply!"
    ;
      
          if (
    mail($email$subject$message"From: Tactical Mafia<support@tacticalmafia.com>")) {
              echo 
    "Your account has been registered! Check your email for your info!";
          } else {
              echo 
    "Your account has been registered, but an email could not be sent.";
          }
      }

  25. #25
    SitePoint Zealot
    Join Date
    Oct 2005
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Its saying form action = register2.php, what is on register2.php? Is that what is in the 2nd textbox?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •