Results 1 to 3 of 3

Thread: Problem On Creating an online games with PHP

  1. #1
    Join Date
    Jan 2009
    Posts
    134

    Problem On Creating an online games with PHP

    I have a small problem concerning with the PHP. I am currently in the process of creating an online game with my colleague and I have a small problem for the registration page.

    The problem is that I always returned the correct user name and message saying I am not registered (provisional message) = damage

    following is the code:

    PHP Code:
    <? php 
    session_start 
    (); 
    require 
    zone_membres_conf.php;

    / / 
    Database connection 
    mysql_connect 
    ($ mysql_host, $ mysql_login, $ mysql_password) OR die ( <pconnect to the databasePlease try again later. </ p>); 
    mysql_select_db ($ mysql_base) OR die ( Could not select <pthe basis </ p>);

    request_pseudo mysql_query 'SELECT FOR pseudo members WHERE username ='. $ _POST 'form_login'].''); 
    request_mdp mysql_query 'SELECT pass for members'); 
    request_style mysql_query 'SELECT style for members'); 
    pseudo_login mysql_query 'SELECT username, password, style for members');
    aff_style mysql_query 'SELECT style for members');

    if (isset ($ 
    _POST 'form_login']) AND isset ($ _POST 'choice']) AND isset ($ _POST 'form_passe'])) 
        ( 
         if ($ 
    _POST 'form_login']! = NULL AND $ _POST 'choice']! = NULL AND $ _POST 'form_passe']! = NULL
              ( 
              if (($ 
    _POST 'form_login'])! == ($ requete_pseudo)) 

                   ( 

                      echo 
    'damage'
                    )
              else 
                     (
                      echo 
    'hello. $ _POST' [' form_login ']; 
                     )
          else 
           
            echo 
    'Your connection to fail, maybe you don \' have not filled all the fields'
          )
    else 
     
    echo 
    'your connection has failed for some unknown reason later'
    )

  2. #2
    Join Date
    Oct 2008
    Posts
    167

    Re: Problem On Creating an online games with PHP

    Hi,

    • The lack mysql_fetch_array (or mysql_fetch_row)
    • you will find all the mdp / style and login to your base, without filter in relation to pseudo returned
    • The only complaint you or filter, you will not protect your bases (replace $ _POST'mavar '] by mysql_real_escape_string ($ _POST [' myvar]))

  3. #3
    Join Date
    Jan 2009
    Posts
    134

    Re: Problem On Creating an online games with PHP

    Code:
        * The lack mysql_fetch_array (or mysql_fetch_row)
        * you will find all the mdp / style and login to your base, without filter in relation to pseudo returned
        * The only complaint you or filter, you will not protect your bases (replace $ _POST'mavar '] by mysql_real_escape_string ($ _POST [' myvar]))
    Thank you for your answer.

    I am a beginner and I understand not all:

    What is mysql_real_escape_string?

    And I try to use mysql_fetch_array it does not work at all.

Similar Threads

  1. Netgear router creating problems while playing online
    By Chasey in forum Networking & Security
    Replies: 5
    Last Post: 25-01-2010, 09:11 PM
  2. Replies: 7
    Last Post: 16-01-2010, 04:42 PM
  3. Creating Java games for Nokia on PC
    By Zaafir in forum Software Development
    Replies: 3
    Last Post: 21-09-2009, 03:07 PM
  4. Creating 3D video games
    By Ricky58 in forum Software Development
    Replies: 4
    Last Post: 25-03-2009, 12:03 AM
  5. Problem loading games (cs 1.6, Warhammer Online)
    By Cunning in forum Video Games
    Replies: 3
    Last Post: 10-02-2009, 01:30 PM

Tags for this Thread

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
  •  
Page generated in 1,713,565,100.89331 seconds with 17 queries