Voting in PHP USing IP Address
<body> <div align="center"> <h3>Voting With PHP</h3> <?php include('config.php'); $sql=mysql_query("SELECT * FROM messages LIMIT 9"); while($row=mysql_fetch_array($sql)) { $msg=$row['msg']; $mes_id=$row['mes_id']; $up=$row['up']; $down=$row['down']; ?> <div id="main"> <div class="box1"> <div class='up'> <a href="up_vote.php?id=<?php echo $mes_id; ?>" class="vote" id="<?php echo $mes_id; ?>" name="up"> <?php echo $up; ?></a></div> <div class='down'> <a href="down_vote.php?id=<?php echo $mes_id; ?>" class="vote" id="<?php echo $mes_id; ?>" name="down"> <?php echo $down; ?></a></div> </div> <div class='box2' ><?php echo $msg; ?></div> </div> <?php } ?> </div> </body> </html>
No comments:
Post a Comment