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 ( <p> connect to the database. Please try again later. </ p>);
mysql_select_db ($ mysql_base) OR die ( Could not select <p> the 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';
)
Bookmarks