mchan mokakda ban meke awla?
ekama databasse eke table 2kak check karanna ona bn. but muu check r eka table ekakne.. $uT,$chkT,$checkUT, if eke adaala
eka comment karoth ganata anith table eka wada karanawa.. ee wagema thamai anith tika comment karoth anith table ekenuth
check wenawa bn. But mehema 2kama eka parata thibbama table 2kenma check kranne na ne bn.. mokada ban awla??
ekama databasse eke table 2kak check karanna ona bn. but muu check r eka table ekakne.. $uT,$chkT,$checkUT, if eke adaala
eka comment karoth ganata anith table eka wada karanawa.. ee wagema thamai anith tika comment karoth anith table ekenuth
check wenawa bn. But mehema 2kama eka parata thibbama table 2kenma check kranne na ne bn.. mokada ban awla??
PHP:
$us = $_POST['uname'];
$uT = "SELECT * FROM student WHERE Username = '{$us}'";
$uSt = "SELECT * FROM tutor WHERE Username = '{$us}'";
$chkUSt = mysqli_query($conn, $uSt) or die(mysqli_error()) ;
$chkUT = mysqli_query($conn, $uT) or die(mysqli_error()) ;
$checkUSt =mysqli_num_rows($chkUSt);
$checkUT =mysqli_num_rows($chkUT);
if(($checkUSt != 0) AND ($checkUT != 0)){
echo "Your Username is not available";
}
Last edited: