Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder Psionicsin's Avatar
    Join Date
    Aug 2010
    Location
    Detroit, Michigan
    Posts
    346
    Thanks
    54
    Thanked 0 Times in 0 Posts

    {NEWBIE} Help Removing Code

    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. RESOLVED - Add the class "smallmenu" to each displayed result


    PHP Code:
    <?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=\" &lt;form action =&quot;/tally.php?sen_id=$row[sen_id]&quot; method=&quot;post&quot;&gt;

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

     &nbsp; &nbsp; &lt;input name=&quot;submit&quot; align=&quot;right&quot; type=&quot;submit&quot; value=&quot;Vote&quot; &gt;  
     
     &lt;/form&gt; \">$row[last_name], $row[first_name]</a><br/>"
    ;
            
        }
    echo 
    '</p>';
    ?>
    Any help from someone way more experienced is greatly appreciated.
    Last edited by Psionicsin; 08-21-2011 at 01:00 AM.

  • #2
    Regular Coder Psionicsin's Avatar
    Join Date
    Aug 2010
    Location
    Detroit, Michigan
    Posts
    346
    Thanks
    54
    Thanked 0 Times in 0 Posts
    When I attempt to add the class "smallmenu" to the PHP function, I get a bunch of errors. I'm not 100% on how to add a CSS class to a PHP function.

  • #3
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,265
    Thanks
    6
    Thanked 48 Times in 48 Posts
    class=\"nameofclass\"

  • Users who have thanked Nightfire for this post:

    Psionicsin (08-21-2011)

  • #4
    Regular Coder Psionicsin's Avatar
    Join Date
    Aug 2010
    Location
    Detroit, Michigan
    Posts
    346
    Thanks
    54
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Nightfire View Post
    class=\"nameofclass\"
    Thank you very much for this. This wasn't my coding to begin with, so I'm having to jump head first into complicated (to me) PHP coding.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •