View Single Post
Old 02-11-2004, 09:37 PM  
Carlito
Confirmed User
 
Industry Role:
Join Date: Dec 2001
Location: Texas
Posts: 856
Quote:



$checkuser = "SELECT name FROM form_users WHERE name='$name'";
$query = mysql_query($checkuser);


if ( mysql_num_rows($query) >= 1 )

{


print "<font face=verdana size=1 color=#6e6e6e>Sorry, the username you have chosen is in use.<br>Please go back and create another, or get in touch with a staff member<br> to restore your current username & email.</font>";

}

else

{



$uname=escapeData($_POST['name']);
$email=escapeData($_POST['email']);
$url=escapeData($_POST['url']);
mysql_query("insert into form_users (name,email,url) values ('$name','$email','$url')");
$user_id=mysql_insert_id();
unset($_POST['name'],$_POST['email'],$_POST['url']);


I use this on something I just coded.
Carlito is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote