Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
Password Reminder
Register
| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #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.

Reply With Quote
  #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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 05:42 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.