I have the following code, but it does not show me in my table increment. It is always 0 in field numtrys. Do you know why?
[code=php]
<?php
// Connect to MySQL-Server
$db=”…”;
$link=mysql_connect (“localhost”, “…”, “…”);
if (!$link)
{
die (“Couldn’t connect to MySQL:”. mysql_error());
}
//Open $db
mysql_select_db (“$db”)
or die (“Couldn’t open $db: “. mysql_error());
$username=strtolower($_POST[‘usernamelogin’]);
$numtrys=$numtrys++;
$query = “INSERT INTO login
SET
`numtrys` = ‘{$numtrys}’ WHERE usernamelogin = ‘$username’ ” ;
mysql_query ($query,$link) or die (“Insert error:”.mysql_error());
echo $numtrys;
?>
I would like that each try for login is tracked with increment in the field numtrys for each login attempt.