Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 07-03-2009, 10:10 PM
Xius Xius is offline
Member
 
Join Date: Apr 2009
Posts: 59
Credits: 7,584
Xius
Default One adoptable per name?

Is there a way to only allow one name to be used and then never used again unless changed?
Reply With Quote
  #2  
Old 07-04-2009, 11:31 AM
Bloodrun's Avatar
Bloodrun Bloodrun is offline
I am, who I am.
 
Join Date: Apr 2009
Posts: 532
Gender: Male
Credits: 28,630
Bloodrun
Send a message via Yahoo to Bloodrun
Default RE: One adoptable per name?

Yes you want something like this:

PHP Code:

    
//Next check that the petname does not already exist...

    
$flag 0;
    
$query "SELECT * FROM ".$prefix."adopts WHERE petname = '$petname'";
    
$result = @mysql_query($query);
    
$num = @mysql_numrows($result);

    if(
$num 0){
    
$flag 1;
    }

    if(
$flag 0){

    
//petname already exists
    
$article_title "Your petname already exists";
    
$article_content "Your name exists currently in our database. Please try again and choose a different name.";    

    } 
Of course just change username, and the directory your calling from.
Reply With Quote
  #3  
Old 07-04-2009, 12:18 PM
Xius Xius is offline
Member
 
Join Date: Apr 2009
Posts: 59
Credits: 7,584
Xius
Default RE: One adoptable per name?

Where do I put that? XD
Reply With Quote
  #4  
Old 07-04-2009, 01:40 PM
Bloodrun's Avatar
Bloodrun Bloodrun is offline
I am, who I am.
 
Join Date: Apr 2009
Posts: 532
Gender: Male
Credits: 28,630
Bloodrun
Send a message via Yahoo to Bloodrun
Default RE: One adoptable per name?

Quote:
Originally Posted by Xius
Where do I put that? XD

Wait, did you mean for pets or for usernames?

Because if you meant for usernames, thats already there. In the registration form, if the username already exists in the database, it wont allow someone to create the same username.

If you meant for pets, just put it in the adopt file. I think its, either doadopt.php or myadopts.php that allows you to adopt, i cant remember.
Reply With Quote
  #5  
Old 07-04-2009, 06:03 PM
Xius Xius is offline
Member
 
Join Date: Apr 2009
Posts: 59
Credits: 7,584
Xius
Default RE: One adoptable per name?

Yeah, I meant for pets.
Does it matter where I put it? x]
Reply With Quote
  #6  
Old 07-07-2009, 11:29 AM
Bloodrun's Avatar
Bloodrun Bloodrun is offline
I am, who I am.
 
Join Date: Apr 2009
Posts: 532
Gender: Male
Credits: 28,630
Bloodrun
Send a message via Yahoo to Bloodrun
Default RE: One adoptable per name?

Lol well obviously it does, but to an extent.. well yes, yes it does.
To give you a up to date answer, I would need to see your adopting script, just in case you have made any changes, or just in case your script is in a different set up to mine.
It is most likely set up differently then mine, because I have made some changes.
Reply With Quote
Reply


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 On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 08:55 AM.

Currently Active Users: 9705 (0 members and 9705 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636