RE: Dynamic Menus in a PHP Form Issue

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

 



-----Original Message-----
From: Alice Wei [mailto:ajwei@xxxxxxxxxxxxx] 
Sent: 24 May 2010 04:47 PM
To: php-general@xxxxxxxxxxxxx
Subject:  Dynamic Menus in a PHP Form Issue

Hi,    I have a snippet as in the following:                   <ul>
<li>Select the type of your starting point of interest:<br/>
<div id="start_menu"><form action="" name="form1" method="post">
<span><input type="radio" value="Apartment" name="start"
onclick="alert(document.form1.start)"/> Apartment </span>
</form></div></li>            </ul>If I tried to put this at the top of a
file where I save as PHP with other PHP execution statements, looks like the
form does not do anything, and yet when I save the page as in HTML with out
the other PHP execution, it works. I am trying to create a page where I have
dynamic drop down menu lists so users can egenerate dynamic content based on
their preference. Is it possible that I can save the entire file as a PHP
and still keep the functionality, including generating dynamic menus,
writing the proper entries to the database and printing out the proper
output?

Thanks for your help. 

Alice 		 	   		  
_________________________________________________________________

The reason it works in html is because it is "executed" in the browser. If
you want this html to get to the browser you must either echo it to the
output buffer that is sent to the browser, or end your php section with "?>"
so that these lines are interpreted as part of the output that is sent to
the browser.

If your php script is running without error then I presume you're already
doing this. If that's the case then maybe it's not being put into the output
buffer the way you're expecting (e.g. maybe the quotes don't match). You can
look at the source code in the browser and compare it against the working
html code to see where the difference is.

Cheers
Arno



-- 
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