<?php
if ( $submit )
{
if ( $vote )
{
echo "You rated me a: $vote <br>Thank you very much!<br><br>";
}
}
?>
<html>
<head>
<title> Vote form </title>
</head>
<body>
Rate my script [ 1 (sucks) - 5 (best) ] <br>
<blockquote>
<form name="vote" method="post" action="vote.php">
<input type="radio" name="vote" value="1"> - 1 <br>
<input type="radio" name="vote" value="2"> - 2 <br>
<input type="radio" name="vote" value="3"> - 3 <br>
<input type="radio" name="vote" value="4"> - 4 <br>
<input type="radio" name="vote" value="5"> - 5 <br>
<br>
<input type="submit" name="submit" value="Rate Me!">
</form>
</blockquote>
</body>
</html>
how to have an statistic about this voting form how to now how many people have voted me with excelent
i belive thet i must work with database mysql
but how to ...
voting form
Moderator: General Moderators
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
You may not need a mysql (or any other) database for this, you could just log the rating to a file:
http://php.net/manual/en/ref.filesystem.php
Plus you should also learn about register_globals and how to future proof your code:
Concerning Passing Variables in PHP 4.2+
Mac
http://php.net/manual/en/ref.filesystem.php
Plus you should also learn about register_globals and how to future proof your code:
Concerning Passing Variables in PHP 4.2+
Mac