Welcome to Dream.In.Code
Become a PHP Expert!

Join 150,000 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,328 people online right now. Registration is fast and FREE... Join Now!




Some help please :-(

 
Reply to this topicStart new topic

Some help please :-(, Should be a simple one

kf6yvd
12 Dec, 2006 - 07:29 PM
Post #1

New D.I.C Head
*

Joined: 27 Mar, 2003
Posts: 21


My Contributions
I am currently using 4images to manage my gallery and memory will become an issue at one point so during the "off season" i am streamlining my site.

I already have a lightbox system configured (not live yet) to help with saving me on memory but want a specific script tp include in my index.php once I go live with it. I know this is a simple one as I had it on one of my old sites but cand find it anymore so here goes..

If i remember correctly it was based on if/else and null statements to allow me to assign values to certain characters so that s= could read a folder and c= could read a file in that same folder.

It would allow the links to output as(or something similiar) http://usafirepix.net?s=nm&c=albuquerque

I am not sure of the exact terminology so I hope I have been able to make it clear what I need crazy.gif

TIA for the help..
User is offlineProfile CardPM
+Quote Post

snoj
RE: Some Help Please :-(
12 Dec, 2006 - 07:31 PM
Post #2

Fell off the face of the earth
Group Icon

Joined: 31 Mar, 2003
Posts: 3,325



Thanked: 9 times
Dream Kudos: 750
My Contributions
I'm sorry, but what is your problem?
User is offlineProfile CardPM
+Quote Post

kf6yvd
RE: Some Help Please :-(
12 Dec, 2006 - 07:32 PM
Post #3

New D.I.C Head
*

Joined: 27 Mar, 2003
Posts: 21


My Contributions
QUOTE(hotsnoj @ 12 Dec, 2006 - 08:31 PM) *

I'm sorry, but what is your problem?


I'm just hoping someone here has the code to do what I was referring to..

User is offlineProfile CardPM
+Quote Post

maggie_noodles
RE: Some Help Please :-(
12 Dec, 2006 - 07:51 PM
Post #4

pen and paper slave
****

Joined: 8 Nov, 2006
Posts: 738



Thanked: 1 times
My Contributions
QUOTE(kf6yvd @ 12 Dec, 2006 - 08:32 PM) *

QUOTE(hotsnoj @ 12 Dec, 2006 - 08:31 PM) *

I'm sorry, but what is your problem?


I'm just hoping someone here has the code to do what I was referring to..

Post your code.
User is offlineProfile CardPM
+Quote Post

eXceed69
RE: Some Help Please :-(
12 Dec, 2006 - 08:26 PM
Post #5

"Super Sentai Knight Of DawN"
Group Icon

Joined: 12 Nov, 2006
Posts: 682



Thanked: 1 times
Dream Kudos: 675
My Contributions
no one will be able to give you the code, common have some luv with programming had some effort..post your code
User is offlineProfile CardPM
+Quote Post

kf6yvd
RE: Some Help Please :-(
13 Dec, 2006 - 04:13 AM
Post #6

New D.I.C Head
*

Joined: 27 Mar, 2003
Posts: 21


My Contributions
QUOTE(eXceed69 @ 12 Dec, 2006 - 09:26 PM) *

no one will be able to give you the code, common have some luv with programming had some effort..post your code


I was afraid that I was not clear enough in my original post..I do not have the code to achieve this but I know it can be done. I am not familiar enough with this stuff to be able to write it and do not have the time due to work to be able to go through a tutorial and learn it until sometime next summer at the earliest and I was hoping to get it online prior to that of course :-)

In the hope that someone can help me out lets see if i cane make it easier to understand (just in case i wasnt clear) what i am trying to achieve.

How can I take this link

http://usafirepix.net/nm/albuquerque.php

to this link

http://usafirepix.net?s=nm&c=albuquerque

and still have it reading the exact same location on server...

This post has been edited by kf6yvd: 13 Dec, 2006 - 04:29 AM
User is offlineProfile CardPM
+Quote Post

BetaWar
RE: Some Help Please :-(
13 Dec, 2006 - 06:05 AM
Post #7

#include <soul.h>
Group Icon

Joined: 7 Sep, 2006
Posts: 2,304



Thanked: 101 times
Dream Kudos: 1275
My Contributions
Oh that is easy.

Simply use something like so:

CODE

<?php

$dir = $_GET[s];
$file = $_GET[c];
$full_path = $dir . '/' . $file . '.php';

if (file_exists($full_path)) {
  include $full_path;
}
else {
  include'home.php';
}
?>


This post has been edited by BetaWar: 13 Dec, 2006 - 06:06 AM
User is online!Profile CardPM
+Quote Post

kf6yvd
RE: Some Help Please :-(
17 Dec, 2006 - 09:30 AM
Post #8

New D.I.C Head
*

Joined: 27 Mar, 2003
Posts: 21


My Contributions
[quote name='BetaWar' date='13 Dec, 2006 - 07:05 AM' post='190229']
Oh that is easy.

Thanks a bunch..thats exactly what I was looking for..Just got through getting it all online..

Opinions would be appreciated..

USA FirePix

One other question for u guys.. Is it possible to assign a different value for the background color based on the browser it is being viewed in..

In Mozilla it blends perfectly with the graphic I am using but in IE it comes out lighter than the graphic...
User is offlineProfile CardPM
+Quote Post

BetaWar
RE: Some Help Please :-(
17 Dec, 2006 - 10:35 AM
Post #9

#include <soul.h>
Group Icon

Joined: 7 Sep, 2006
Posts: 2,304



Thanked: 101 times
Dream Kudos: 1275
My Contributions
Yes there is a way to tell which browser is being used with PHP, but I am not sure of it at the moment, try googling it.

Also if you want people's opinions on your site try going here:

http://www.dreamincode.net/forums/showforum5.htm

and creating a topic
User is online!Profile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 08:30PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month