Can anybody help me place an IP logger into my voting script?
I know that maybe it is not as secure, but I would prefer them to be logged into a text file for simplicity's sake.
THANKS!
The php script is this at the moment:
<?php
$vote = $_REQUEST['vote'];
//get content of textfile
$filename = "poll_result.txt";
$content = file($filename);
//put content in array
$array = explode("||", $content[0]);
$a = $array[0];
$b = $array[1];
$c = $array[2];
$d = $array[3];
if ($vote == 1)
{
$a = $a + 1;
}
if ($vote == 2)
{
$b = $b + 1;
}
if ($vote == 3)
{
$c = $c + 1;
}
if ($vote == 4)
{
$d = $d + 1;
}
//insert votes to txt file
$insertvote = $a."||".$b."||".$c."||".$d;
$fp = fopen($filename, "w");
fputs($fp,$insertvote);
fclose($fp);
?>
<font face="helvetica" color="gray"><i>
<?php echo($a); ?><br /><br />
<?php echo($b); ?><br /><br />
<?php echo($c); ?><br /><br />
<?php echo($d); ?></i></font>
Php WordPress help
I am writing the following code for making a plugin<?phpheader("Content-Type: text/css");/*Plugin Name: Name of the plugin.Plugin URI: The page having information related to
start new row of pictures
on my site www.budstreasureauctions.com there is a featured auctions box that users will pay to get there picture on the homepage. currently the box limit is 6. If you increase the limit then it
Shuffle between users ??
I have multiple $users in table. I need to send them $message.I need to send the next message available in the database to the next user who got least amount of messages.Or how could I place those
Tree Menu
Hi guys,Can anyone help me making a tree navigation system? I have a site where I'm allowing users to upload their files to share with each other. They can create folders, but I'm having real
losing variables between php brackets
Hihave got this code:Code:
Add a sign-up feature to a flat file login script
I'm working on a flat file login script and I would like to add a sign-up feature to it with a email confirmation process.Here is my code :Line number On/Off | Expand/Contract <?php//sessions
How would I convert this into code using an if statement?
ES equals exam score m equals $mean s equals $total. I already coded my mean and total so I'm not going to post my code unless it is necessary. I want to know how to get this into code form using if
redirect standard error and assert (how to?)
How do you redirect standard error and assert?---(Why? I am creating an web app and assert does not show on the webpage. I do not think standard error does either. Not sure, but fairly certain.
Change Age automatically
hi guys . im new to php , is it possible to change age value in mysql automatically when year changes ?
RadioButtonList data selection
view plaincopy to clipboardprint?<asp:RadioButtonList ID="type" runat="server" TextAlign="left" CssClass="contactTypeRadio"> <asp:ListItem Value="Inquiry" Selected="True" />