Re: Serving pages based on user input

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux