Count Lines RSVP

Thank You very much for your help in advance.

I have a small RSVP list in a text File.
Would like to count the no of guest in the Confirmed Area,
Waiting
May
Unable.

<?php $file = "RSVP.txt"; $lines = count(file($file)); echo "There are $lines lines. "; ?>

Was thinking to put them as Paragraphs and then count the lines in a Paragraph.

This gives me the total no of Guest.
But text file reads

! Confirmed 35
A
B
C
Unable 16
x
y
z
Waiting Rsvp 137

John
WIll
David
Z list have not yet sent the invite
z Daisy

[php]<?
$myFile = “RSVP.txt”;
$lines = file($myFile);//file in to an array
echo $lines[0];
echo ‘
’;
echo $lines[4];
echo ‘
’;
echo $lines[8];
echo ‘
’;
?>[/php]
and make those lines in a text file called RSVP.txt
you can try this is if it works for how you want it

but how is the info getting to the text file

It is a RSVP php.
here is DEMO link. yeshman.com/rsvp
I need to get the count of the confirmed, Waiting, May Be and No.
Thank You
I am new to this site and php, Sorry if there is some info not valid or good.
I am not trying to promote any thing on this site.
Thank You

Thank You have updated the info,
But it is not what I had in mind.
May be demo link might be of some help.
Thank You

With doing this, every time the list changes need to go back into the scrip and retype the no of the line.
Sorry to keep posting.
Thank You for your help once again.
Best Regards

ok that is a long list that has checkboxes what are you really wanting

and how are you getting your confirmed waiting etc

does it need to be checkboxes or dropdowns let me know i can help

Thank you very much for your kind help.
It can be check box or drop box.
It is a personal party rsvp list
As of mow a few of us hosting the party update the list and when there is a reply on the RSVP we will update it.
So till the sort part every thing working well.
It is now the counting of the lines in each category needed to be done.
I can send you the 3 files that are used on the site.
Thank You
Skybux.

Now I have to count and change the numbers on the RSVP.txt and the index file.

yes make a zip file and i will check em out pm me with the link to the zip file

Sponsor our Newsletter | Privacy Policy | Terms of Service