Add serial number
Posted: Tue Jul 31, 2007 11:37 pm
feyd | Please use
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi,
How to add the serial number to txt file as auto increment when the new data is entered.
Is there any any to auto increment the serial numberCode: Select all
<?php
$name=$_POST['name'];
$data="$name";
$fp= fopen("data.txt","a") or die("can't open file");
fwrite($fp, $data);
fclose($fp); }
?>feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]