Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Nov 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How can a $var in file.php be passed to file.cgi

    I will make this short as possible. After 3 days of intense research and experimentation I'm at my wits end.

    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.

  • #2
    New to the CF scene
    Join Date
    Nov 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Solution Found:

    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •