Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 10-23-2012, 03:35 AM   #1
freecartoonporn
Confirmed User
 
freecartoonporn's Avatar
 
Industry Role:
Join Date: Jan 2012
Location: NC
Posts: 7,683
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

Last edited by freecartoonporn; 10-23-2012 at 03:36 AM..
freecartoonporn is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-09-2012, 04:49 AM   #2
FINESEC
Registered User
 
Industry Role:
Join Date: Nov 2012
Location: Warsaw
Posts: 59
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
FINESEC is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-09-2012, 04:59 AM   #3
CurrentlySober
Too lazy to wipe my ass
 
CurrentlySober's Avatar
 
Industry Role:
Join Date: Aug 2002
Location: A Public Bathroom
Posts: 38,548
I cant help with ccBill, but can help with iBill if needed?

Let me know?
__________________


👁️ 👍️ 💩
CurrentlySober is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.