Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

217
Views
How do I load a .php page from another page and load dynamic content

I have a grocery store web page index.html with a navigation to different product categories (Fruits, Meats, Snacks etc...), then I have a page named aisle.php which will display all of the products from the category, and it gets all of the products from a json file. I'm wondering how do I redirect to the aisle.php page and load the products I want, since I need to know which link was clicked. I'm new to php and json and it's what we are required to use for our class, thanks in advance!

Image of the home page

Image of the aisle page with sample products hardcoded

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

you can form your link to aisle.php with a parameter in query string like so : <a href='aisle.php?content=Meats'></a> and in aisle.php your can check the parameters via $_GET variable and show the products you need

about 4 years ago · Juan Pablo Isaza Report

0

There are several ways of doing this :

  • using GET variables (probably the easiest as a beginner, but also the dirties)
  • using POST variables (through an HTML form)
  • setting up an URL redirection (cleanest but probably not easy to beginners)

Once your variable is sent, you can save it into a SESSION or a COOKIE.

I suggest you read about PHP superglobals

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!