|
Post by Smashey on Aug 20, 2005 11:58:43 GMT -8
You know Naruto's PHP Navigation script? I got that all working fine, but how would I make it so I like go to one page, and it has a directory of other pages, such as a download page, and it would be like darkgamer.com/index.php?page=downloads&id=templates? Something like that.
|
|
|
Post by CD on Aug 21, 2005 15:18:31 GMT -8
Its a bit more complex then NAruto's. I'm going to show it like this (using that example) First off, we have the main Downloads section. It has three sub-categories. Templates, tuts, and uhh... say porn. $page = $_GET['page']; $id = $_GET['id'];
if($id == "templates"){ include("templates.php"); } else if($id == "tutorials"){ include("tuts.php"); } else if($id == "porn"){ include("porn.php"); } else { include("downloads.php"); }
|
|
|
Post by Smashey on Aug 22, 2005 6:53:06 GMT -8
So I should put that in the downloads.php file?
|
|
100%
|
Post by Aaron on Aug 22, 2005 17:12:49 GMT -8
Case, switch > If else
=]
And no .. you would put that in your index file. But still .. case and switch is also more organized >_> *wonders which Smashey wants to use*
|
|
|
Post by CD on Aug 22, 2005 17:47:48 GMT -8
I'm helping him over MSN, and I sort of showed him how to do it.
|
|
|
Post by CrAzY_J on Aug 24, 2005 16:56:08 GMT -8
CD you need to start using new methods, all you're methods are kinda nooby, same thing in JS =P
|
|
100%
|
Post by Aaron on Aug 24, 2005 17:04:19 GMT -8
Are you using if/else statements when you're helping him? >_>
|
|
|
Post by CrAzY_J on Aug 24, 2005 17:07:26 GMT -8
Are you using if/else statements when you're helping him? >_> he most likely is, he is good with the crappy coding he can do, but like i said, it's crappy
|
|
|
Post by CD on Aug 25, 2005 11:49:27 GMT -8
<_<..... So what if I didn't learn arrays til I did SZ's info center?..... <_<
So what if I really havn't learned switch-case yet >_>......
<_<
|
|
|
Post by CrAzY_J on Aug 25, 2005 14:08:26 GMT -8
<_<..... So what if I didn't learn arrays til I did SZ's info center?..... <_< So what if I really havn't learned switch-case yet >_>...... <_< you didn't know arrays? o.O *kicks* how can i ever call you my student
|
|