Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-23 Thread Ólafur Waage
I am pretty certain that this isnt possible under current code. But i just wanted a confirmation on this, since i worked on the code for a while trying to get to the end point. And yes Jochem, i am looking for a magical location :P Well, thanks guys :) Ólafur Waage 2008/8/24 Micah Gersten <[EMAI

Re: [PHP] Serving pages based on user input

2008-08-23 Thread tedd
At 10:02 PM -0700 8/23/08, Prasad Chand wrote: Thanks for that information. But in my case I need to serve pages based on selection of US states. There are 50 of them, so generating pages dynamically would have been a nice idea. Really, there are 50 of them!?!? :-) You don't have to generat

Re: [PHP] Serving pages based on user input

2008-08-23 Thread Robert Cummings
On Sun, 2008-08-24 at 01:32 +0200, Jochem Maas wrote: > Ólafur Waage schreef: > > You can read about the header function. > > > > http://is2.php.net/manual/en/function.header.php > > hi Ólafur, > > his situation doesn't require a redirect (he only thinks it does), > and redirects suck when used

Re: [PHP] Serving pages based on user input

2008-08-23 Thread tedd
At 9:55 PM -0700 8/23/08, Prasad Chand wrote: This is off-topic, but the reason I was touchy about includes was because it could create seo problems. http://forums.digitalpoint.com/showthread.php?t=31519 Bttt -- nope -- two different types of "includes". The link above is discussing hav

Re: [PHP] Serving pages based on user input

2008-08-23 Thread Prasad Chand
Thanks for that information. But in my case I need to serve pages based on selection of US states. There are 50 of them, so generating pages dynamically would have been a nice idea. tedd wrote: At 1:21 AM +0100 8/24/08, Ashley Sheridan wrote: On Sat, 2008-08-23 at 20:07 -0400, tedd wrote:

Re: [PHP] Serving pages based on user input

