Skip to content
View in the app

A better way to browse. Learn more.

GTAGames.nl - De Nederlandse Grand Theft Auto Community!

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

$_GET, volgende pagina wordt niet ingeladen?

EDIT 2: Ik heb een dingetje gewijzigd en hij doet het, topic kan gesloten worden. Sorry voor het ongemak.

Beste mensen,

Ik ben momenteel bezig met een CMS systeem. Maar ik zit nu met een probleem (er zullen er nog veel komen :puh:). Ik probeer nu dus achter index.php dit te krijgen:

index.php?req=bestandsnaam

Dat lukt me tot nu toe nog goed. Nou wil ik dus ( je hebt een index pagina waarin alles 'geladen' wordt, d.m.v. $GET) die inhoud dus laden, en dat lukt niet... Linkje. Als je op next klikt gebeurt er niks. Ik wil echter dus 'stap 2' erin laden. Die pagina heet req1.php (Klik). Weet iemand hoe ik dit in index.php kan laden? Als je de bron code wilt zien / nodig mocht hebben, post ik hem hier.

Alvast bedankt

P.s. moet nog een naam voor mijn CMS bedenken ^_^

EDIT:

<?
echo '<form action="index.php?req='.($_GET['req']+1).'" method="post" name="cms_install">';
if(!$_GET['req']) echo 'Welcome,
Thank you for chosing XDS CMS. If you follow the next steps the CMS will be installed on your server. For support please click <a href="http://cms.hierstondeenlink.nl" target="_blank">here</a>

<a href="java script:document.cms_install.submit()">Next</a>';
else include('req1'.$_GET['req1'].'.php');
?>

Dat is de code die ik gebruik om de inhoud weer te geven.

Edited by SummerBase

Featured Replies

Op verzoek van de topic starter heb ik het topic weer geopend. Tevens had de topic starter een vraag en die luidt als volgt: ''Wil namelijk content in index.php laten weergeven d.m.v $_GET. Alleen zijn de namen van de pagina's verschillend, dit was gisteren niet het geval. Toen heten ze allemaal reqX. Op x dan een getal."

Je kunt pagina's heel gemakkelijk insluiten (includen) met het variabel $_GET. Je kunt de content zelf in de index zetten, maar ook includen. Ik zal twee simpele voorbeelden geven.

Hiermee haal je de code direct uit de index.php:

<?php 

if ( $_GET['pagina'] == 1 ) { echo "Tekst...pagina 1"; } 
elseif ( $_GET['pagina'] == 2 ) { echo "Tekst...pagina 2"; } 
elseif ( $_GET['pagina'] == 3 ) { echo "Tekst...pagina 3"; } 
else { echo "Tekst.. Standaard! "; } 

?>

Hiermee include je de gegevens uit een extern bestand:

<?php 

if ( $_GET['pagina'] == 1 ) { include("pagina1.php"); } 
elseif ( $_GET['pagina'] == 2 ) { include("pagina2.php"); } 
elseif ( $_GET['pagina'] == 3 ) { include("pagina3.php"); } 
else { include("pagina_standaard.php"); } 

?>

Ik hoop dat je het een beetje snapt, mochten er nog vragen, onduidelijkheden zijn dan horen wij dat graag. ;)

  • Author

Op de een of andere manier wordt de pagina niet goed ingelezen:

cms_fout.jpg

Ik had zelf nog een scriptje ontwikkeld die zal ik zo even posten.

Edited by xgaming

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.