Hi… welcome in my page at “We Are Knowledge”…
In here you want got many knowledge like “PHP”.. Yes… I want
giving you knowledge about it with discuss “FORM RADIO IN PHP”.
Previous I was write article form about text and submit…
Maybe you do not know form in PHP,,, And this is FORM IN PHP
:
- Submit
- Text
- Radio
- Check list
- Password
- Select
Ok direct to example… let’s do reading my article… have fun
man…
Form type in PHP is form where we can only choice one option….
Example 1 :
you can copy this coding..
<html>
<head> We Are Knowledge <br> <br>
<title> FORM IN PHP </title>
</head>
<body>
<p align = center>please choice your hardware
<br><br>
<form method = "POST" action =
"wak.php">
<table border = "2" cellspacing = "1"
cellpadding = "1" align = "center">
<tr>
<td>
<input type = radio name = "say" value =
"PC COMPUTER">PC computer
<input type = radio name = "say" value =
"NOTEBOOK">Notebook
<input type = radio name = "say" value =
"LAPTOP">Laptop
<td>
</tr>
</table>
<p align = center>please choice your transport
<br><br>
<table border = "2" cellspacing = "1"
cellpadding = "1" align = "center">
<tr>
<td>
<input type = radio name = "say3" value =
"PLANE">PC computer
<input type = radio name = "say3" value =
"BUS">Bus
<input type = radio name = "say3" value =
"TRAIN">Train
<input type = radio name = "say3" value =
"SHIP">Ship
<td>
</tr>
</table>
<br> <br>
<input type = submit value ="SEND" name =
"say2">
</body>
</html>
Next.. paste in your notepad with save as type = “HTML>
And making file.php
You can copy this coding
<?php
echo "You choice hardware is : ", $_POST[say]."<br>";
echo "You choice transport is : ", $_POST[say3];
?>
Paste in your notepad..
DON’T forget save as type = “PHP” and giving name “wak.php>
And result is :
We Are Knowledge
please choice your hardware
PC
computer Notebook Laptop
|
please choice your transport
PC
computer Bus Train Ship
|
And if you
choice notebook
and train..
The result is :
You
choice hardware is : NOTEBOOK
You choice transport is : TRAIN
You choice transport is : TRAIN
Ok..
just it… I hope you understand with this tutorial…
Thanks
for all…
See
you later
No comments:
Post a Comment