Right, ive got this script. Its recording how many times a button is pressed. Its been bugging me for hours why it wont work but its just figured it out, but the reason it wont work cannot be easily solved!
Ill keep it as simple as possible. I have something like this:
$logFile = 'countLog.log';
$totalCount = (int)file_get_contents($logFile);
$fp = fopen($logFile, 'w');
$totalCount = $totalCount + 1;
<input type="submit" name="button1">
Form has been submitted <?php echo $totalCount; ?> times.
That works. However I have my own form, which is fine, but there is ONE tiny, ESSENTIAL bit that stops it from working..
If I simply rmove that bit it counts fine. But as you can guess, i NEED that line, or the form is useless for anything other
than counting how many times its been clicked! Thats clearly no good.
Any ideas how I can fix this??
So basicaly, if I keep the bit
then the form submits ok but it wont count, but if I remove that line then it will count ok but it wont submit anything anywhere!
Its a bit hard to explain so im not sure if ive made myself clear. But, please help if you can!!