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
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
Simply store it in a database or file.
PHP Code:$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();
$regcount++;
$file = fopen($filename, "w");
fputs($regcount);
fclose($file);
}
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
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
Number
__
|1ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ|
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
like that... Thx For your help...
Last edited by keren2; 12-03-2005 at 10:37 AM.
I don't know about the rest, that all depends on how you have your registration script set up.PHP Code:<input type="text" name="number" value="<?php echo(getNumRegistrants()); ?>"/>
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Bookmarks