php - how to save my unput's text in the same form -
I have a form with some input text
I use all the inputs for the text
, but I do not know how to do this ...
I tried the following:
$ VarEmp = myForm.MyTextbox.text;
but it does not work ...
I do not want to send my data to another form , just save it after I do not want to send it to any other php file
I have:
& lt; Form name = "F1" method = "post" id = "contact form" class = "smart-form" & gt; .... & lt; Input type = "text" name = "empresa" id = "empresa" "value =" "/> ... & lt; / form & gt; // code and more code & php function actil ( ) $ $ Nomempresa = f1.empresa.gettext ();}? & Gt;
but it does not work ...
< Div class = "post-text" itemprop = "text">
& lt; form name = "f1" method = "post" id = "contact-form" class = "smart-form" Gt; ... & lt; input type = "text" name = "empresa" id = "empresa" "value =" "/> & Lt; Button type = "submit" class = "btn btn-success" name = "actyl" & gt; Actualizer & lt; / Button & gt; ...
& lt ;? Php if ("post" == $ _ server ['REQUEST_METHOD']) {if (isset ($ _ post ['ACTIL'] and isset ($ _ post ['Empresa'])) {$ nomempresa = $ _POST [ 'Empresa'];}}
It should work in your a submit button was actually used, after that I check I if the exact button was used and if the field is not empty, then I put the contents of the input code in the variable $ nomempresa
Hope that works for you.
Comments
Post a Comment