homepage Welcome to WebmasterWorld Guest from 54.167.138.53
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Dynamic links opening up to forms
mini

5+ Year Member



 
Msg#: 3666552 posted 11:05 am on Jun 4, 2008 (gmt 0)

Hello

I have a page,let us say, http://www.example.com/movie.asp and there are few links on the right side of the page. A few examples of the urls visible when I put the cursor on the links:

http://www.example.com/movie.asp?id=1
http://www.example.com/movie.asp?id=2
http://www.example.com/movie.asp?id=3

Lets say there are 20 such links arranged as a list.

Now, I want a few links to open up to another form(combo boxes, or a set of radio buttons, depending upon the link selected)which accepts user input.

For example, the first two, that is , http://www.example.com/movie.asp?id=1 and http://www.example.com/movie.asp?id=2 opens up to a quiz (page has a set of radio buttons). And the third one, http://www.example.com/movie.asp?id=3 opens up to a page having a combo box.

I cannot find out how to show these form elements dynamically. Can anyone please suggest something?

[edited by: dreamcatcher at 4:45 pm (utc) on June 4, 2008]
[edit reason] use example.com. Thanks. [/edit]

 

henry0

WebmasterWorld Senior Member henry0 us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3666552 posted 12:02 pm on Jun 4, 2008 (gmt 0)

Shouldn't this post be posted in ASP?

mini

5+ Year Member



 
Msg#: 3666552 posted 2:38 pm on Jun 4, 2008 (gmt 0)

Oh! I was just studying another site built in ASP and using it as a reference. And while posting this topic, I used the .asp extension by mistake. Apologies for that.

Actually I am working in PHP and I would like to know how to do this in PHP, though it seems to me that its more about logic than the syntax.

So these links would be:

http://www.example.com/movie.php?id=1
http://www.example.com/movie.php?id=2
http://www.example.com/movie.php?id=3

Thanks..

[edited by: dreamcatcher at 4:45 pm (utc) on June 4, 2008]
[edit reason] use example.com. Thanks. [/edit]

henry0

WebmasterWorld Senior Member henry0 us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3666552 posted 3:15 pm on Jun 4, 2008 (gmt 0)

http://www.example.com/movie.php?form_id=1
http://www.example.com/movie.php?form_id=2
http://www.example.com/movie.php?form_id=3

You could have three landing pages:
movie1.php, movie2.php etc...
OR
Only movie.php
and use a switch [us2.php.net]
to determine which form serving

The landing page will be reading the passed value as $_GET (super global) [us2.php.net] $_GET [w3schools.com]

Hope this may start you

[edited by: dreamcatcher at 4:46 pm (utc) on June 4, 2008]
[edit reason] use example.com. Thanks. [/edit]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved