1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Help: Text Script

Discussion in 'White Hat SEO' started by CoyoteAssassin, Jan 21, 2011.

  1. CoyoteAssassin

    CoyoteAssassin Elite Member

    Joined:
    Jan 3, 2010
    Messages:
    1,862
    Likes Received:
    3,906
    Occupation:
    Full Time IMer
    Location:
    USA
    All:

    I'm about to create 200+ event registrations and the last thing I want is to later have a notice that I need to include on each event and have to go back and edit each one.

    My thought is to insert a PHP tag into the event and call for the text in a indicated text file. For the time being, nothing will show, but if all of the sudden, I need to let every one know that they can save $50 if they enter code SAVE50, I want to enter that into the .txt file which is called by the PHP script which has already been included on each page.

    I know this is possible but I can not find the tag.

    Any help will be appreciated.

    Thanks.
     
  2. TapTapper

    TapTapper Junior Member

    Joined:
    Apr 15, 2009
    Messages:
    163
    Likes Received:
    138
    Occupation:
    coder, webstore mangler
    Location:
    US
    Home Page:
    Search for php include

    Basic include:
    Code:
    http://www.w3schools.com/php/php_includes.asp
    And with vars:
    Code:
    http://php.net/manual/en/function.include.php
     
    • Thanks Thanks x 1
  3. TapTapper

    TapTapper Junior Member

    Joined:
    Apr 15, 2009
    Messages:
    163
    Likes Received:
    138
    Occupation:
    coder, webstore mangler
    Location:
    US
    Home Page:
    And if you need to use conditions

    Code:
    <?php
    if ($a > $b) {
        echo "a is bigger than b";
    } elseif ($a == $b) {
        echo "a is equal to b";
    } else {
        echo "a is smaller than b";
    }
    ?>
    
     
  4. CoyoteAssassin

    CoyoteAssassin Elite Member

    Joined:
    Jan 3, 2010
    Messages:
    1,862
    Likes Received:
    3,906
    Occupation:
    Full Time IMer
    Location:
    USA
    My pages is .jsp. Do you think this will work or do I need something else?
     
  5. JesusBack

    JesusBack Executive VIP Premium Member

    Joined:
    Sep 15, 2010
    Messages:
    1,159
    Likes Received:
    1,284
    Occupation:
    Almost done :D
    Location:
    {calm|cool|collected}
    • Thanks Thanks x 1
  6. CoyoteAssassin

    CoyoteAssassin Elite Member

    Joined:
    Jan 3, 2010
    Messages:
    1,862
    Likes Received:
    3,906
    Occupation:
    Full Time IMer
    Location:
    USA
    Thanks guys. I'll give it a try. It someone else comes along and finds something better, post it and let me know.

    Thanks.