love you too :sOriginally Posted by Anderman
2 Tutorials pinned OMG!

love you too :sOriginally Posted by Anderman
Yea but its actually a good tutoriul for once
2 Tutorials pinned OMG!
*Image Removed
Ahemm.. How exactly was my sig innapropriate?
Goddamit i hate this forum :@
I RESIGN FROM GRAPHICS DESIGNER :@ :@ :@
No need to thank me :p i only wanted help and still didnt get it![]()
The tutorial has been updated with an easier way of using includeive added it underneath the old tut
Last edited by xEnigmA; 03-08-2005 at 05:41 PM.
*Image Removed
Ahemm.. How exactly was my sig innapropriate?
Goddamit i hate this forum :@
I RESIGN FROM GRAPHICS DESIGNER :@ :@ :@
Yay!
I finnaly added includes to The-Pit
;D
Thanks for the tut man
That new way i put is so much easier isnt it, ross strangely finds that one harder?
*Image Removed
Ahemm.. How exactly was my sig innapropriate?
Goddamit i hate this forum :@
I RESIGN FROM GRAPHICS DESIGNER :@ :@ :@
I used the old one
That onePHP Code:<?php
$_GET['page'];
switch($page)
{
case "home":
include('home.php');
break;
case "news":
include('news.php');
break;
case "tutorials":
include('tutorials.php');
break;
case "contact":
include('contact.php');
break;
case "sitemap":
include('sitemap.php');
break;
case "admin":
include('admin.php');
break;
default:
include('home.php');
break;
}
?>
the other ones easier >:~D
*Image Removed
Ahemm.. How exactly was my sig innapropriate?
Goddamit i hate this forum :@
I RESIGN FROM GRAPHICS DESIGNER :@ :@ :@
No it's not . . . Maybe it's just the way you explained it? I don't know. But it doesn't look easier.
REMOVED
Edited by jesus (Forum Super Moderator): Please do not have text in your signature which is over size 4.
PHP includes are sometimes used instead of iframes it makes another page appear as though it is actually on the page similar to iframes without all of the scrollbars right making a php include is pretty basic
Sorry for asking this really stupid question but acording to this quote if ever my english got better it is saying that the php navigation took out the '' Iframes '' and place is content where it is but without having any code, its just simply adding the text were u want it? So if i am right u place the code like a simply text like cutenews thing (were u want it to be appear) and then where u place ur navigation u put the link that will activate the php page?
But yeah it would be fun to clarifie this for me if u understand what i said, quite tired today, and yeah nice tutorial throught even if i dont get to much the difference between a php navigation and html navigation unless the coding is really different.
Bad way to go about it... A user could simply request ?page=../../etc/passwd and they could view it (UNIX)!
Make sure you putasPHP Code:include('news.php');
otherwise expect your box to be exploited!PHP Code:include('./path/to/news.php');
Heres the code I use on all of my websites, you should use it too (remember to change the array $pages).
If you have 50odd PHP pages you'll have a big *** PHP code, so heres a loop that will go through an array of pages and include them, also exploit safe.
'name' => './path/to/file', etc.
http://somesite.com/?i=name would load up path/to/file
You can change $GET['x'] accordingly ?x=name
PHP Code:<?php
$default = './i/news.php';
$pages = array('about' => './i/about.php','servers' => './i/servers.php','services' => './i/services.php');
if(array_key_exists($_GET['i'], $pages))
{
foreach($pages as $pageid => $pagename) {
if($_GET['i'] == $pageid && file_exists($pagename))
{
include $pagename;
}
}
} else {
include $default;
}
?>
Want to hide these adverts? Register an account for free!