Topic Closed

Hi,

I'm in the process of designing one website that is going to be used by multiple persons. The purpose of the website is to promote clickbank products. 

For those not familiar with the clickbank, the URL looks like this: http://YourID.advertiser.hop.clickbank.net

Since "YourID" will be changing across many users, in gpEasy I put <a href="http://"<?php echo $id ?>"...advertiser..blabla>click here</a>

The users have previously put their id (the YourID) in a separately designed form. That form is a script that instead of passing variables via cookies/sessions (because there are steps between that part and the gpEasy part) - instead, it writes the id to a file called yourid.txt

Now the problem is that I can't find a way to include those files into the template.php of my template. Whatever I try, I don't get any errors, but I don't get any results either (literally nothing).

Here's what I'm talking about:

The form script:

 

$myfile = "../" . $GLOBALS["cbid"] . "/clickbankid.txt";
$fh = fopen($myfile, 'r');
$theData = fread($fh, filesize($myfile));
fclose($fh);
echo "Here's the CBID read from the file:<br>";
echo $theData;
 
In the above script, the variable $theData is shown fine i.e. the correct value is read from clickbankid.txt
 
But the moment I try to include it into template.php, it doesn't work.
 
Here's a pastebin link to see what my template.php file looks like: http://pastebin.com/42ZF4NLh
 
One more thing: I have managed to make index.php and main.php load the file and when I put "echo $id" in either of the two, I get the result I wanted. But, when I put "echo $id" in any file (the template.php), I get nothing.
10 years ago#596

Never mind, I solved this somehow. I had to include that piece of script (the one that opens the txt file) in every php file - main.php, index.php , template.php and the files in my _extra folder

10 years ago#606

Topic Closed

 

News

elFinder 2.1.50 in Upcoming Release
12/28/2019

A new release for Typesetter is in the works with a lot of improvements including the ... Read More

Typesetter 5.1
8/12/2017

Typesetter 5.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More

More News

creisi productions

Dienstleistungen von creisi productions, Luzern (Schweiz): * Konzeption, Planung und Erstellung Ihres Internet-Auftritts * Betreuung und Aktualisierung/Pflege Ihrer Website * ...

Find out more about our Provider Spotlight

Log In

  Register