View Full Version : help me

12-02-2005, 09:41 AM
how to make th script to show the number like this for the first time registration.

Number : 1

and then it is submitted, then another person register, then it's show like this

Number : 2

and so on....

Thx... For the help

12-02-2005, 11:35 AM
Simply store it in a database or file.

$newline = "\n"; // Newline symbol for the server. Likely values are "\n" for *nix or "\r\n" for Windows.
$filename = "regcount.dat"; // Name of the file in which to store number of registrants.

// Function to get the number of registrants.
function getNumRegistrants() {
return file_exists($filename) ? implode(file($filename), $newline) + 0 : 0;

// Function to increment the number of registrants.
function incRegistrants() {
$regcount = getNumRegistrants();
$file = fopen($filename, "w");

12-03-2005, 10:31 AM
After that, what shoul i put inside the php tag?
so that it will result like this

Number 1
Name Alfred
School Oxford

and then the second time like this

Number 2
Name Benny
School Oxford

The number "1" "2" "3" and so on i want it to be inside Form tag "<input type="text" name="number">

So it will see the number like this


like that... Thx For your help...

12-04-2005, 07:01 PM
<input type="text" name="number" value="<?php echo(getNumRegistrants()); ?>"/>
I don't know about the rest, that all depends on how you have your registration script set up.