Jump to content

ldougherty

Members
  • Posts

    319
  • Joined

  • Last visited

    Never

Posts posted by ldougherty

  1. I would suggest using the SUM function to total the columns of your database.  This will give you total hours and total minutes.

     

    You could then (total hours * 60 + total minutes ) / 60 = total hours and minutes in decimal format

  2. You're page is coming up blank.

     

    I assume its PHP content inside of an HTML document?

     

    If so the blank page means you have a PHP error and display PHP errors is disabled.

     

    Try adding this to the top of your page

     

    ini_set ("display_errors", "1");

    error_reporting(E_ALL);

     

    That should allow you to display the error you are experiencing.

  3. I'm not sure that I understand you completely but you could simply put the results into a table.

     

    Essentially start the <TR> before you start outputting the results

     

    Have a counter that increments after each set of data is echoed

     

    Have a <TD></TD> around each result

     

    Have an if statement stating if the counter is odd then </TR><TR>

     

    The logic is that you'll have a <TR>, two sets of <TD></TD> and then a </TR><TR> to start the next line.

  4. There would be a couple different ways logically to do this.

     

    You can either retain the existing document and remove the crap you don't want.

     

    Or you can find the stuff you do want from the document and grab it to store it in another document.

     

    I personally would probably use file_get_contents to return the file data into a string and then use the php string functions to use what you want and replace what you dont.

     

    http://us2.php.net/manual/en/function.file-get-contents.php

    http://us2.php.net/manual/en/ref.strings.php

  5. I'm not sure I'm understanding.  If the data is already in the database ie notify field is Y meaning they wish to be notified then when sending emails or at least generating the email list you should just use

     

    $sql = "SELECT email FROM contacts WHERE notify = 'Y' "

  6. Rather then running a query for each individual city I'd suggest having one query and then run a while loop that populates an array.

     

    IE..

     

    result = select Count(City) FROM Photos

    row = fetch row result

    $city = $row[city];

     

    then have a case statement case philly phillycount++ etc etc.

     

    hope that makes sense..

     

  7. So the user actually enters the character £ into the quote field and this arrives via email with  in front of it?

     

    Have you tried outputting the form prior to sending the email to see if the text is outputted correctly before the mail is sent?  This would at least let you know if the issue is with your form or mail delivery.

  8. Do you have access to the mail logs on your server??

     

    If the script is saying its sent then it's being blocked somewhere.

     

    If you do not have access to the mail logs ask your web host to take a look at the mail log to determine if the message is successfully leaving their network or not.

     

    If it is then the issue is with the recipient mail server, probably your junk mail folder.

  9. "Why is it using more than 16MB of RAM? When it seems to be just trying to use less than 2kb?"

     

    This particular aspect of your script is not using more than 16Mb of ram, everything being run by PHP in that instance is using a total of more than 16Mb.

     

    "And how do I increase this limit?"

     

    The variable is memory_limit in your php.ini

     

    If this is a shared server you likely do not have access to adjust this value however you can usually do so via your code as well using this at the top of your page.

     

    ini_set("memory_limit","32M");

     

    where 32M is the new value for PHP Memory.

  10. "Should I just reject them and tell the user "This image is too small for the website"."

     

    Exactly.  On the upload form you should have something stating min and max resolution and after the upload have your script check to see if it falls in that range.

     

    If it is too small then reject it and bounce the user back to the upload screen with an error stating too small.  It also would be helpful to state what the image uploaded actually was for the "not so smart" user who has no idea what resolution means.

     

    Failed Upload, Image Size (height x width) does not fall within allowed resolution.

  11. Also try changing the TO address from Yahoo to something else like a Gmail account.  Yahoo is notorious for grey listing emails based on IP reputation.

     

    Therefore even if your script works properly Yahoo could be blocking your mail.

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