Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   doadopt? (http://www.mysidiaadoptables.com/forum/showthread.php?t=3867)

Aasixx 11-03-2012 11:27 AM

doadopt?
 
Okay, I'm trying to make separate adoption pages (like for owls) where they can adopt owls on that page. I have a button that links to this link: but when I click the "Adopt me" button on my separate page, it says "Invalid Adoptable ID" but when I use the default adoption page, I see it's the same link and it gives me the pet when I press "Adopt." I don't understand why it's not working?

fadillzzz 11-03-2012 12:12 PM

This is caused by the extra protection applied to the adoption process. Back in the old version, just after you adopt an adoptable, you can keep refreshing the page to get that certain adoptables again and again. In the new version, we've added this security layer to prevent people from doing that. Thus, they have to go back to the adoption page to adopt an adoptable.

If you want to make your own adoption page, make sure you do the following:
1. Initialize/reinitialize a session
PHP Code:

<?php
session_start
();

2. Set a session value, 1, with the key being "allow"
PHP Code:

$_SESSION['allow'] = 1


Aasixx 11-03-2012 12:26 PM

[strike]I added that in my code like this:
PHP Code:

<?php
session_start
();

include(
"functions/functions.php");
include(
"functions/functions_users.php");
include(
"functions/functions_adopts.php");
include(
"inc/lang.php");

//***************//
//  START SCRIPT //
//***************//

$id $_GET["id"];
$promocode $_GET["promocode"];
$name $_GET["name"];
$number $_GET['number'];
$_SESSION['allow'] = 1;

and I guess it worked but when I click it, it shows a blank page instead of what it shows when you've processed an adoption (Click here to get BBcodes, etc). How can I fix it to where it will show all of that, too? That's the first part of my doadopt.php by the way.[/strike]

Fixed it. :) Thanks for the help, fadillzzz!


All times are GMT -5. The time now is 11:36 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.