help understanding hidden input w/ php


Posted on 16th Feb 2014 07:03 pm by admin

hello i'm doing a tutorial where there are multiple forms for an edit page for a user to update their info... there's a section of the code i dont really understand how it works...here's code:
php:

if ($_POST['parse_var'] == "edit"){

(more php code that executes..)

}

html:

<form action="edit.php" enctype="multipart/form-data" method="post" name="edit" id="edit">
<input name="edit" type="text" class="formFields" id="edit" value="" size="36" maxlength="32" />
<input type="hidden" name="parse_var" value="edit" />
<input type="submit" name="button1" id="button1" value="Submit" />
</form>

i dont understand how the "parse_var" and "edit" correlate? the parse_var is the same on every other form and the "edit" would be something different on another form, what "edit" is it specifically talking about and how are they working with each other here?

No comments posted yet

Your Answer:

Login to answer
233 Like 53 Dislike
Previous forums Next forums
Other forums

Strange array issue, never happened before.
mysql_fetch_array returns 1 array per call. Generally that's why it is inserted into a while statem

Pagination
Okay here is the page in question: http://blenderteachings.000a.biz/tutorials.hamishhill.php

Calender Not Opening
The following code is not loading the javascript calender in another window. It's not doing anything

Word Trimming
Hi Guys & Gals!!

Hope you are all ok....

I need some help with the following

I need desperate help with this php code integrated with flash please
Can someone please help me with this php code which I have been stuck on for weeks . I am trying to

error with opendir
when i do this

if ($handle = opendir($dir)) {
while (false !== ($file = readdir($han

Just a white page
Okay so, my website, when I click SignUp on it it takes me to /join.php but its a complete white pag

Web Application Recipe
Hi Guys!

I am working with the Web Application recipes. I am currently working on the sen

Php If in MySql query (hiding labels if a field is empty)
Okay, I've been trying to do this for a while, and I'm finally going to ask for help so I can get th

Creating Images from images in PHP
Okay well I am trying to make a 'dynamic' calender image with PHP.

I have images like this:

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash