473,414 Members | 1,674 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Form values in HTML not retaining.

Hi All,

I am calling a cgi file from a perl module. The cgi file contains the
HTML form and some HTML fields(like check boxes).
In my logic, I am trying to submit the form and calling the same cgi
file again.

While doing this, i am not able to retain the values of the HTML
fields (check boxes values ) which i set earlier before submitting
the form.

But my application requires me to use the same values of check
boxes( prior to submission) for further processing after submission of
the form.

But here all those prior values of check boxes are changing to NULL
after submission of the form, thereby NOT allowing me to proceed
further.

Please help me out in this regard.

I am not sure if this is exactly a PHP related question but i could
not find any sources in and around me to solve this problem so i had
to post it here.
If this post is not relevant to this group, please guide me to
appropriate group where i can find a solution to this problem.

Thanks and Regards,
Anusha Vempati.
Sep 5 '08 #1
2 1861
Message-ID:
<ed**********************************@e39g2000hsf. googlegroups.comfrom
an*************@gmail.com contained the following:
>I am calling a cgi file from a perl module. The cgi file contains the
HTML form and some HTML fields(like check boxes).
In my logic, I am trying to submit the form and calling the same cgi
file again.

While doing this, i am not able to retain the values of the HTML
fields (check boxes values ) which i set earlier before submitting
the form.

But my application requires me to use the same values of check
boxes( prior to submission) for further processing after submission of
the form.
Yes, HTML is a stateless protocol. If you want the values to be
maintained you need to pass them back into the HTML. In php this could
be achieved by something like this:-

<input type = 'checkbox' name='box1' value='yes' <?php echo
(isset($_POST['box1'])&&$_POST['box1']=="Yes")?"checked": ""; ?>>

Check out comp.lang.perl.misc for advice on how to do it in perl.
--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011
http://slipperyhill.co.uk - http://4theweb.co.uk
Sep 5 '08 #2
In our last episode,
<ed**********************************@e39g2000hsf. googlegroups.com>,
the lovely and talented an*************@gmail.com
broadcast on comp.lang.php:
Hi All,
I am calling a cgi file from a perl module. The cgi file contains the
HTML form and some HTML fields(like check boxes).
In my logic, I am trying to submit the form and calling the same cgi
file again.
This is not a php question. It is a perl or cgi question. There are groups
for both.
While doing this, i am not able to retain the values of the HTML
fields (check boxes values ) which i set earlier before submitting
the form.
It is not clear what your problem is.

You do know that your perl cgi will not 'remember' values from a previous
invocation, don't you? If you will need values again, pass them to the
next invocation as hidden inputs.

If you are trying to parse the query string yourself, it is possible you are
going wrong somewhere. There is a perl module to simplify this.

--
Lars Eighner <http://larseighner.com/us****@larseighner.com
Fast, Cheap, Good: Choose any two.
Sep 5 '08 #3

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

Similar topics

1
by: cgplays.com | last post by:
I have a select-pulldown at http://computergroupplays.com/fb-pres2.asp that changes the 3rd pulldown (Dbase) depending on what the user enters in the 2nd (Wk). My associate wants the values inside...
21
by: AnnMarie | last post by:
<script language="JavaScript" type="text/javascript"> <!-- function validate(theForm) { var validity = true; // assume valid if(frmComments.name.value=='' && validity == true) { alert('Your...
19
by: jeff | last post by:
how do you convert form byte to Int32 while retaining the binary value of the byte array
2
by: cFleury | last post by:
This system works in a intranet w/ some 200 stations and this particular form is retaining its values among different stations...like if I enter some values in the form on station 1 walk to station...
7
by: cFleury | last post by:
I have an ASP.NET web form that is retaining values over different stations on the network, how can I stop this behavior ?. I didn’t do anything special to cause it. Thanks C.Fleury
3
by: desh | last post by:
hello How to retain the values in form tag ,in case user enter wrong information.
9
by: Steve Poe | last post by:
Configuration: PHP 4.3.9 Apache 2.0.52 Hello PHP group, I am a novice to PHP. I have searched through the newsgroup on my issue but I am not sure I know what I am missing.
12
by: liamo | last post by:
Don't laugh lol I know your all php guru's : ) Ok, so I have little if any knowledge with the programming language php - only having created small enquiry forms. Now I have a client that needs a...
5
by: Bels | last post by:
I am currently designing a real estate website using Dreamweaver CS3, php, MySQL on a Mac. On it is a 'property search' form that queries the property database. The form consists of 5 dropdown lists....
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.