Results 1 to 4 of 4

Thread: passing variable GET to custom page

  1. #1
    Join Date
    May 2008
    Posts
    17

    Unhappy passing variable GET to custom page

    Hi,

    I created a custom page to display information but I need to go to this page of variables to link.

    example: page.php? id = pagecustom var1 var2 etc etc

    How can I do?

    Thanks

  2. #2
    Join Date
    Nov 2004
    Posts
    1,822

    Default

    you need to open up page.php smarty assign the variables to the template.
    Have a look at the block php files to see how to do this.

    eg.
    use :
    $variablename = $_REQUEST['variablename'] on the page.php file

    then assign this back to the template, so you can display with <%$variable%>
    Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )

  3. #3
    Join Date
    May 2008
    Posts
    17

    Smile

    Thanks

    RunPreFilter(__FILE__);

    $bad_templates = array('\.\.', 'http://', 'https://', 'file://', 'php://');
    if (!ereg(implode('|', $bad_templates), $id) && file_exists($theme_path . $id . '.html')) {
    DisplayTemplate($theme_path . $id . '.html');

    }
    else {
    header("HTTP/1.0 404 Not Found");
    $requested_url = $_SERVER["REQUEST_URI"];
    DisplayTemplate($theme_path . "404.html", "\$requested_url");
    }

    RunPostFilter(__FILE__);

    ?>

    this is the code of page.php


    I can move on two variables, $ name $ address

    where should I enter?


    Thank you for your help

  4. #4
    Join Date
    May 2008
    Posts
    17

    Default

    Thanks solve

Similar Threads

  1. html page question - Pulling variable
    By kosmo101 in forum v5.x
    Replies: 2
    Last Post: 02-28-2008, 10:16 AM
  2. Passing variable to page.php?
    By pimpmaster in forum v5.x
    Replies: 3
    Last Post: 12-18-2007, 11:05 AM
  3. How to add custom page
    By saj in forum v5.x
    Replies: 6
    Last Post: 11-27-2007, 10:37 AM
  4. Page Title for Custom Contact Page
    By thespursfan in forum v5.x
    Replies: 3
    Last Post: 10-30-2005, 02:12 PM
  5. Replies: 3
    Last Post: 09-21-2005, 04:28 AM

Posting Permissions

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