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

gmdate() - want 1 hr before time
Hi,
I am using php gmdate().
Now I am entering all dates in my dbase using gmdate("Y-m-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

question about stripslashes and real_escape_string
im cleaning up an old app that I wrote fixing some of the vulernabilities from attacks.

I hav

Captcha problem users just refresh and it will let them auto submit again
Users will just re submit and not have to enter the new captcha.. ? Lol but if i refresh the page, t

How to ask a regex question?
Hi, I thought I'd share some of my insight after seeing too many bad questions that either get ignor

Product categories for registration
Dear all,

We are going live with the Supplier registered next week. At standard, the 'sel

help with insert
Hi there,

I am trying to insert some data into a database, but for some reason, it is not ins

On page view, minus credit
Hello all, please, I need a little help with this script. I am charging one credit (credits can be p

PHP Upload issue
Hi guys,

I have stumble across an interesting issue with my script and is doing my head in.

Syntax Help
Code:


im having trouble with that code snipped
Parse error: syntax error, unexpec

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