php-general Digest 24 Aug 2008 14:05:48 -0000 Issue 5642

Topics (messages 278580 through 278586):

Re: Serving pages based on user input
        278580 by: Prasad Chand
        278581 by: tedd
        278582 by: Robert Cummings
        278583 by: tedd

Re: Quick question regarding getcwd() and directory location.
        278584 by: Ólafur Waage

Re: Help and Advice needed please.
        278585 by: Byron

Adding a single php file to .htaccess.
        278586 by: Dotan Cohen

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---

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:
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). 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 figure how to do this in php. Can you
please give me some pointers.

>Is there any function which takes path and directs the user to that page?

Why use PHP for this?

Standard html with css works quite well for this and is by far more common.

I see no need to bring the php sledgehammer to drive this thumbtack.


Standard HTML and CSS will not do, you'd have to use JavaScript to guarantee it all works correctly on the browser, but this is a bit like using a dozen thumbs for one thumbtack! If you do it entirely on the client-side, then each time a visitor wants any of the "pages", the whole lot is sent to the browser, which is a real bad idea!


I was addressing providing the user with pages and not the drop-down menu thing. If you want to entertain a drop-down menu, please review this:

http://sperling.com/examples/menuh/

That uses html, css, and javascript -- and while I show how to do it, I would not recommend it for anyone.

Besides, there's no way that php can deliver a drop-down menu because the user's action are client-side. I've thought about using php with ajax, but why? It won't work any better.

But, without the drop-down issue, then css and html will deliver pages quite nicely, like this:

http://sperling.com/index.php

My right side navigation is totally css and html. If you don't want right navigation, then there's a lot more possibilities, check out:

http://css.maxdesign.com.au/listamatic/

All of these are designed to provide the end-user with the topic (i.e., page) of their choice -- all without php.

Now, is this something that I'm not getting? Because all of this is pretty obvious to me. Where am I wrong?

Cheers,

tedd


--- End Message ---
--- Begin Message ---
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


Bzzzzttt -- nope -- two different types of "includes".

The link above is discussing having data included the url and not php includes. The advice/code that Jochem gave you was using php includes which is a completely different critter.

I use php includes for all my sites and don't have any problem whatsoever with SEO.

Cheers,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
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 unecessarily. (plenty of info on the web
> about why this is so ... hunt for a 'rant' by the formidable Richard Lynch
> in the archives of this list for instance)

Oh dear, not this BS again. If the content is different then perform a
redirect. Do you really want your login page to be indexed as your
homepage? Lynch's arguments on this were weak.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


--- End Message ---
--- Begin Message ---
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 generate 50 pages dynamically to do it -- try this:

http://webbytedd.com/bbb/map/

That demo is done with just pure css -- no php nor javascript.

Plus each one of those States can be linked to another page -- AND-- it is user friendly, validates, accessible, and SEO friendly. What more could anyone want?

If you don't know php, then I think the best way to ask a question on this list by telling us what you want to do rather than asking specific php questions trying to do something they way you think it might work.

Cheer,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
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 <[EMAIL PROTECTED]>:
> 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 of the server via the browser.
>>
>> Example:
>>
>> http://www.example.com/foo/bar
>> would be
>> /var/www/example.com/foo/bar
>>
>> And Apache's DirectoryIndex feature is opening a index.php file that
>> is located at
>> /var/www/example.com/test/index.php
>>
>> And from that file i need to figure out the full local path of
>> /foo/bar (which would be /var/www/example.com/foo/bar ) or any other
>> directory i browse too.
>>
>> Ólafur Waage
>>
>>
>>
>

--- End Message ---
--- Begin Message ---
Yep, a mysql database seems like the way to go. Thanks to all who have
offered to help on this project. Perhaps we could get together and figure
out what needs doing, assign jobs etc. I have hosting already sorted. Cheers
guys.

On Sun, Aug 24, 2008 at 5:05 AM, sean greenslade <[EMAIL PROTECTED]>wrote:

> 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 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 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, Address, Email Address, Physical Address.
>>> > * Training History
>>> > * Promotion History
>>> > * Miscellanous Notes.
>>> > * Different types of Administrator and notes that can be attached to
>>> > personell files that are seen by different types of administrator.
>>> > * Activity report page. I.e. This activity happenened on this date and
>>> > these
>>> > people attended from this time to this time. Attendance must be visible
>>> on
>>> > personell files.
>>> > * Attendance Register and counter for attendances of members.
>>> > * UI that a 65-year old who believes dialup is fast (the Unit
>>> Commander)
>>> > can
>>> > find his way around.
>>> > * Easily copiable and deployable. As in can be used by more than one
>>> unit.
>>> >
>>> > --
>>> > I'm going out to find myself, if you see me here, keep me here untill I
>>> can
>>> > catch up
>>> >
>>> > If I haven't said so already,
>>> >
>>> > Thanks
>>> > Byron
>>> >
>>>
>>>
>>>
>>> --
>>> Feh.
>>>
>>
>>
>>
>> --
>> Luke Slater
>>
>
>
>
> --
> Feh.
>



-- 
I'm going out to find myself, if you see me here, keep me here untill I can
catch up

If I haven't said so already,

Thanks
Byron

--- End Message ---
--- Begin Message ---
On one particular server, all *.html files are written in Python. I
uploading a few PHP files to the directory, but they must also have
.html extensions (they are replacing files that _were_ python, but it
is rather important that the filename stay the same and I'd rather
avoid rewrite). I figured that it would be easy enough to add a
separate line in .htaccess for each PHP file, but I'm not getting it
for some reason. This is the .htaccess line that lets the system parse
*.html files as Python:
AddHandler cgi-script .html

This is what I'm trying to add to have the system parse specific files as PHP:
AddType application/x-httpd-php filename.html

I know that I am doing something wrong, but I do not know what. Any
ideas? Thanks!

-- 
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il
א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת

ä-ö-ü-ß-Ä-Ö-Ü

--- End Message ---

Reply via email to