Multi-part form submission

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
russia5
Forum Newbie
Posts: 12
Joined: Sun May 22, 2005 8:07 pm
Location: California
Contact:

Multi-part form submission

Post by russia5 »

Hello, I have a multi-part form and the PHP handler is on the same page. I also have a duplicate form (different language) in another file. When I submit one or the other, I get duplicate submissions to my MySQL table. I believe there to be one of three problems. a) each form could be submitting within itself, hence the form handler could be submitting as well as the form itself b. The form handler could be double submitting c. The action in the FORM tag below allows for either form handler to process it. Is it not true that the FORM action "?step=<?+($step+1) can be called only by a php program in the same file. Could it be that superglobal variables can be pulled in a different file with this action?


Code: Select all

<form action="?step=<?= ($step+1) ?>" method="post" enctype="multipart/form-data" name="form1"<?php if ($step < 3) echo ' onSubmit="return isValid(this)"'?>>
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

The action can be called by any page.

Superglobals are dependant on each page request, so it's hard to answer your question there without understanding what your definitions are.
Post Reply