Verify activation issu

the material I see is here
https://www.cnblogs.com/gaoga.

where there is doubt

if($row){ 
    if($nowtime>$row["token_exptime"]){ //24hour 
        $msg = "."; 
    }else{ 
        mysql_query("update t_user set status=1 where id=".$row["id"]); 
        if(mysql_affected_rows($link)!=1) die(0); 
        $msg = ""; 
    } 
}else{ 
    $msg = "error.";     
} 
echo $msg; 

if (mysql_affected_rows ($link)! = 1) die (0);
if there is username, in the database, the previous register.php will query the database and reply
echo "user name already exists, please change to another user name";
mysql_affected_rows ($link) can only be equal to 1 ha

this sentence will not be executed at all. Does it make sense to write it here?

its inherent logic is problematic. When mysql_affected_rows ($link)! = 1, then die (0)
can the database have been updated with, die (0) and report a successful activation?

Jul.30,2021

one is register.php
and the other is active.php
with different functions

as for the second question
read more documents

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e45ef4-44b75.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e45ef4-44b75.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?