![]() | | ||||||||
| | #1 |
| HyperActive Warrior Join Date: Sep 2011
Posts: 199
Thanks: 4
Thanked 4 Times in 4 Posts
|
hello everyone im trying to add content locker to my site so people can take surveys to earn "coins" my sites currency. i have a postback.php file they want added to my site so soon as people complete an offer it automatically adds coins to the users account this is what i got.. /* * Basic Postback Example Script. * Copyright 2011. CPAlead. All Rights Reserved */ $YOURPASSWORD = "secret1234"; $mysql_where = "localhost"; $mysql_username = "your_mysql_username"; $mysql_password = "your_mysql_password"; $mysql_database = "your_user_database"; $password = $_REQUEST['password']; if ($password != $YOURPASSWORD) { echo "Access Denied"; exit; } mysql_connect($mysql_where, $mysql_username, $mysql_password); mysql_select_db($mysql_database); /* * For a complete variable list see: http://www.cpalead.com/pdf/postback-...tion-guide.pdf */ $subid = $_REQUEST['subid']; $survey = $_REQUEST['survey']; $earn = $_REQUEST['earn']; $pdtshow = $_REQUEST['pdtshow']; /* * db_name = the name of the database in which the table resides * players = the name of the table inside db_name that we'll be updating * points = the column in the 'players' table to update */ mysql_query("UPDATE db_name.players SET points=points+".$pdtshow." WHERE id='".$subid."'") or die(mysql_error()); mysql_close(); echo "Success: ".$subid." earned ".$pdtshow." points\n"; Now how can i edit it so it will work on my site? my tables i think needed is user and coins. so where it says UPDATE db_name.players i should change it to .users and points=points should be changed to coins=coins Please give me some guidance Thanks |
| Social Media Explode.com A New Member Joins Every Min! Get Free Facebook Likes, Twitter Followers, Re-Tweets, YouTube Views, And More! | |
| | |
| | #2 |
| Senior Warrior Member Join Date: Jun 2008
Posts: 4,130
Thanks: 10
Thanked 508 Times in 402 Posts
|
Your best bet is to touch base with your AM, they are their for questions just like these
|
| | |
| | |
| | #3 |
| Enlightened Warrior War Room Member Join Date: Nov 2007 Location: New York, USA.
Posts: 612
Thanks: 22
Thanked 127 Times in 96 Posts
|
Wow, that is a mega, super-advanced, PHP/MySQL question. ![]() Fortunately for you, I also know how to program in PHP/MySQL a wee bit ![]() Just keep in mind that that script from CPA Lead is just an example or "template". You're probably going to need a programmer to help you develop a more robust solution. Anyway, Yes... you can change - or rather, create - a TABLE named "users" instead of one named "players". The "db_name" part refers to the name of your actual database; thus, you can have db_name.users instead of db_name.players. Note: No change would be needed if you create your database and tables with the names you want from the very beginning. As far as the "points=points" or "coins=coins" part... that syntax appears off. To be sure, when you create your database tables, you can add columns to them and name them basically whatever you want. So, you'd create table named "users" and add a column named "coins". To update the "COINS" column for a particular "USER", you'd just use this syntax (I've intentionally left out the "$" from the variables as they were disappearing for some reason. Be sure to add them back!): PHP Code: MySQL :: MySQL 5.0 Reference Manual :: 12.2.10 UPDATE Syntax Hope you've found this helpful. Best, - Jay |
| | |
| | |
| | #4 |
| HyperActive Warrior Join Date: Sep 2011
Posts: 199
Thanks: 4
Thanked 4 Times in 4 Posts
|
Its still not working.. has anyone used the CPAlead content locker before? I called them today and got no support for making it work on my site Thanks. |
| Social Media Explode.com A New Member Joins Every Min! Get Free Facebook Likes, Twitter Followers, Re-Tweets, YouTube Views, And More! | |
| | |
| | #5 |
| Enlightened Warrior War Room Member Join Date: Nov 2007 Location: New York, USA.
Posts: 612
Thanks: 22
Thanked 127 Times in 96 Posts
|
Hey Tahoecale, What errors are you getting? Also, I have to ask... how experienced are you with PHP & MySQL? And yes... I use the CPA Lead content locker and many others. Even built my own |
| | |
| | |
| | #6 |
| Senior Warrior Member War Room Member Join Date: May 2011 Location: World Wide Web
Posts: 1,246
Thanks: 109
Thanked 245 Times in 181 Posts
|
only this section $YOURPASSWORD = "secret1234"; $mysql_where = "localhost"; $mysql_username = "your_mysql_username"; $mysql_password = "your_mysql_password"; $mysql_database = "your_user_database"; |
| ||TOP CPA MARKETING COACHING FORUMS|| Fb ADs Not Getting approved? this way ===> Get Your Facebook ads approved (Free Guide) Reason why your offers don`t convert on 7search ===>>>Click here (Free Guide) | |
| | |
| | #7 |
| is Pace Lattin War Room Member Join Date: Oct 2011
Posts: 688
Thanks: 13
Thanked 92 Times in 78 Posts
|
CPALead is a good, very profitable company making a lot of money. I've had projects that have done $80k a day with them. Content Locking/Unlocking is a growing business, and there are several major companies you can work with. http://performinsider.com/2011/11/co...-the-industry/ |
![]() Pace Lattin | Performance Marketing Insider | Pace Lattin | Read Real CPA Network Reviews Get $100 in Free Twitter Ads Here | |
| | |
| | #8 | |
| HyperActive Warrior Join Date: Sep 2011
Posts: 199
Thanks: 4
Thanked 4 Times in 4 Posts
| Quote:
That can't be it all because if you look more into the code you will see update mysql and it needs to be changed to my table names and i did that but still not working | |
| Social Media Explode.com A New Member Joins Every Min! Get Free Facebook Likes, Twitter Followers, Re-Tweets, YouTube Views, And More! | ||
| | |
![]() |
|
| Tags |
| content, cpalead, locker, question |
| Thread Tools | |
| |
![]() |