javascript
Brief description  about Online courses   join in Online courses
View nishant  gaurav 's Profile

php session

please tell me wats wrong with my coding for 1st problem given
ses1.php
<?php
session_start();
$_SESSION['ITEM1']="dell";
$_SESSION['ITEM2']="nikon";
$_SESSION['ITEM3']="transcend";
?>
<html>
<body>
<h1> welcome to the shopping socket</h1>
<li>
<ol>dell laptops</ol>
<ol>hcl laptops</ol>
<ol>dell desktops</ol>
<ol>cannon cameras</ol>
<ol>transcend pendrives</ol>
</li>
<form name="demo" action="ses2.php" method="post">
select first item:<select name="laptops">
<option selected>laptops</option>
<option>dell</option>
<option>sony</option>
<option>hcl</option>
<option>hp</option>
</select><br/><br/>
select second item:<select name="cameras">
<option selected>cameras</option>
<option>nikon</option>
<option>sony</option>
<option>cannon</option>
<option>kodak</option>
</select><br/><br/>
select third item:<select name="pendrives">
<option selected>pendrives</option>
<option>sandisk</option>
<option>sony</option>
<option>transcend</option>
<option>hp</option>
</select><br/><br/>
<input type="submit"/>
</form>
</body>
</html



ses2.php

<?php
echo "item no1=".$_SESSION['item1'];
echo "item no2=".$_SESSION['item2'];
echo "item no3=".$_SESSION['item3'];
?>
<html>
<body>
</body>
</html>
please help me out.
Asked by nishant gaurav | Oct 24, 2010 |  Reply now
Replies (1)
View teacher siliconindia 's Profile
which error you getting this code?. Can you send that error
Apr 13, 2011