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

Contact Form Not Working When I Add Validation Codes
So I built my first working PHP "Contact Us" like form. But, I have been trying to now mak

Return X values where an ID number doesnt matter
Well as for subject heading, thats the best i could think of.

Currently im having a problem w

Files in current folder. Should be an easy fix.
Never mind. I've asked about this before and just found my answer. Anyway to delete this?

Header is not working in IE
Hi ! header function is not working in IE but it works in FF, Safari, Chrome. any help please. :

PHP mail() with images
I'm trying to get images to send along with my HTML e-mail sent through PHP mail(). I only tried vie

send message to the java application
Oracle 10g with Windows platform.

I have a java application that periodically pings the d

Help If user voted, block them
On my Prayer request site, i let users Click a button to Pray for somone that has posted a pray, i g

Keep newlines from textarea?..
I'm creating a simple encoding program, and what I want it to do is retain the newlines, as echoing

Problem displaying "scraped" XML data
I'm basicly having trouble displaying XML data scraped from an URL using cURL.

What the code

a function to check directory depth
I'm working on a php script to upload files in to a set directory.
the user can select to upload

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