Welcome to Dream.In.Code
Getting PHP Help is Easy!

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




HTML Drop-Down

 
Reply to this topicStart new topic

HTML Drop-Down, Linking Drop-Down to Load PHP

liquidwayweb
post 12 Apr, 2005 - 09:40 PM
Post #1


New D.I.C Head

*
Joined: 23 Feb, 2005
Posts: 10

The problem with the below code is that once I write foo.php, the echo (that I want displayed in second code) is displayed within the drop-down menu.
DROP DOWN MENU CODE:
CODE
<select name="biz" size="1">
<option value="<? @include('includes/foo.php'); ?>">foo</option>

DISPLAY PHP CODE:
CODE
<?php echo $_POST['biz']; ?>

I had made an attempt to add a pop-up 'onClick' Javascript code within the php code...if there are any possible codes to assist me with this, please let me know...

Thanks
User is offlineProfile CardPM

Go to the top of the page

Amadeus
post 13 Apr, 2005 - 05:16 AM
Post #2


g++ -o drink whiskey.cpp

Group Icon
Joined: 12 Jul, 2002
Posts: 12,173



Thanked 33 times

Dream Kudos: 25
My Contributions


What it is that you want to appear in the drop down?
User is offlineProfile CardPM

Go to the top of the page

snoj
post 13 Apr, 2005 - 06:13 AM
Post #3


$Null

Group Icon
Joined: 31 Mar, 2003
Posts: 3,304



Thanked 5 times

Dream Kudos: 700
My Contributions


PHP is server side, so foo.php has executing and stuff before it even goes to the client.

Are you wanting foo.php to execute when the user selects 'foo' from the list?
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/22/08 01:19PM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month