Jump to content

StarvingArtist

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Posts posted by StarvingArtist

  1. Hi all --

    In an if clause there is this line:

    if (PSEUDO_CAPTCHA_RESPONSE && PSEUDO_CAPTCHA_RESPONSE <> $_POST['pseudo-captcha'])
    {
    echo 'Your pseudo-captcha response '.$_POST['pseudo-captcha'].' is invalid! Please use your browser\'s back button, correct and submit again.<br />';
    exit;
    }
    

    It works fine -- that's not a problem. BUT, rather than have this bare bones one-liner message displayed on the basic white browser window, I'd much rather have it display my own page with all the styling intact, that says the same thing.

     

    Trouble is, I don't know how to look up what I want in the gazillion books I have. So, I'm turning to the source for all things PHP!

     

    Any suggestions of what word in any index this falls under would be wonderful.

    AND, of course so would the needed code!

     

    Thanks much.

     

    Clair

  2. I'm an artist and while developing an online db/gallery of buttons, I searched and tried to decipher innumerable bits of PHP pagination code by various folks at various locations -- none of which were sufficiently commented and none of which could I adapt for my purpose.

     

    UNTIL I found the long post by Crayon Violent here.

     

    A couple of hours of fiddling and I had what I wanted. I am deeply grateful to him/her and to this Forum.

     

     

  3. MySQL v. 5.0.45  PHP v. 5.2.5

     

    Code:

     

    $osql = "SELECT SUM(`sold`) `artist` FROM buttons GROUP BY `artist` LIMIT 2 ";

    $money = mysql_query($osql);

     

    while  (list($dollars) = mysql_fetch_array($money))

    {

        echo " Money: $dollars <br />";

    }

     

    The following results from the echo statement show that the query is correct and functioning properly (there are only two artists):

     

    Money: 257.3

    Money: 171.9

     

    Because the money is right, I know the GROUP BY 'artist' part is right.

     

    QUESTION:

    For each Money row, how can I print out the name of the artist, which of course was used to SUM the money column??

     

    This db is for my use only, and I'm building administrative functions for it and have been stuck on this one for almost 8 hours now.

     

    I've searched in vain for this kind of operation with no luck.

     

    Thanks much to whomever can solve this!

     

    Clair

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