Changing the Submit button - after upload modification

I was provided great help regarding uploading code, through this posting:
Delete the temp file, if it is invalid
Much thanks again.
Now, however, because of this change the ‘Submit’ button currently shows “yes” - see attached ‘yes’ image.
How can I change it to something more appropriate like this - see attached ‘submit’ image.

But ultimately, I’d prefer to put an image over it, or in place of what’s there now. Can I do that by changing this line from the Upload Form?

<input class="upload-video-form-input" type="submit" name="form_submitted" value="yes" />

Or is there more to it? When I replaced the “yes” in that line of code with “Submit”, the Upload Form no longer worked.

Any additional help will be greatly appreciated.

Changing that value attribute will be enough. Shouldn’t mess with anything else.

As far as an image goes, you can set that in the CSS for that input.

If you’re using Drummin’s code from the thread you linked, then yes, it will work with Submit instead of yes - because Drummin’s code only checks to see that there is SOME value in $_POST['form_submitted'], not what the value is.

(Incidentally you almost never should use a submit field as the check for your form data, but thats another matter)

Thanks for your reply.
It that is true that “Drummin’s code only checks to see that there is SOME value in $_POST[‘form_submitted’], not what the value is”, then I would greatly appreciate some help with figuring out why when I change the value “yes” to the value “submit” (and select “submit”) that the next thing I see is a blank page, versus when I don’t change the value to ‘submit’ and select “yes”, the Form proceeds successfully?

I look forward to any assistance. Much thanks.

Changing whatever NAME and VALUE used on the submit input shouldn’t matter if you are still using the hidden field you had, i.e.

<input class="upload-form-input" type="hidden" name="form_submitted" value="yes" />

I would just change the inputs back to what you had.

<input class="button-form3" type="submit" value="Submit >>" name="B3" />
<input class="upload-form-input" type="hidden" name="form_submitted" value="yes" />

As I quote myself

OR your hidden input name if you wish

if (isset($_POST['form_submitted'])):

…so it matches your form

I have no intention of getting into a debate on this matter, but the only time I have ever seen a submit input not available on POST is when the name attribute is missing.

Hmmm, I thought it was an IE < 7 (or whatever version) only thing.

Not that it matters to me, Even if it would work OK now I stopped testing for it long ago and the habit has stuck.

It figures a non-standards-compliant browser issue.
Anyway, a text or hidden input field name can be used in this case. Processing condition needs to be the same as what’s in the form.

Thank you again for your help. Much appreciated

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.