.............
else if(empty($password)){
$errorMsg[]="please enter password";
}
else
{
try
{
$select_stmt=$db->prepare("SELECT * FROM tbl_user WHERE username=:uname OR email=:uemail");
$select_stmt->execute(array(':uname'=>$username, ':uemail'=>$email));
$row=$select_stmt->fetch(PDO::FETCH_ASSOC);
if($select_stmt->rowCount() > 0)
{
if($username==$row["username"] OR $email==$row["email"])
{
if(password_verify($password, $row["password"]))
{
$_SESSION["user_login"] = $row["user_id"];
//----------------
$pdo_statement=$db->prepare("update tbl_user set logins=7 where user_id=2");
$result = $pdo_statement->execute();
//----------------
$loginMsg = "Successfully Login...";
header("refresh:2; welcome.php");
}
else
hey guys iam starting to learn during this crysis php :-). I got stucked with this pdo style..... i like to count logins, i tryed and figured out i can use the id... but my question is how can replace this "where user_id=2" to get the specific ID for the current user login in? the count function i i know how to make the... first i want to know how to write the syntax of this pdo......
thank you :-)