Write two different PHP script to demonstrate passing variables through a URL and Write two different PHP script to demonstrate passing variables through Hidden Variables || DWPD Sem 5 Practical 17
Write two different PHP script to demonstrate passing variables through a URL
DWPD : Practical 17-B
Write two different PHP script to demonstrate passing variables through Hidden Variables
<?php
$fname="Sarjil";
$lname="Shaikh";
?>
<a href="retrive.php?First_name=<?php echo $fname; ?>&last_name=<?php echo $lname; ?>">
Click here to Pass Variable through URL
</a>
Output :
<?php
echo "First Name : ".$_GET['First_name']."<br>";
echo "Last Name : ".$_GET['last_name'];
?>
Output :
DWPD : Practical 17-B
Write two different PHP script to demonstrate passing variables through Hidden Variables
<html>
<head>
<title>Hidden Variables</title>
</head>
<body>
<form method="post" action="retrivehidden.php">
<input type="hidden" name="fname" value="Sarjil">
<input type="hidden" name="lname" value="Sarjil">
<input type="submit" name="submit" value="submit">
</form>
</body>
</html>
Output :
<?php
if(isset($_POST['submit']))
{
$fn=$_POST['fname'];
$ln=$_POST['lname'];
echo "First name = $fn <br>";
echo "last name = $ln";
}
?>
This comment has been removed by a blog administrator.
ReplyDeleteBHaiya bacha liya apne late submission se
ReplyDeleteyou welcome bro :p
DeleteThis comment has been removed by a blog administrator.
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeleteMost welcome bro
ReplyDeleteShare this with your friends 😊
If you have any questions please feel free to ask me at : hardhebro@gmail.com
I will post it's solution in my next blog 💯🔥
Thank you brother !!
ReplyDeleteyou welcome bro :p share with your classmates
Deleteyou welcome bro :p share with your classmates
Deletefrom gandhy college?
ReplyDeleteLast year submission kal he or aaj apki website se mene sare baki ke practical khatam kiye, thank you bro 🤩
ReplyDelete