function funi(t) { //var t=document.getElementById(r); if (!(t.keyCode >= 48 && t.keyCode <= 57)) { t.keyCode = 0; } }Call this like following<input type="text" onkeypress="funi(event)"></input>
This comment has been removed by the author.
class frnd_request{ function user_request($uid) { $user_req = mysql_query("select no_of_req from admin_frnd_req"); $req = mysql_fetch_array($user_req); $date = date('Y-m-d'); $no_of_req="select * from requests where from_id='".$uid."' and r_date='".$date."'"; $result = mysql_query($no_of_req); $count=mysql_num_rows($result); if($req['no_of_req'] > $count) { echo "not a valid request"; } }}
This comment has been removed by the author.
ReplyDeleteclass frnd_request
ReplyDelete{
function user_request($uid)
{
$user_req = mysql_query("select no_of_req from admin_frnd_req");
$req = mysql_fetch_array($user_req);
$date = date('Y-m-d');
$no_of_req="select * from requests where from_id='".$uid."' and r_date='".$date."'";
$result = mysql_query($no_of_req);
$count=mysql_num_rows($result);
if($req['no_of_req'] > $count)
{
echo "not a valid request";
}
}
}