Jump to content

PHP voting page


pancgom

Recommended Posts

hi guys,

 

I very new to PHP. I am trying to create a php page which should retrieve images from a images folder and the image has to be voted with the results showing immediately when the vote for this image button is clicked.

 

There are over 50 images which are called from the folder and all the images are on the same page with a voting button in the adjacent column. The result has to be a number showing how many times the logo has been voted.

 

Below is the code so far.. pretty basic...i need some help here guys......

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<title>Logo Polling Page</title>

</head>

 

<body>

<?php

 

$T="65";

 

for($i=1;$i<$T;$i++)

 

 

    echo "<table width='746' border='1' cellpadding='0' cellspacing='5' bgcolor='fff'>

 

<tr>

<td width='250' height='150' valign='middle' align='center'>

 

<img src='/images/$i.jpg' width='250' height='200'>

 

</td>

 

<td align='center'>

 

    <input input type='Submit' name='vote' id='vote' value='vote'>

 

 

</td>

</tr>

</table>"

 

;?>

 

</body>

</html>

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.