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

Download Image from URL and Upload it
Ok, I have been googling for the last 1/2 hour trying to figure this out, Most likely I'm just not s

Adding to an Int row in db
Hi, i have a database which houses all of the users of my site. One of the columns is for points whi

mail()
Hi all. I have a problem with emails. I am trying to set up a mail system where customers can subscr

Add "width" check when upload
Hi!

Can someone add a function that is checking if picture witdh is bigger then 800px whwn up

ldap connection
We are using ldap to get user information from the domain controller. It was working before. Recentl

puting for loop in 1 value
hi ,

how do i put this code in 1 value:
Code: <?php
for ($i=1; $i<=5; $i

MS are the best!!!
Visit http://www.microsoft.com/australia/windows/default.aspx?h=watch-a-demo and click the massive '

DataTable Help Required
Hi all I am creating an app that utilises and MS Access back end and queries it quite a bit at vario

Help building / using array
First - this is a cross-posting, if this is wrong I apologise! What started out as a MySQL query que

Seperate team from score
I am writing a site that does a NFL Pick 'em type application and I have a feed that gives me the sc

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