...

View Full Version : How can a $var in file.php be passed to file.cgi



sodaup
07-04-2007, 04:39 AM
I will make this short as possible. After 3 days of intense research and experimentation I'm at my wits end.:confused:

On page1.php (I created) are forms that are processed on page.cgi (part of a freeware script).

The linkback "continue shopping" link on page.cgi uses the url in the file.cfg . That link is: h_ttp://companyname.biz/dir That is the base dir for all pages. (http spread to prevent link)

I have page1.php, page2.php, page3.php etc. on and on. Each page is separate and need individual access to page.cgi

How do I create a variable on the pageN.php like:
<?php
$link = "/pageN.php";
?>

then pass that variable to page.cgi and concantenate it like:

$correctlink = "$filecfg_baseurl . $link";

so that the "continue shopping" link will be:
h_ttp://companyname.biz/dir/pageN.php

I am not using mySQL in this project.

Thank you in advance.
P.S. Everything works fine as a one page project. I am expanding to several pages and so this problem crops up.

sodaup
07-04-2007, 10:48 AM
Although it is not the solution that would be preferred since there will be an additional 103 lines of code because now every form on pageN.php will need this modification.

(here is what I am going to do.

Use an already coded variable in the page.cgi which is not being used in my form on page.php.

<input type=hidden name="weight" value="/dir/pageN.php">

Now in the page.cgi where $var is used for the URL at: "continue shopping" I just remove $var and replace it with $weight.

I'm still hoping that someone will be able to describe how to do this with just one or maybe a few lines of code on each pageN.php :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum