Jump to content

JohneeMac

Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Posts posted by JohneeMac

  1. Hi.

     

    I have a little league table integrated at www.afc-chat.co.uk

     

    It doesnt seem to the rows in the right order.

     

    MySQL is

    SELECT * FROM leaguetable ORDER BY points DESC, gd DESC

     

    As you will see i want the data ordered by points then by goal difference (gd). I have tried both ASC and DESC and they work when the numbers invert by being either positive or negative, but changing that manually obviously isnt the right way to do things.

     

    The database is entered into the database by a single field like: "+10" or "-4". Maybe its the input i need to change?

     

    Any help greatly appreciated.

     

    JM.

     

     

  2. Hi there.

    How do i get checkbox values sent to my email account?

    I have other variables that send fine like name, email etc and the mail () function works fine.

    I would like to get checkboxes working though.

    I have 6 activities such as quad biking, off road driving etc and how can i send these names if selected to my email account?

    Thanks for your time.
  3. Thanks for the reply Ken.

    I put in the code as you said but its still not working

    i have :

    [code]mail($recipient, $subject, "\n Group Number: $group \n\n Activities: $actos \n\n Message:$msg ", $headers);[/code] for sending mail

    and

    [code] if (isset($_POST['foo'])) $actos = implode("\n",$_POST['foo'])."\n";[/code]

    for getting the variables.

    Thanks for your help
  4. Hi i want the checkboxes selected to be sent to my mail account. The email part works fine but i just cant get these checkboxes to be included.



    [code]<input type="checkbox" name="foo[]" class="no"  id="fishing" value="Fishing"  "/>

    <input class="no" name="foo[]" type="checkbox" id="quadBiking" value="Quad Biking" />
        

    <input class="no" name="foo[]" type="checkbox" id="gameShooting" value="Game Shooting/>[/code]




    [code]$foo = $_POST['foo'];
    if (count($foo) > 0) {
        
         for ($i=0;$i<count($foo);$i++) {

                $actos .= "$foo[$i]\n";

         }

    }

    [/code]



    Any help greatly appreciated.
  5. Hi there, i am trying to display some news with the most recent date at the top

     

    heres my SQL:

     

    $sql = mysql_query("SELECT *,
       date_format(article_date, '%D %M, %Y') as article_date 
       FROM news_system
       ORDER BY article_date 
       ASC LIMIT 5");

     

    It seems to mess up and have a random order of things.

     

    Thx.

×
×
  • 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.