Home Community Mys-Script Creative Off-Topic |
|
|
Thread Tools | Display Modes |
#1
|
||||
|
||||
Adopt many adoptables at once.
Does anyone know how to make a code where I can set a number of adoptables (making custom adoption center/place) that they can adopt all at once? Like, let's say I set it to where you can adopt 14 horses, in the dropdown box you can choose how many you'd like to adopt 1-14 and whatever number they choose, that's how many adoptables will show up in their myadopts.php
I tried making one myself but it didn't turn out too great. Any help would be awesome! Thanks.
__________________
|
#2
|
||||
|
||||
Well you can just create a textfield in adopt.php in the adoption form, in which users can enter the number of adoptables they want to adopt for this particular species.
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#3
|
||||
|
||||
What would I need to do to make it give that user that many adoptables? So, like I said, 14 adoptables.
__________________
|
#4
|
||||
|
||||
Well you can see a section of adoption form code in adopt.php like these:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#5
|
||||
|
||||
At first I got this after pressing "Adopt Me"
Parse error: syntax error, unexpected T_IF in /home/albisian/public_html/doadopt.php on line 17 and then I added a missing ";" for this $number = $_GET['number'] and got a new error: Parse error: syntax error, unexpected '=', expecting ';' in /home/albisian/public_html/doadopt.php on line 47
__________________
|
#6
|
||||
|
||||
Well what is line 47 for you?
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#7
|
||||
|
||||
Opened doadopt.php in Notepad++ and this is at line 47:
for(i = 0; i < $number; i++){
__________________
|
#8
|
||||
|
||||
Oh my what was I thinking... Replace this line with the code below:
PHP Code:
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#9
|
||||
|
||||
Haha, it's okay. Thank you!
__________________
|
#10
|
||||
|
||||
No worries, I find it easier to use PHP's syntax though, since I am still at heart a PHP programmer. I am learning a Java course at school at this moment, hoping to strengthen my skills as an object-oriented programmer. Of course I try not to let this interfere with my php coding, since sometimes it can. XD
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Adoptables not in Adopt Center? | AlexC | Questions and Supports | 6 | 04-09-2012 10:05 AM |
Would you adopt these adoptables? | elfhome | Other Chat | 2 | 02-15-2011 03:54 PM |
Is there a way to limit the amount of adoptables a person can adopt? | crydrk | Suggestions and Feature Requests | 2 | 08-01-2009 04:34 PM |
Organize adoptables on adopt.php | kisazeky | Questions and Supports | 4 | 03-22-2009 07:14 PM |
Remove Adoptables from adopt.php? | Tequila | Questions and Supports | 8 | 03-13-2009 08:28 AM |
What's New? |
What's Hot? |
What's Popular? |