javascript - Passing POST Data to PHP via JS fails -


first time i've added huge, mixing js, php, 3 , lot of other stuff. i've tried.

when clicks on three.js scene onto human body, selects parts of human body , javascript adds want save selected things database using php / mysql.

the three.js scene works, can select / unselect things , generated dynamic html output works to. example form generated this:

<canvas width="1680" height="949"></canvas> <div id="description">will added database:</div> <form id="bodyparts" method="post" action="index.php?s=cinput">     <input type="checkbox" id="leg_right" name="leg_right" disabled="" value="leg_right">     <div id="leg_right_description">rechtes bein</div>     <input type="checkbox" id="leg_left" name="leg_left" disabled="" value="leg_left">     <div id="leg_left_description">linkes bein</div>     <input type="checkbox" id="torso_top" name="torso_top" disabled="" value="torso_top">     <div id="torso_top_description">obertorso</div>     <input type="submit" value="speichern" id="submit"> </form> 

so, after clicking onto submit button using var_dump($_post); on receiving cinput.php file. gives out empty array. when trying reload site chrome tells me data has been sent , need verify again. know mean. how heck generated html form above not work , not send post data can use in php?

you've got disabled attribute in of input fields. mere presence of attribute, if value empty ("") causes field disabled. disabled fields not submitted rest of form. since entire form has nothing disabled inputs, submit nothing @ all.

e.g.

<input type="text" value="foo" disabled="" /> <input type="text" value="bar" disabled="false" /> <input type="text" value="baz" disabled="disabled" /> 

all 3 of these inputs disabled, though "human" logic, you'd expect last 1 disabled.

your submit button not disabled, since there's no name attribute, doesn't submit form.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -