Note that there are some explanatory texts on larger screens.

plurals
  1. PO$_GET['$something']; What am I doing wrong?
    primarykey
    data
    text
    <p>I am trying to build a universal postback system for a GPT script and well I am having just a bit of a problem.</p> <p>I am not sure if what I am doing is allowed in PHP so that may be the problem, but this is what I got:</p> <pre><code>$ip = cleanQuery($_SERVER['REMOTE_ADDR']); $getaffip = mysql_query("SELECT * FROM affiliates WHERE affip = '".$ip."' OR affip2 = '".$ip."' OR affip3 = '".$ip."' OR affip4 = '".$ip."'"); $affinfo = mysql_fetch_array($getaffip); $affname = $affinfo['name']; $campidi = $affinfo['campid']; $subidi = $affinfo['subid']; $ratei = $affinfo['rateid']; $statusi = $affinfo['creditstatus']; $credit = $affinfo['creditid']; $reverse = $affinfo['reverseid']; $subid = cleanQuery($_GET['$subidi']); $rate = cleanQuery($_GET['$ratei']); $status = cleanQuery($_GET['$statusi']); $campid = cleanQuery($_GET['$campidi']); </code></pre> <p>what this means is it is pulling the variables that particular affiliate uses when they send the information to your postback, for example they would send this to the postback URL:</p> <pre class="lang-none prettyprint-override"><code>http://yoursite.com/postback/postback.php?campaignid=11546&amp;yti=me&amp;credit=1 </code></pre> <p>the <code>$affinfo</code> fetches would pull the defined info that the particular affiliate sends like in the link above <code>$subidi</code> for the affiliate that posted it would be <code>yti</code> and <code>$campidi</code> would be <code>campaignid</code>, but the <code>$_GET</code> isn't pulling that information. It works if I change it to <code>$_GET['yti']</code>; in this case, but that wouldn't make it universal as all affiliates do not use the same variables when they send information to the postback script.</p> <p>I am thinking that the <code>$_GET</code> doesn't support the <code>$values</code>, so what would be my best route of making it get the right information, or do I just have some kind of typo here that I have overlooked?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload