ya i have this site i am working on and at first it was working fine, im not sure what i did but now it says i registered but when i login i get the error saying invalid username.
So i went and looked at PhpMyAdmin and it did not add the username and password and so on. Like it did not insert everything...
Here is my register.php file ask me if you need anything else.
<html>
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Version 2 Gaming</title>
<meta name="generator" content="WordPress 2.3.1" /> <!-- leave this for stats please -->
<style type="text/css" media="screen">
@import url( http://wpmix.com/wpdemos/wp-content/themes/blue_rings/style.css );
</style>
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://wpmix.com/wpdemos/?feed=rss2" />
<link rel="alternate" type="text/xml" title="RSS .92" href="http://wpmix.com/wpdemos/?feed=rss" />
<link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="http://wpmix.com/wpdemos/?feed=atom" />
<link rel="pingback" href="http://wpmix.com/wpdemos/xmlrpc.php" />
<link rel='archives' title='August 2007' href='http://wpmix.com/wpdemos/?m=200708' />
<link rel='archives' title='July 2007' href='http://wpmix.com/wpdemos/?m=200707' />
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://wpmix.com/wpdemos/xmlrpc.php?rsd" />
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://wpmix.com/wpdemos/wp-includes/wlwmanifest.xml" /> </head>
<body><div id="bodybottom"><div id="bodytop">
<div id="page">
<div id="header">
<h1><a href="http://wpmix.com/wpdemos/">Version 2 Gaming</a></h1>
<h2>Pro's in everything you like to know</h2>
<ul>
<li class='current_page_item'><a href="http://www.google.com/">Home</a></li>
<li class="page_item page-item-2"><a href="http://www.google.com" title="About">About</a></li>
<li class="page_item page-item-3"><a href="http://www.google.com/" title="Contact">Contact</a></li>
</ul>
</div>
<div id="container">
<div id="content">
<div class="post" id="post-5">
<h2>Become a member!</h2>
<div class="entry"> <!--Edit this for the main body on the home page-->
<p>
<?php
echo "<h1>Register</h1>";
$submit = $_POST['submit'];
$username = strtolower(strip_tags($_POST['username']));
$password = strip_tags($_POST['password']);
$repassword = strip_tags($_POST['repassword']);
if ($submit)
{
//open database
$connect = mysql_connect("mysql5.000webhost.com","a6027290_members","m26682668");
mysql_select_db("a6027290_members"); //select database
$namecheck = mysql_query("SELECT username FROM users WHERE username='$username'");
$count = mysql_num_rows($namecheck);
if ($count!=0)
{
echo "Username already taken! <a href='register.php'>Retry</a>";
die ();
}
//check for existance
if ($username&&$password&repassword)
{
if ($password==$repassword)
{
//check char length of username
if (strlen($username)>25)
{
echo "You username must be under 25 characters in length";
}
else
{
//check password length
if (strlen ($password)>25||strlen($password)<6)
{
echo "Password must be between 6 and 25 characters";
}
else
{
//register the user
//encrypt password
$password = md5 ($password);
$repassword = md5($repassword);
$queryreg = mysql_query("
INSERT INTO users VALUES ('','$username','$password')
");
die ("You have been registered! <a href='index.html'>Login</a>");
}
}
}
else
echo "Your passwords do not match";
}
else
echo "Please fill in <b>all</b> fields!";
}
?>
<html>
<p>
<form action='register.php' method='POST'>
<table>
<tr>
<td>
Username:
</td>
<td>
<input type='text' name='username' value='<?php echo $username ?>'>
</td>
</tr>
<tr>
<td>
Password:
</td>
<td>
<input type='password' name='password'>
</td>
</tr>
<tr>
<td>
re Password:
</td>
<td>
<input type='password' name='repassword'>
</td>
</tr>
</table>
<p>
<input type='submit' name='submit' value='Register'>
</form>
</html>
</p>
</div>
<div class="comments">
<a href="gameguysz@yahoo.com" title="Email me for more info">Email</a> </div>
</div>
</div>
<div id="sidebar">
<ul>
</li>
<li id="linkcat-2" class="linkcat"><h3>V2 Clan</h3>
<ul>
<li><a href="http://gamebattles.com/profile/clanmoffatt">Clan Moffet</a></li>
<li><a href="http://gamebattles.com/profile/schaplowsky916">schaplowsky916</a></li>
<li><a href="http://gamebattles.com/profile/gameguysz">gameguysz</a></li>
</ul>
</li>
</ul>
</div>
<div class="clear"></div>
</div>
<div id="footer">
Version 2 Gaming
</div>
</div>
</div></div></body>
</html>