Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
| Search | Today's Posts | Mark Forums Read
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old May 4th, 2007, 07:19 AM
Registered User
 
Join Date: Mar 2007
Location: , , .
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to creat an user account

Hi all,
I'm a novice in PHP. Here i have a problem. How can i create a new user account, by validating the existing ids presenting in the database.

  After checking for availability, If the user name already exists, options should be given to the user based on the first, middle and last name given bye the user itself..

Kindly someone help me,

Thanks in advance,
Prad.

  #2 (permalink)  
Old May 12th, 2007, 03:25 AM
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
chapter 15 -create user account melania BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 15 December 5th, 2008 05:53 PM
TO retrieive all user account name vinothsiva General .NET 1 June 15th, 2007 05:29 PM
Inactivate User Account NinaWilliam ASP.NET 1.0 and 1.1 Basics 5 March 13th, 2006 10:13 AM
Create User Account casselj ASP.NET 1.0 and 1.1 Professional 1 June 20th, 2005 08:34 AM
MSDE, how create database, user account ??? majidnakit All Other Wrox Books 1 January 7th, 2005 03:12 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.