Jump to Navigation

003 - GET and POST

* $_POST
You can only use this in HTML form. This method takes the data from the form field and sends it through an HTTP header. The data cannot be seen in the URL(For much data, a lot of values.).

* $_GET
This method gets the data from the form fields, encodes it, and adds it to the destination URL (For one value).

<form action="example1.php" method="post">
<input type="text" name="Name">
<select name="Word">
<option value="Hello">Hello</option>
<option value="Hola">Hola</option>
<option value="Bonjour">Bonjour</option>
</select>

------------------------------------------------

$name = $_POST['Name'];

 



Main menu 2

Story | by Dr. Radut