How to implement Hidden Feilds in Php


Nupoor Garg

file name:- hidden.html

<html>

<body>

<form action=”show.php”>

country:<select name=”country”>

<option> India</option>

<option> Pakistan</option>

<option> America</option>

</select>

<input type=”hidden” name=”c1″ value=”India”/>

<input type=”hidden” name=”c2″ value=”Pakistan”/>

<input type=”hidden” name=”c3″ value=”America”/>

<input type=”submit”/>

</body>

</html>

 

file name=show.php

 

<?php

$c1=$_GET[“c1”];

$c2=$_GET[“c2”];

$c3=$_GET[“c3”];

$ch=$_GET[“country”];

echo “hi guest”;

echo “available choices are: $c1,$c2,$c3 <br> but country chosen by you is $ch”;

?>

View original post

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s