HELP! submit button counter

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 1
Joined: Sun Mar 03, 2013 7:38 am

HELP! submit button counter

Postby tomer10 » Sun Mar 03, 2013 7:51 am

hey everybody
I've been looking for a code for my script that can really help me
i'm no php pro
i built a site with a e-mail form , i want to make a counter that count
the amount that people sent a mail (clicked submit)
i guess that if the value will be saved to a text file on the server it will be good enough!
this is my php code:

if (isset($_REQUEST['email']))
//if "email" is filled out, send email
//send email
$email = $_REQUEST['email'] ;
$subject = $_REQUEST['subject'] ;
$message = $_REQUEST['message'] ;
mail("", $subject,
$message, "From:" . $email);
header("Location: wish3.html?page=home");
//if "email" is not filled out, display the form
echo "<form method='post' action='wish2.php'>
Email: <input name='email' type='text'><br>
Subject: <input name='subject' type='text'><br>
<textarea name='message' rows='15' cols='40'>
<input type='submit'>

<form method="post" action="write.php">
<input class="input" type="text" name="norobot" />
<img src="captcha.php" />
<input type="submit" value="Submit" />

and i want to add in another place in the site the value of the counter
any1 know how to do it ?

php-forum Fan User
php-forum Fan User
Posts: 973
Joined: Mon Oct 01, 2012 12:32 pm

Re: HELP! submit button counter

Postby seandisanti » Mon Mar 04, 2013 10:30 am

Here's an 8 minute video on File IO that should help you out. ... e-handling

Return to “PHP coding => General”

Who is online

Users browsing this forum: No registered users and 2 guests