Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

221
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda