RE: [PHP] Dynamic Menus in a PHP Form Issue

2010-05-25 Thread Arno Kuhl
-Original Message-
From: Alice Wei [mailto:aj...@alumni.iu.edu] 
Sent: 24 May 2010 04:47 PM
To: php-general@lists.php.net
Subject: [PHP] Dynamic Menus in a PHP Form Issue

Hi,I have a snippet as in the following:   ul
liSelect the type of your starting point of interest:br/
div id=start_menuform action= name=form1 method=post
spaninput type=radio value=Apartment name=start
onclick=alert(document.form1.start)/ Apartment /span
/form/div/li/ulIf 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



RE: [PHP] Dynamic Menus in a PHP Form Issue

2010-05-25 Thread Alice Wei


 From: ak...@telkomsa.net
 To: aj...@alumni.iu.edu; php-general@lists.php.net
 Subject: RE: [PHP] Dynamic Menus in a PHP Form Issue
 Date: Tue, 25 May 2010 08:59:08 +0200
 
 -Original Message-
 From: Alice Wei [mailto:aj...@alumni.iu.edu] 
 Sent: 24 May 2010 04:47 PM
 To: php-general@lists.php.net
 Subject: [PHP] Dynamic Menus in a PHP Form Issue
 
 Hi,I have a snippet as in the following:   ul
 liSelect the type of your starting point of interest:br/
 div id=start_menuform action= name=form1 method=post
 spaninput type=radio value=Apartment name=start
 onclick=alert(document.form1.start)/ Apartment /span
 /form/div/li/ulIf 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

Thanks, guys. I have set now to 2 different requests, and it is doing great 
now. 

Alice
 
  
_
Hotmail is redefining busy with tools for the New Busy. Get more from your 
inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2

Re: [PHP] Dynamic Menus in a PHP Form Issue

2010-05-24 Thread tedd

At 10:46 AM -0400 5/24/10, Alice Wei wrote:
Hi,I have a snippet as in the following:   ul 
liSelect the type of your starting point of interest:br/ 
div id=start_menuform action= name=form1 method=post 
spaninput type=radio value=Apartment name=start 
onclick=alert(document.form1.start)/ Apartment /span 
/form/div/li/ulIf 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


Alice:

I'm not sure as to what it is that you are asking, but php runs on 
the server and is done by time anyone looks at a select control.


If you want a dynamic select, then there are two basic types: 1) 
dynamically generated on the server based upon what the user indicted 
via a previous submit; 2) dynamically generated on the client-side 
based upon what the user indicted via a javascript trigger.


Now, please describe which type you want?

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



Re: [PHP] Dynamic Menus in a PHP Form Issue

2010-05-24 Thread tedd

At 11:38 AM -0400 5/24/10, tedd wrote:

At 10:46 AM -0400 5/24/10, Alice Wei wrote:
Hi,I have a snippet as in the following:   ul 
liSelect the type of your starting point of interest:br/ div 
id=start_menuform action= name=form1 method=post 
spaninput type=radio value=Apartment name=start 
onclick=alert(document.form1.start)/ Apartment /span 
/form/div/li/ulIf 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


Alice:

I'm not sure as to what it is that you are asking, but php runs on 
the server and is done by time anyone looks at a select control.


If you want a dynamic select, then there are two basic types: 1) 
dynamically generated on the server based upon what the user 
indicted via a previous submit; 2) dynamically generated on the 
client-side based upon what the user indicted via a javascript 
trigger.


Now, please describe which type you want?

Cheers,

tedd
--



Re the above, I meant indicated and not indicted -- sorry.

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