In my site's registration, the insert is only working for certain data, not sure why
heres the code (I know, no salt, I will fix that next)
if ($id == "0" || $id == null)
{ echo '<title>Start</title>';
$content .= '
<body><center>
<h1>TitleBar</h1>
<img src="logo.png" alt="Smiley face" height="400" width="400">
<form action="?id=loginF" method="POST">
<fieldset>
<legend>LOGIN </legend>
<p><label for="username">Username</label> <input type="text" name="username" required="required" autofocus="autofocus"/></p>
<p><label for="password">Password</label> <input type="password" name="password" required="required"/></p>
<p class="submit"><input type="submit" value="Login"/></p>
</fieldset>
</form>
</center>
';
echo $content;
}
This next section is for after the form is submitted:
if ($id == "loginF")
{
echo '<title>Login</title>';
$username = $_POST['username'];
$password = $_POST['password'];
$email = $_POST['username'];
$snapchat = new Snapchat($username,$password);
echo $username;
$_SESSION['name'] = $username;
$_SESSION['pass'] = $password;
$ulz="INSERT INTO user_attribs(username,email,salted)VALUES('$username'
,'$email','$password')";
mysql_query($ulz);
$content .= '
<ul>
<li><a href="?id=getSnaps">Get Snaplist</a></li>
<li><a href="?id=getFriends">Get Friendlist</a></li>
<li><a href="?id=sendSnap">Send pics</a></li>
<li><a href="?id=logout">Logout</a></li>
</ul>
';
echo $content;
}
for example:
top@kek.com with any password will insert as a username
however, any username with, for example, an @hotmail.com address will not insert
what could be the cause of that?
I tried to google it, I honestly have no idea.
EDIT::
I want to be more specific in the error. I did some testing. The following CAN insert: hotmail.com, .hotmail.com, a@hotmail.com, art@hotmail.com, however, a.rt@hotmail.com cannot be inserted. it must be the front period.