note 106951 deleted from language.oop5.basic by tularis
| From: | tularis@php.net | Date: | Thu, 22 Dec 2011 20:38:24 +0000 |
| Subject: | note 106951 deleted from language.oop5.basic by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-185218@lists.php.net to get a copy of this message | ||
Note Submitter: someone
Reason: useless
----
Using PHP session's to to print the submited values in the same page;
<?php session_start() ?>
<html>
<head>
<title>
Session
</title>
</head>
<body>
<form method="POST" action="<?php echo $_ESRVER['PHP_SELF']
?>"><br/>
Nume:<input type="text" name="nume"/><br/>
Cantitatea:<input type="text" name="cant"/><br/>
Pret:<input type="text" name="pret"/><br/>
<input type="submit" value="Trimite"/>
</form>
<?php
if(isset($_POST['nume'])&& isset($_POST['cant'])&&
isset($_POST['pret']))
{
$_SESSION['nume']=$_POST['nume'];
$_SESSION['cant']=$_POST['cant'];
$_SESSION['pret']=$_POST['pret'];
echo "<br/> Numele dat a fost:".$_SESSION['nume'];
echo "<br/> Cantitatea data a fost:".$_SESSION['cant'];
echo "<br/> Pretul dat a fost:".$_SESSION['pret'];
}
?>
<br/>
</body>
</html>