
-----------------------------------
Tycoon
Mon Mar 27, 2006 7:45 am

PHP If Statments + Links
-----------------------------------
Hello everyone,

I am a website coder but I am still learning PHP and I need to know how to split a php file into sections and have them accessable throught links.

When you click a link, it will load the file (lets call it help.php) and go to the appropriate section the link specified.
Example:
Link 01 = section 1 in help.php
Link 02 = section 2 in help.php
Link 03 = section 3 in help.php

help.php


Note: I would just create 10 different pages and have them redirect their but I rather have it neatly in one file - for the purpose I am using - otherwise, I would just create 10+ files :) lol

-----------------------------------
md
Mon Mar 27, 2006 10:30 am


-----------------------------------
Umm... bookmarks? Using bookmarks you can send the user to a specific point on a page... if you're talking about dynamically generating the content of said page depending on what link they click you might want to look into &_GET.

-----------------------------------
Tycoon
Mon Mar 27, 2006 4:13 pm


-----------------------------------
Umm... bookmarks? Using bookmarks you can send the user to a specific point on a page... if you're talking about dynamically generating the content of said page depending on what link they click you might want to look into &_GET.

Yeah generating the content, like the file will have all (in this case) interviews and if you click on different links it will load the appropriate interview

so say I click on Tycoon in the navigation list it will go to the interview file and only load Tycoon's interview

-----------------------------------
md
Mon Mar 27, 2006 5:46 pm


-----------------------------------
Load only that, or load all and jump to that interview? The first can be done with bookamrks, the second would require using $_GET and some php. I'd personally recomend the first if the interviews are static since it'll cut down on server time.

-----------------------------------
Blade
Wed Mar 29, 2006 2:08 am


-----------------------------------
he's talking about case or switch statements..
it'll go something like this:
