Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7196733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:50:04+00:00 2026-05-28T20:50:04+00:00

I have an osCommerce-shop where I need to access a variable from inside an

  • 0

I have an osCommerce-shop where I need to access a variable from inside an included php-file. For the sake of simplicity here is a short example of what I am talking about without anything related to osCommerce:

The file inside.php shows a picture and is only displayed on the homepage by being somehow required in index.php. Depending on what language has been selected it should show either picture 1 or 2. Currently only the first picture is displayed because I have no way of knowing which one should be used. Normally there is a $language_id variable which I can check if it is either 1 (english) or 2 (german). Unfortunately $language_id in inside.php is empty (or at least it looks like it) so I need a way to access the variable from index.php. Is there a way to do this without passing this variable or something like that? (Since it is a osCommerce-shop I am not sure how I could to that)

I hope what I tried to explain is somewhat understandable, if not, please ask and I’ll try to clarify.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T20:50:04+00:00Added an answer on May 28, 2026 at 8:50 pm

    I assume in your index.php there should have some codes like:

    require_once('inside.php');
    

    The four including functions: require(),require_once(),include(),include_once(), either will do as inserting code from ‘inside.php’ to ‘index.php’. So code after this inclusion should be able to access $language_id if it was REALLY already set. To check whether $language_id was set before, use

    isset($language_id)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In oscommerce, I have set the DIR_WS_IMAGES from the config.php to be an external
Sorry about the length here. I'm using oscommerce and have a page with all
Is it bad practice to hack the main application_top.php file of osCommerce for making
I have here a osCommerce 2.2-MS2. I had some settings before which were working
In an oscommerce site I have the following: Server response = Content-type: text/html;charset=UTF-8 and
I'm working with oscommerce and i have problem with Paypal ipn When someone makes
I have an old osCommerce site that was PHP4, now running on PHP5. Named
My Clients are Complaining for slow speed of my osCommerce Website.. I dont have
I have an array from a $_GET say Array ( [0] => 0 [1]
how to send array through url in PHP? I have an array of product

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.