<o1> function is not working in my code , it doesnot echo in list form in with 123 marks rather it just print in straight line like below
Welcome to my movie review site!
Today is January 20, 2019
My top 5 favourite movies (sorted alphabetically) are:
CaddyshackClose encounters of the third kindLife of BrianMatrixOffice space
it should have printed like this
1.Caddyshack
2.Close encounters of the third
What I have tried:
<?php
session_start();
if ($_SESSION['authuser'] !=1) {
echo "Sorry , but you don\t have permission!";
exit();
}
?>
<title>
<?php
if (isset($_GET['favmovie'])) {
echo ' - ';
echo $_GET['favmovie'];
}
?>
<?php include 'header.php'; ?>
<?php
$favmovies = array('Life of Brian',
'Stripes',
'Office space',
'The holy Grail',
'Matrix',
'Terminator 2',
'Star trek',
'Close encounters of the third kind',
'Sixteen Candles',
'Caddyshack');
if (isset($_GET['favmovies'])) {
echo 'Welcome to our site, ';
echo $_SESSION['username'];
echo '! <br>';
echo 'My favourite movie is ';
echo $_GET['favmovies'];
echo '<br>';
$movierate = 5;
echo 'My movie rating for this movie is: ';
echo $movierate;
} else {
echo 'My top ' . $_POST['num'] . ' favourite movies';
if (isset($_POST['sorted'])){
sort($favmovies);
echo ' (sorted alphabetically) ';
}
echo 'are:<br>';
$numlist = 0;
echo '<ol>';
while ($numlist < $_POST['num']) {
echo $favmovies[$numlist];
echo '</1i>';
$numlist = $numlist + 1;
}
echo '</ol>';
}
?>