how can i display this in the webpage

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
ahmad1
Forum Newbie
Posts: 1
Joined: Mon Apr 20, 2009 12:57 am

how can i display this in the webpage

Post by ahmad1 »

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);
?>
Post Reply