View Single Post
  #18  
Old 10-17-2009, 08:22 AM
aroymart aroymart is offline
Member
 
Join Date: Jan 2009
Posts: 74
Credits: 9,289
aroymart
Default RE: How to make a breeding System?

btw (your prefix) is written like: prefix
lets say my refix is adopts, then if i were searching for (your prefix)_adoptables i would put adopts_adoptables

1) follow the mySql instructions at the bottem

2) go edit adopt.php and search for
PHP Code:
<input type='submit' name='Submit' value='Create This Adoptable'
3) above it put
PHP Code:
breed ID<input name='breedid' type='text' id='breedid' size='6' maxlength='6'><br/>
      
breed factor<input name='breedfactor' type='text' id='breedfactor' size='6' maxlength='6'><br/> 
4) now edit nadopt.php

5) search for
PHP Code:
$altchance secure($altchance
6) now after that put in
PHP Code:
//////////////////////////////////////////////////////////////////////
$breedid $_POST["breedid"];
$altchance secure($breedid);

$breedfactor $_POST["altchance"];
$altchance secure($breedfactor); 
7) now search for
PHP Code:
mysql_query("INSERT INTO ".$prefix."adoptables VALUES ('', '$name',
'
$description','$eggimage','$cba','$promocode', '$freqcond',
'
$number','$datecond','$date','$adoptscond','$maxnumcond','$morethannum','$usergr
upcond','
$usergroups','$alternates','$altoutlevel','$altchance')"); 
8) in between
PHP Code:
 '$altchance' 
and
PHP Code:
)"); 
put
PHP Code:
,'$breedid','$breedfactor' 
9) upload the breed.php file at the bottem



mySql instructions
1) go to php admin and go to the database you made for your adoptable script
2) find (your prefix)_adoptables
3) press SQL, take out
PHP Code:
SELECT FROM `(your prefix)_adoptablesWHERE 1 
and put in
PHP Code:
 TABLE `(your prefix)_adoptablesADD `breedidINT12 NOT NULL ,
ADD `breedfactorINT12 NOT NULL 
4) done
Reply With Quote