php - Can't get the javascript to emulate a post -



php - Can't get the javascript to emulate a post -

i have next javascript

function submitform(formid) { document.forms[formid].submit(); } function submitform_with_value(eleid,ipvalue,formid) { var ele = document.getelementbyid(eleid); ele.value = ipvalue; submitform(formid); }

and phone call onchange event so

submitform_with_value("upload","upload","frmupphoto")

the input's id 'upload' form id 'frmupphoto', , expecting value upload in post. works execpt $_post in php null. $_files has file details.

what have in post ?

couple of things here:

your $_files variable beingness populated because have form "enctype" attribute set "multipart/form-data" - used file uploads.

the $_post variable gets populated input field's "name" attribute, not "id".

javascript php post submit

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -