<form method="post" action="$_SERVER['PHP_SELF']>
(form contents here)
</form>
An old way is to use an email in the form's action attribute, but this requires the user to have a mail account/application set up on his or her computer, which isn't very handy. The other way is to use php to either insert/update the data in a database or to return the information in another web page, or both. This can be done by specifying your receiving php file in the form's action tag, for example: <form action="receive.php" method="POST">Insert form elements here</form> However, using php requires that your webserver supports php.
Here's a quick example on how to do it. <?php if(isset($_POST['send'])) { if($_POST['answer'] == 'My Answer') echo 'You got it!'; else echo 'Wrong answer.'; } ?> <form method="post" action="you_file_name_here"> What is the answer to this question? <br> <input type="text" name="answer"> <input type="submit" name="send" value="Check it!"> </form>
Once you submit a form you can use the $_POST[] array to grab the data from a form with PHP. You can then use this data to insert it into a form. Here is an example: <?php if($_POST['submit']){ $text_box_contents = $_POST['comments']; echo ' <select> <option>'.$text_box_contents .'</option> </select>'; }else{ echo ' <form method="post" action="$_SERVER['self']"> <textarea name="comments" cols="40" rows="5"> hostmysite.com Enter your comments here... </textarea><br> <input type="submit" value="Submit" /> </form>'; } ?>
This question is too broad, be more specific.
A form's action attribute in HTML is used to tell the browser where the data collected from the form will be submitted. This collection is usually some kind of backend programming, written in a language like ASP or PHP. The place where the action attribute is pointed towards will process the data, saving it, running a query, or whatever else is supposed to happen to it.
To submit a file, you don't even need a PHP file. The PHP portion is for processing the form results. You just make a button and make sure you defined the action URL.Name: Gender:Boy: Girl:
Create an HTML form with METHOD="post" and ACTION="login2.php". In login2.php check if the entered username and password are correct. You can get the username with $_POST['name_of_username_input']. The same goes for the password.
Build your form in HTML and specify your PHP file in the action of the document. HTML does the form stuff, PHP the processing (although you can - of course - use HTML inside PHP via print() or echo(), too)
An old way is to use an email in the form's action attribute, but this requires the user to have a mail account/application set up on his or her computer, which isn't very handy. The other way is to use php to either insert/update the data in a database or to return the information in another web page, or both. This can be done by specifying your receiving php file in the form's action tag, for example: <form action="receive.php" method="POST">Insert form elements here</form> However, using php requires that your webserver supports php.
PHP is server side producing a webpage that is served to your browser. In order to pass details to a php script you will need to send then via a form. This can be done via a standard form with method="post" or method="get" the variables are read by php as $_GET['var_name'] or $_POST['var_name'] with var_name being the name of the INPUT on the form. If you omit the action (action="page2.php") then the form will post to itself (no matter what you call it) and not specifically page2.php If you want to pass values but not refresh the page then lookup 'ajax'. Its a method of posting forms using javascript which will then wait for the result and deal with the text response. eg. OK or ERROR:email not valid
Here's a quick example on how to do it. <?php if(isset($_POST['send'])) { if($_POST['answer'] == 'My Answer') echo 'You got it!'; else echo 'Wrong answer.'; } ?> <form method="post" action="you_file_name_here"> What is the answer to this question? <br> <input type="text" name="answer"> <input type="submit" name="send" value="Check it!"> </form>
Once you submit a form you can use the $_POST[] array to grab the data from a form with PHP. You can then use this data to insert it into a form. Here is an example: <?php if($_POST['submit']){ $text_box_contents = $_POST['comments']; echo ' <select> <option>'.$text_box_contents .'</option> </select>'; }else{ echo ' <form method="post" action="$_SERVER['self']"> <textarea name="comments" cols="40" rows="5"> hostmysite.com Enter your comments here... </textarea><br> <input type="submit" value="Submit" /> </form>'; } ?>
You could do something like this: pg.1.htm <form method="post" action="pg2.php"> <input type="text" name="txt1" size="20" /> </form> pg2.php <?php $textbox = $_POST['txt1']; ?> <input type="text" name="txt2" size="20" value="<?php echo $textbox; ?>" /> Is that what you were asking for?
using the post command.$_POST['checkboxname'];
This question is too broad, be more specific.
It supports websites made on php but not coding in php. There are workarounds for coding in PHP using Android.
I dont know about widget but using php you can create a form that will then email it to you. I would suggest you try a tutorial on http://www.tutorialized.com under php.