473,466 Members | 1,395 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

a question about syntax

Is it ok for me to name the form and the radiobutton and the
function the same name or will that cause problems now or further down
the road?

Feb 23 '07 #1
2 1105
plemon wrote:
Is it ok for me to name the form and the radiobutton and the
function the same name or will that cause problems now or further down
the road?
Nope.
The name of your form is not important (from PHP's point of view, but it
matters of course if you use JavaScript).

Since you can only submit 1 form at a time, PHP receives only 1 form, which
you retrieve via $_POST[].

How your radiobutton is named is not important as long as you know it.

And functionnames declared in PHP couldn't care less about the names that
populate your $_POST.

So as far as I can tell, go with it, but make sure you don't confuse
yourself with all these same names. :-)

Happy coding!

Regards,
Erwin Moller

On a sidenote: I wonder if the name of the form is send to PHP at all? Does
anybody know how to retrieve that?
Feb 23 '07 #2
On Fri, 23 Feb 2007 17:45:51 +0100, Erwin Moller
<si******************************************@spam yourself.comwrote:
>
On a sidenote: I wonder if the name of the form is send to PHP at all?
Does
anybody know how to retrieve that?
No, only inputs, buttons and textareas are sent to the handling script.
Which means that if you want to know the name of the form, you need to add
it as an input. One solution for this is to change the name of the submit
button so that it contains the form name. The submit button is sent when
it's clicked or otherwise activated, and as it is an input, it is received
by the handling script. You can retrieve it by testing for it using a
switch(), or you can use the entire $_POST as an associative array.

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Feb 25 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

220
by: Brandon J. Van Every | last post by:
What's better about Ruby than Python? I'm sure there's something. What is it? This is not a troll. I'm language shopping and I want people's answers. I don't know beans about Ruby or have...
54
by: Brandon J. Van Every | last post by:
I'm realizing I didn't frame my question well. What's ***TOTALLY COMPELLING*** about Ruby over Python? What makes you jump up in your chair and scream "Wow! Ruby has *that*? That is SO...
28
by: David MacQuigg | last post by:
I'm concerned that with all the focus on obj$func binding, &closures, and other not-so-pretty details of Prothon, that we are missing what is really good - the simplification of classes. There are...
45
by: Edward K. Ream | last post by:
Hello all, First of all, my present state of mind re pep 318 is one of sheepish confusion. I suspect pep 318 will not affect Leo significantly, but I am most surprised that an apparently...
9
by: Hasani \(remove nospam from address\) | last post by:
I was reading a ppt ( http://www.gotdotnet.com/team/pdc/4064/tls310.ppt ) and came aross this statement. "Users can leverage a destructor. The C++ compiler generates all the Dispose code...
2
by: david | last post by:
Anyone could give me a hand about this syntax error? Thank you. David Source Code: Dim conn As New SqlConnection(strConn) Dim daAngio As New SqlDataAdapter(strSelectStatement, conn) 'Create a...
75
by: Steven T. Hatton | last post by:
No, this is not a troll, and I am not promoting Java, C-flat, D, APL, Bash, Mathematica, SML, or LISP. A college teacher recently posted to this newsgroup regarding her observation that there has...
5
by: Scott | last post by:
I'm sorry if most of my question's seem "petty", but as I've said before, I need to know the petty just because I need to know. This question is more along the lines of just having you guys...
2
by: piuck | last post by:
I download IBM Synthetic Datat for Association rules(from http://www.almaden.ibm.com/cs/projects/iis/hdb/Projects/data_mining/datasets/syndata.html ), After I compiler it, it found a lot of bug......
37
by: Hilton | last post by:
Hi, for (int i = 0; i < list.Count; i++) has a hidden performance hit; i.e. list.Count gets evaluated each time, so we write something like: int listCount = list.Count; for (int i = 0; i <...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.