I am very new to PHP i have made the following code. How can display it to the webage that i should be able to enter the information for many people.
any help would be appreciated
<?php
$file_name = "myfile.txt";
if(file_exists($file_name))
{
//open file for writng and place pointer at the end
$handle = fopen($file_name, 'w');
if(!$handle)
{
die("couldn't open file <i>$file_name</i>");
}
$str.= "Id number: 001\r\n";
$str.= "Title: Widthrawal\r\n";
$str.= "Last Name: Steve\r\n";
$str.= "Address Line: Karte Seh\r\n";
$str.= "City: somewhere\r\n";
$str.= "Province: Somewhere\r\n";
$str.= "Country: Afghanistan\r\n";
$str.= "Telephone: 00937970000\r\n";
$str.= "Date of birth: 22-04-84\r\n";
$str.= "Account number: 111098092\r\n";
$str.= "Account Balance: 1000\r\n";
$str.= "Over Draft: 1123\r\n";
fwrite($handle, $str);
echo "success writing to file";
}
else
{
echo "file <i>$file_name</i> doesn't exists";
}
fclose($handle);
?>
how can i display this in the webpage
Moderator: General Moderators