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

Get relative path from absolute path
How would one go about getting the relative path to a file from its absolute path?

Google Map
I have done Google Map Integration for one my project. But for that we need the "latitude and l

Somebody hacked into my site and changed coding >>> URGENT HELP NEEDED <<<
I am not that much into programming , but somebody is hacking to my site and injecting some kind of

do while...woes
I'm sure this is childsplay but it is stumping me, everytime i try what I think would make this work

Progress bar tracking file downloads
Hey guys, was wondering if there was a way to track how far a file has been downloaded. I know there

dropdown box help - open php files to textarea
Hi, I am using tinymce to edit content located in several php files. The code I attached works but i

Using cURL to PUT
Can somebody help with the correct php code to make a cURL PUT request. Here is a sample of code bel

Need help adding a timestamp to my filename/variable
Hello,

I'm kind of stupid when it comes to php and I need a tiny bit of help. I've got a f

PHP code for a proxy
I was wondering which function I could use to create an online proxy tool. I was thinking cURL would

Relative path
I have a absolute path to an image - like so: C:/Program Files/Apache Software Foundation/Apache2.2/

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