ziedinjsh Posted January 30, 2011 Report Share Posted January 30, 2011 (edited) $existing_users=array('roshan','mike','jason'); $user_name=$_POST['user_name']; if (in_array($user_name, $existing_users)) { echo "no"; } else{ echo "yes"; } Kā šo var uztaisīt lai lasa no datubāzes? Edited January 30, 2011 by ziedinjsh Link to comment Share on other sites More sharing options...
mickys Posted January 30, 2011 Report Share Posted January 30, 2011 $result=mysql_query("SELECT `vards` FROM `useri`"); while($row=mysql_fetch_array($result)) $existing_users[]=$row['vards']; Link to comment Share on other sites More sharing options...
Recommended Posts