Phonebook in php without using MySQL
<p> I just wanted to create a simple phonebook using php...I used the following code....but one entry overwrites another plz help...I want to do this without using MySQL</p> 

<pre><code>&lt;?php

session_start();
if(isset($_SESSION['views']))
{
    $_SESSION['views']=$_SESSION['views']+1;
    }
    else
    {
        $_SESSION['views']=1;

    }

?&gt;

&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;

&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
&lt;title&gt;Phonebook&lt;/title&gt;
&lt;/head&gt;

&lt;body&gt;


&lt;form action="index1.php" method="post" style="border:thin"&gt;
Name: &lt;input type="text" name="varname" style="border:dotted" /&gt;
&lt;br/&gt;
Roll Number:&lt;input type="text" name="varroll" style="border:dotted" /&gt;
&lt;br /&gt;
Phone Number: &lt;input type="text" name="varno" style="border:dotted" /&gt;
&lt;br/&gt;
&lt;input type="submit" name="submit" value="Register" /&gt;&lt;br/&gt;
&lt;/form&gt;
&lt;?php


$test1[$_SESSION['views']]=$_POST['varname'];
$test2[$_SESSION['views']]=$_POST['varroll'];
$test3[$_SESSION['views']]=$_POST['varno'];
for($j=1;$j&lt;=$_SESSION['views'];$j++)
{

echo $test1[$j]."&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;".$test2[$j]."&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;".$test3[$j];}
echo "&lt;br/&gt;";
echo "No. of page views=".$_SESSION['views'];
?&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
