View Single Post
  #2 (permalink)  
Old May 12th, 2007, 03:25 AM
cyber_kaley cyber_kaley is offline
Registered User
 
Join Date: Jan 2005
Location: mabalacat, 1020, Philippines.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to cyber_kaley
Default

find unique is username in database

$username = $_POST['username'];
///////
$query_advertiseleft = "SELECT * FROM useraccount WHERE username = '$username'";
$Recordset1 = mysql_query($query_advertiseleft, $cms) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$total_Recordset1 = mysql_num_rows($Recordset1);

if($total_Recordset1 == 0){

echo'SORRY ALREDY HAVE FOR THAT USERNAME';


}else{
///inserte the NEW ACCOUNT HERE:///

$sqlInsert = "INSERT INTO useraccount (artistid,name,category)
VALUES('$row_artist[id_artist]','$row_artist[artis_name]')";
$artist = mysql_query($sqlInsert, $cms) or die(mysql_error());


}

its not complete code ok i just show the mysql
MySQL Where,
MySQL Insert
cyber_kaley20@yahoo.com


caley
Reply With Quote