PHP Help Wanted (how do I do this: page.php?section=something) - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Skype & Technology (/forumdisplay.php?fid=9) +---- Forum: Tech Talk (/forumdisplay.php?fid=17) +----- Thread: PHP Help Wanted (how do I do this: page.php?section=something) (/showthread.php?tid=45715) PHP Help Wanted (how do I do this: page.php?section=something) by rav0 on 06-03-2005 at 04:41 AM
PHP newbie alert RE: PHP Help Wanted (how do I do this: page.php?section=something) by -dt- on 06-03-2005 at 05:06 AM
well this forum uses the tid get value to know what thread to grab from the database , but i think you want to use something really simple like code: so say if someone goes to your page blah.php?page=about it will show <--- about page html here ---> thats for a really simple one though... RE: RE: PHP Help Wanted (how do I do this: page.php?section=something) by rav0 on 06-03-2005 at 05:38 AM
Yes, that's what I wanted, not using my database. Thank you. Have a cookie . Hmmm ... that cookie doesn't look that great, have a drumstick as well . I think that I'll use it with $_REQUEST instaed of $_GET. RE: PHP Help Wanted (how do I do this: page.php?section=something) by RaceProUK on 06-03-2005 at 07:09 AM
If the file gets really big, it might slow the server slightly. RE: PHP Help Wanted (how do I do this: page.php?section=something) by saralk on 06-03-2005 at 09:02 AM
I would do something like this... code: then have a file for each page, so index.php?a=links would load links.txt in the middle of the page. This way is better i think because you can add new pages without changing the main file. RE: PHP Help Wanted (how do I do this: page.php?section=something) by Yousef on 06-03-2005 at 09:07 AM
quote: It's dangerous to do that. What if I browse to page.php?a=../some_passwd_file The visitor will be able to access a lot of private files on the server when you use the way saralk suggested, you should build in a protection at least. RE: PHP Help Wanted (how do I do this: page.php?section=something) by Ezra on 06-03-2005 at 09:13 AM
you should put those files in another folder, then they could only do that if they use ../ code: RE: PHP Help Wanted (how do I do this: page.php?section=something) by Yousef on 06-03-2005 at 09:19 AM
quote:/www/specialfolder/../../ will still point to / RE: PHP Help Wanted (how do I do this: page.php?section=something) by Ezra on 06-03-2005 at 09:21 AM
I use it on my website too, I have it like this code: Edit: Automatic coloring would be nice RE: PHP Help Wanted (how do I do this: page.php?section=something) by Stigmata on 06-03-2005 at 09:35 AM
ive always done it like this: code: RE: PHP Help Wanted (how do I do this: page.php?section=something) by rav0 on 06-03-2005 at 10:57 AM
Just to clear up: quote: RE: PHP Help Wanted (how do I do this: page.php?section=something) by Dempsey on 06-03-2005 at 11:05 AM
quote:yea it means NOT so != is not equals to quote:"fish" . "cheese" would make fishcheese . appends variables/text together RE: PHP Help Wanted (how do I do this: page.php?section=something) by KeyStorm on 06-03-2005 at 11:21 AM
quote: !$a also makes it false. Ie if $a contains 'true', some text, or a number but 0 it will become 'false'. It's always good to make $a = NULL at the beginning to quickly ensure the _REQUEST values don't get mixed with your $a in some configs. RE: PHP Help Wanted (how do I do this: page.php?section=something) by rav0 on 06-03-2005 at 11:23 AM
So is this PHP: code: the same as this JavaScript: code: RE: RE: PHP Help Wanted (how do I do this: page.php?section=something) by Dempsey on 06-03-2005 at 11:25 AM
quote:yea except you need a semi colon at the end of the php code: RE: RE: RE: PHP Help Wanted (how do I do this: page.php?section=something) by rav0 on 06-03-2005 at 11:26 AM
quote:Hmmm ... I always forget those . There should be one at the end of the JavaScript as well. RE: PHP Help Wanted (how do I do this: page.php?section=something) by KeyStorm on 06-03-2005 at 11:33 AM
And except javascript runs on the browser, leaving all the execution in hands of the viewer and PHP runs on the server, hidden to all. |