validity check for html code example
Example 1: alert in php
echo '<script>alert("Message")</script>';
Example 2: show alert in php
echo '<script language="javascript">alert("juas");</script>';
Example 3: php sessions
<?php
session_start();
$_SESSION['item_name'] = 'value';
$_SESSION['item_name'] = 0;
$_SESSION['item_name'] = 0.0;
$value = $_SESSION['item_name'];
?>
Example 4: create session in php
<?php
session_start();
$_SESSION["color"]= "blue";
$_SESSION["animal"]= "dog";
echo "The session variable are set up.";
?>