How to make a closed loop reporting php?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
lucas20042004
Forum Newbie
Posts: 7
Joined: Mon May 15, 2006 7:39 am

How to make a closed loop reporting php?

Post by lucas20042004 »

My site: ipods.thefreegiftnetwork.com offers free gifts for people who complete offers such as trials and things. I want to make it so when someone completes an offer this reflects in the users area on my site. On revenue universe (an affliate program), it says when someone completes an offer it sends this back to my site:

http://ipods.thefreegiftnetwork.com/clo ... status=xxx".

campaign: The offer ID number of the offer being posted.
name: The name of the offer being posted.
sid: The userid that you passed to the campaign.
status: This will be either 1 or 2, for completed or not completed, respectively.

So I need to make a closedloop.php, so when revenueuniverse sends the command to it, it will update on my site.

I doubt anyone will know what im on about but its worth a try.. Thanks
User avatar
PrObLeM
Forum Contributor
Posts: 418
Joined: Sun Mar 07, 2004 2:30 pm
Location: Mesa, AZ
Contact:

Post by PrObLeM »

1. Have it pull the variables from the query string. (using $_GET)

2. Update the database

3. Output the info on the page.
lucas20042004
Forum Newbie
Posts: 7
Joined: Mon May 15, 2006 7:39 am

Post by lucas20042004 »

Thanks for the quick reply but I havent got a clue about writing php..
User avatar
PrObLeM
Forum Contributor
Posts: 418
Joined: Sun Mar 07, 2004 2:30 pm
Location: Mesa, AZ
Contact:

Post by PrObLeM »

this is a simple version just to help you get started

Code: Select all

<?php
//this page will insert into database
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password') or die(mysql_error());
mysql_query("INSERT INTO database (`campaign`, `name`, `sid`, `status`) VALUES($_GET['campaign'], $_GET['name'], $_GET['sid'], $_GET['status'] )");
?>
lucas20042004
Forum Newbie
Posts: 7
Joined: Mon May 15, 2006 7:39 am

Post by lucas20042004 »

Hi, ok I think I have nearly got it but could you help me edit that script.

The table name is "irs_coffers"

The column name for the SID is "could"

The column name for status is "coStatus"

Please could you edit it for me. I dont need the offer name or campaign bit in it anymore.

Thanks
Post Reply