Jump to content

rjlowe

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Posts posted by rjlowe

  1. You've got too many close braces "}" I always label my close braces, otherwise I end up with errors like you have. See my //comments in your code snippett

    [!--quoteo(post=353423:date=Mar 9 2006, 03:55 PM:name=PcGamerz13)--][div class=\'quotetop\']QUOTE(PcGamerz13 @ Mar 9 2006, 03:55 PM) [snapback]353423[/snapback][/div][div class=\'quotemain\'][!--quotec--]
    1. I get this error Parse error: parse error, unexpected '}' in Not Telling on line 142
    2. I got four field in table mail: Sent_By,Sent_To,Message,Date. I need this to show From: Sent_By, Message: Message,Date: Date. Please help fix this.

    [code]<?
    $sql = "SELECT * FROM `mail` WHERE Sent_To='$Username'";
    $result = mysql_query($sql);
    if (mysql_num_rows($result) > 0) {  // Opens the IF Clause

        while ($row = mysql_fetch_row($result)) { //Opens The While Loop

            echo '<div>';
            echo '<p>----<br /><font face="verdana" size="2" color="red">From: </font>' . $row[1];
            echo '<br /><font face="verdana" size="2" color="red">Message: </font>' . $row[2];
                echo '<br /><font face="verdana" size="2" color="red">Date: </font>' . $row[3];
                echo '<br />----</p>' . '</div>';

    }  //  CLOSES the While Loop

    }else{   // Continue the IF Clause
    echo ("<font face='verdana' size='2'>You have no messages</font>");

    } // CLOSES the IF Clause

    } // Dunno what this is closing?
    } // Dunno what this is closing?

    mysql_free_result($result);
    ?>[/code]
    [/quote]
  2. Can't you just do a:

    INSERT .......
    ON DUPLICATE KEY UPDATE .......

    ???

    check out

    [a href=\"http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html\" target=\"_blank\"]http://dev.mysql.com/doc/refman/5.0/en/ins...-duplicate.html[/a]

    for more syntax info on how that might work for you..

    --RobBob

    [!--quoteo(post=353407:date=Mar 9 2006, 02:57 PM:name=mouli)--][div class=\'quotetop\']QUOTE(mouli @ Mar 9 2006, 02:57 PM) [snapback]353407[/snapback][/div][div class=\'quotemain\'][!--quotec--]
    Nearly true...
    I want to upload images to a database with a code number for the record. When I upload an image I specify the code number of the record I want the image added to.
    For instance I want to upload 45.jpg to field 'webpic1' in record with 'id' = L203
    If 'id'= L203 exists then I want it to simply update 'webpic1' with 45.jpg
    If 'id'=L203 doesn't exist then I want it to insert a new record with 'id'=L203 with 'webpic1'=45.jpg

    I can do it by querying the database for the existance of 'id'=L203, then using an IF statement to decide whether to insert or update but I was thinking there must be a quicker, slicker way to do it.

    Any ideas much appreciated.

    mouli
    [/quote]
  3. SWEET! That worked like a charm! Thx! :D


    [!--quoteo(post=350021:date=Feb 27 2006, 03:30 PM:name=AndyB)--][div class=\'quotetop\']QUOTE(AndyB @ Feb 27 2006, 03:30 PM) [snapback]350021[/snapback][/div][div class=\'quotemain\'][!--quotec--]
    You can 'trick' browsers into a fresh download if they think it's a different image. Easy way to do that is to give the browser an image name like sameoldimage.jpg?xyz=randomnumber.
    [/quote]
  4. OK here's the deal,

    I have a script that I use to upload images and then provide the user with <form> buttons to rotate the image if needed. It works great in FireFox and Opera, but IE refuses to reload the image when the <form> button is pressed. If I use the "Refresh" button, however, then the image updates (and rotates one more iteration - ugh). Is there a way to FORCE IE to reload an image instead of using it's cache?

    I've tried:

    <HEAD>
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Expires" CONTENT="-1">
    </HEAD>

    and that didn't do anything... I've also tried various tags for the img itself such as just plain HTML, or throwing some php in ( like echo "<img src=".$src.">"; ) and that didn't do anything either.... My main userbase is going to be IE, so just using FF or O isn't really an option either...

    Another (bad) option would be to change the name of the image in order to force/trick IE into thinking it's a new image file... I would really prefer NOT to do this.

    Thanks y'all :P
×
×
  • 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.