Jump to content

Cazrin

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Posts posted by Cazrin

  1. It's a problem with your if() statement I think

     

    <?php
    
    if (($_FILES['ColourImage']['type'] == "image/gif") && filesize($ColourImage['tmp_name']) > $Max_Size && ($Img_Dimensions[0] > 50) || ($Img_Dimensions[1] > 50))
    
    ?>

     

    Try adding some extra brackets in to make sure:

     

    <?php
    
    if (($_FILES['ColourImage']['type'] == "image/gif") && (filesize($ColourImage['tmp_name']) > $Max_Size) && ($Img_Dimensions[0] > 50) || ($Img_Dimensions[1] > 50))
    
    ?>

  2. Do what adam said to create the shortened version of the news post.  As for the link to the rest of the news, create another file which will take the id of the news posts from the URL ($_GET['id'] for example) and then display the news post based on that id.

     

    There's another shove in the right direction  ;D

  3. I guess you could put an if() statement before that, to check which is greater.

     

    <?php
    $a = 400;
    $b = 300
    
    if($a>$b) {
    
    // Swap the values of $a and $b
    $temp = $b;
    $b=$a; // Is now 400
    $a=$temp; // Is now 300
    
    }
    
    $query = "SELECT * FROM `table1` WHERE `col1` BETWEEN ".$a." and ".$b;
    ?>
    

     

    Haven't used BETWEEN before so not sure if that would work :D  But I'd say give it a go, makes sense to me!

  4. It depends what you're wanting to select from the table.

     

    If you're wanting to query a specific row, it's usually best to go by the row ID, so you'd want to keep that in your query.  Some more info on what you're wanting to actually query would be great :D

  5. Hi there,

     

    I recently want this on my website and managed to get it to work.  I was using DIVs instead of tables but give this a try:

     

    
    $counter = 0;
    
    while($output=mysql_fetch_object($result)){ 
    
    echo "<td><img src=\"$medal[image]\" width=\"99\" height=\"26\" alt=\"$row[reason]\" /></td>n"; 
    
    $counter++;
    
    if($counter == $num_cols) {
    echo "</tr> <tr>";
    }
    
    

     

    That's the way round I did it, rather than before the line of code.  Let me know if that works :)

  6. I see you're sending this from your own server on xamp.  I'm pretty sure that xamp doesn't include an SMTP server as standard, so make sure you get one installed otherwise it isn't going to work at all.

     

    I get this same issue when testing scripts that try send e-mails, but they work fine once they're uploaded to my webspace.

     

    Maybe someone can recommend a good SMTP server to try, but I'm sure google will give you some free programs out there.

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