2008-08-23 Thread Prasad Chand
Jochem Maas wrote: Prasad Chand schreef: Hi, I am fairly new to PHP. I would like to serve a page to a user based on his input. Say, I have a page 1 where user has 3 options(drop down menu). Based on his selection I would like a php script to direct him to another page (to pages 2,3,4 based

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-23 Thread Micah Gersten
What is the point of figuring that out? If we knew that, we might be able to help you with a solution. As it stands what you want is not possible AFAIK. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Ólafur Waage wrote: > I am within a certain directory o

Re: [PHP] Serving pages based on user input

2008-08-23 Thread tedd
At 1:21 AM +0100 8/24/08, Ashley Sheridan wrote: On Sat, 2008-08-23 at 20:07 -0400, tedd wrote: At 2:03 PM -0700 8/23/08, Prasad Chand wrote: >I am fairly new to PHP. I would like to serve a page to a user based on his input. Say, I have a page 1 where user has 3 options(drop down menu). Base

Re: [PHP] Serving pages based on user input

2008-08-23 Thread tedd
At 2:03 PM -0700 8/23/08, Prasad Chand wrote: Hi, I am fairly new to PHP. I would like to serve a page to a user based on his input. Say, I have a page 1 where user has 3 options(drop down menu). Based on his selection I would like a php script to direct him to another page (to pages 2,3,4 ba

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-23 Thread Jochem Maas
Ólafur Waage schreef: Robert, thanks for the reply but i had tried __FILE__ and __DIR__ (which is dirname(__FILE__)) but it doesnt work. __DIR__ only came into existence very recently IIRC, realpath(dirname(__FILE__)); will tell you what directory the *current script* is actually living in ...

Re: [PHP] Serving pages based on user input

2008-08-23 Thread Jochem Maas
Ólafur Waage schreef: You can read about the header function. http://is2.php.net/manual/en/function.header.php hi Ólafur, his situation doesn't require a redirect (he only thinks it does), and redirects suck when used unecessarily. (plenty of info on the web about why this is so ... hunt for

Re: [PHP] Serving pages based on user input

2008-08-23 Thread Jochem Maas
Prasad Chand schreef: Hi, I am fairly new to PHP. I would like to serve a page to a user based on his input. Say, I have a page 1 where user has 3 options(drop down menu). Based on his selection I would like a php script to direct him to another page (to pages 2,3,4 based on what he selected)

Re: [PHP] Simple tiny php template

2008-08-23 Thread Jochem Maas
Stut schreef: On 22 Aug 2008, at 20:48, Jochem Maas wrote: Stut schreef: define('TPL_DIR', dirname(__FILE__).'/tpl/'); function TPL($__filename, $__data = array(), $__return = false) { $__retval = ''; $__tplfilename = TPL_DIR.$__filename; if (file_exists($__tplfilename)) { if

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-23 Thread Ólafur Waage
Thanks for this David, i was using REQUEST_URI and other $_SERVER info and mixed that together. It worked in some situations but on hosted servers (like GoDaddy and others like that where they use a complicated directory setup) it does not work. Olafur Waage 2008/8/23 David Otton <[EMAIL PROTECTE

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-23 Thread David Otton
2008/8/23 Ólafur Waage <[EMAIL PROTECTED]>: > Robert, thanks for the reply but i had tried __FILE__ and __DIR__ > (which is dirname(__FILE__)) but it doesnt work. > > And thanks for the reply also Ashley but as i said in my first post, i > had tried $_SERVER with limited results If checking the o

Re: [PHP] Serving pages based on user input

2008-08-23 Thread Ólafur Waage
You can read about the header function. http://is2.php.net/manual/en/function.header.php Ólafur Waage 2008/8/23 Prasad Chand <[EMAIL PROTECTED]>: > Hi, > > I am fairly new to PHP. I would like to serve a page to a user based on his > input. Say, I have a page 1 where user has 3 options(drop down

[PHP] Serving pages based on user input

2008-08-23 Thread Prasad Chand
Hi, I am fairly new to PHP. I would like to serve a page to a user based on his input. Say, I have a page 1 where user has 3 options(drop down menu). Based on his selection I would like a php script to direct him to another page (to pages 2,3,4 based on what he selected). I am unable to figur

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-23 Thread Ólafur Waage
Luke, i am looking for local directory info. Not URL info as i said before. And Ashley, as i said in the original mail. I had tried $_SERVER. Thanks for the reply though. Ólafur Waage 2008/8/23 Luke <[EMAIL PROTECTED]>: > $_REQUEST? > > Luke Slater > Lead Developer > NuVoo > > On 23 Aug 2008, at

Re: [PHP] Help and Advice needed please.

2008-08-23 Thread sean greenslade
So Byron, what do you think? Do you like the idea of a mysql database? On Sat, Aug 23, 2008 at 11:57 AM, Luke <[EMAIL PROTECTED]> wrote: > I'm up for helping too. Also, a big agree to Sean too, MySQL seems the best > way to go here. > > 2008/8/23 sean greenslade <[EMAIL PROTECTED]> > > I would be

Re: [PHP] Help and Advice needed please.

2008-08-23 Thread Luke
I'm up for helping too. Also, a big agree to Sean too, MySQL seems the best way to go here. 2008/8/23 sean greenslade <[EMAIL PROTECTED]> > I would be willing to help with this project. Because of all the different > requirements of this, I would recommend a totally custom set of scripts, > and >

Re: [PHP] Help and Advice needed please.

2008-08-23 Thread sean greenslade
I would be willing to help with this project. Because of all the different requirements of this, I would recommend a totally custom set of scripts, and a mysql database to hold all the data. On Sat, Aug 23, 2008 at 7:22 AM, Byron <[EMAIL PROTECTED]> wrote: > Hey. > > I do some part-time IT work f

Re: [PHP] Restore Leading Zeros in Zip Codes

2008-08-23 Thread tedd
At 11:13 PM +0100 8/22/08, Ashley Sheridan wrote: Not to mention, but of the two major English speaking countries, both America and England have different address standards. All too often an American site seems to think that a postcode is the same thing as a zip code, and then rejects it in a

Re: [PHP] Which Exception to use ....

2008-08-23 Thread Jochem Maas
David Otton schreef: 2008/8/22 Jochem Maas <[EMAIL PROTECTED]>: still leaves the questions as to what a DomainException and a ErrorException is meant to model. A domain exception is thrown when a value is valid according to its type, but not within the domain of the function that it is being

Re: [PHP] Re: Which Exception to use ....

2008-08-23 Thread Jochem Maas
Al schreef: Jochem Maas wrote: here is a list of built in Exception classes, I'd figured I'd start using them, and save on rolling my own: Exception ErrorException DOMException LogicException BadFunctionCallException BadMethodCallException DomainException InvalidArgumentException LengthExcep

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-23 Thread Ólafur Waage
Robert, thanks for the reply but i had tried __FILE__ and __DIR__ (which is dirname(__FILE__)) but it doesnt work. And thanks for the reply also Ashley but as i said in my first post, i had tried $_SERVER with limited results Ólafur Waage 2008/8/23 Robert Cummings <[EMAIL PROTECTED]>: > On Fri,

[PHP] Help and Advice needed please.

2008-08-23 Thread Byron
Hey. I do some part-time IT work for a voluntary paramilitary youth organisation, and we're loooking for a system to digitize the personell files of our members. Here's a features list, all advice on how to implement will be a great help. * Web-accesable via login * Rank, Name, Phone Number, Addr

Re: [PHP] Which Exception to use ....

2008-08-23 Thread David Otton
2008/8/22 Jochem Maas <[EMAIL PROTECTED]>: > still leaves the questions as to what a DomainException and a ErrorException > is meant to model. A domain exception is thrown when a value is valid according to its type, but not within the domain of the function that it is being passed to. For examp