Help Removing and Altering Code

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
psionicsin
Forum Newbie
Posts: 1
Joined: Sat Aug 20, 2011 11:42 am

Help Removing and Altering Code

Post by psionicsin »

New to PHP coding here. And by new, I mean I don't really understand what I'm doing :). Please be patient with me.

I need to know what parts to add/remove from the coding below in order to:
  1. Get rid of the vote button/elements
  2. Make it so that when a name is clicked, the href will take them to "vote.php" instead of attempting to link to where the image is
  3. Add the class "smallmenu" to each displayed result

Code: Select all

<?php

include("templates/mysql_connect.php");

 //FOR LETTERS: A-F

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

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 />';

while ($row = mysql_fetch_array ($result)){
		
		echo "<a href=\"$row[pic_url]\" title=\" <form action ="/tally.php?sen_id=$row[sen_id]" method="post">

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

 &nbsp; &nbsp; <input name="submit" align="right" type="submit" value="Vote" >  
 
 </form> \">$row[last_name], $row[first_name]</a><br/>";
		
	}
echo '</p>';
?>
Any help from someone way more experienced is greatly appreciated.
genix2011
Forum Commoner
Posts: 74
Joined: Tue Aug 02, 2011 4:00 pm

Re: Help Removing and Altering Code

Post by genix2011 »

Hi,

the html code makes no sense, did you edit the code?

Please try to post the code without the escaped "&..." chars.
Post Reply