GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   CCbill Jpost Implementation help needed (https://gfy.com/showthread.php?t=1086443)

freecartoonporn 10-23-2012 03:35 AM

CCbill Jpost Implementation help needed
 
PHP Code:

<?
include('db.php');
$SUCCESS = '111';
$FAILURE = '000';

if($_POST[action] == 'ADD') {
    $result = mysql_query("SELECT * FROM users WHERE username = '$_POST[username]'");
    if(mysql_num_rows($result) > 0) {
        if(mysql_query("UPDATE users SET premium = 1 WHERE username = '$_POST[username]'")) {
            echo $SUCCESS;
        }
        else {
            echo $FAILURE;
        }
    }
    else {
        if(mysql_query("INSERT INTO users (username, password, premium) VALUES ('$_POST[username]', '$_POST[password]', 1)")) {
            echo $SUCCESS;        
        }
        else {
            echo $FAILURE;
        }
    }
}
if($_POST[action] == 'REMOVE') {
    if(mysql_query("UPDATE users SET premium = 0 WHERE username = '$_POST[username]'")) {
        echo $SUCCESS;
    }
    else {
        echo $FAILURE;
    }
}
?>


previously this was working fine but now it doesnt work,



every time i am doing test signups data is posted in my db correctly but i am getting email saying.

"We were unable to add a user to your website utilizing the CCBill User Management System. We have billed the user, but the user authentication information needs to be added to the corresponding website or their subscription will be cancelled."

I even checked with replacing $_POST with $_GET and sending values it gives "111" as response means success.

I guess something is wrong at your side.
Help needed, thanks

FINESEC 11-09-2012 04:49 AM

First of all this code is vulnerable to sql injection. The other problem with your code is that you should probably do some error logging.
You might be interested in checking out our authentication software - we offer free installation and support:
demo.sitedefensor.com
sitedefensor.com

CurrentlySober 11-09-2012 04:59 AM

I cant help with ccBill, but can help with iBill if needed?

Let me know?


All times are GMT -7. The time now is 05:18 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123