Jump to content

Help w/ PHP Vote Couting Button


psionicsin

Recommended Posts

I'm currently trying to break apart some PHP coding that a former coder created, but left no documentation to. Can anyone help e find the function in this mess that creates the vote button and passes the currently loaded data to the next page? Here's the original code:

 

<?php

include("./templates/mysql_connect.php");

//FOR LETTER: A

$query = "SELECT * FROM seniors WHERE last_name LIKE 'A%' ORDER BY last_name ASC";
$result = @mysql_query ($query);

echo '<table><tr>
  <td>
  <p><span class="style19"><u>-A-</u></span><br />';

while ($row = mysql_fetch_array ($result)){

	echo "<a href=\"$row[pic_url]\" rel=\"lightbox[seniors]\" 
title=\" <form action ="/sencha-tallyvote.php?sen_id=$row[sen_id]" method="post">

$row[first_name] $row[last_name] - $row[school] <br />

    <input name="submit" align="right" type="submit" value="Vote" >  

</form> \">$row[last_name], $row[first_name]</a><br/>";

}
echo '</p>';
?>

 

The original code used a lightbox feature with an added voting button tagged on near the bottom. We've Xed the lightbox feature and are trying to deconstruct it into tangible PHP pages. We have everything done except for the coding for the vote  button.

 

Here's our coding for the currently deconstructed page, and where the coding for the button needs to go:

 

<?php
require_once('templates/mysql_connect.php');
?>

<?php 
$query = "SELECT * FROM seniors WHERE sen_id=$_GET[sen_id]";
$result = mysql_query ($query);
$row = mysql_fetch_array ($result);
?>

<div class="contents">
<h1><?php echo $row['first_name'], " ", $row['last_name']; ?></h1>
<h4><?php echo $row['school']; ?></h4>
</div>

<?php echo
'<a href="sencha.php" class="bigmenu"><img src="images/backarrow.png" alt="Back to Senior Challenge Home" class="arrowleft indexicon" /><u>Back</u></a><br />'; ?>

<?php echo "<img src=\"http://www.rutholsonphoto.com" .$row['pic_url']. "\" width=\"100%\" />" ?> <br />
<br />
<a href="/">{{VOTEBUTTON}}</a>

 

Any experienced help will be greatly appreciated.

Link to comment
Share on other sites

So far, with taking out the HTML equivalent of certain symbols for visual purposes, I'm able to see

 

<a href=\"tally.php\" title=\" <form action ="/sencha-tallyvote.php?sen_id=$row[sen_id]" method="post">

<input name="submit" align="right" type="submit" value="Vote" >

 

Is this the only part of the code I need to recreate the vote button and pass along the values??

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.