Jump to content

Maq

Administrators
  • Posts

    9,363
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Maq

  1. It's definitely worth the work, it's pretty much necessary. What if you have users on your site and you break something? You're just going to let your users suffer while you're trying to fix it? No, you develop and test locally, once you're satisfied, push it live.
  2. but i dont see a point of installing a database on my own computer when i dont want my computer to be the server, You should be developing and testing on your local machine. Your local environment should mirror your live one.
  3. In your giant echo statement you should be using single quotes for the HTML attributes, as the first double quote is interpreted as the echo termination expecting a semi-colon.
  4. In a tongue-in-cheek defense of Microsoft, one blogger suggested that the company was attempting to be all things to all people. "The white head and black hand actually symbolize inter-racial harmony. It is supposed to show that a person can be white and black, old and young at the same time."
  5. note that when using str_pad(), you don't even need to check the string's length. no padding will be performed if the input string is equal to or greater than the pad length. Ah, yeah sorry about that. Thanks. $s = 8; echo str_pad($s, 2, "0", STR_PAD_LEFT);
  6. $s = 8; echo (strlen($s)==1) ? str_pad($s, 2, "0", STR_PAD_LEFT) : $s; ?> Or, as Nightslyr suggested: $s = 8; echo (strlen($s)==1) ? "0" . $s : $s; ?>
  7. Check out: str_pad.
  8. http://www.belfasttelegraph.co.uk/lifestyle/technology-gadgets/microsoft-apologises-after-swapping-black-face-for-a-white-one-in-polish-ad-14472121.html
  9. Please use tags. You have to learn about string formatting and interpolation. You're using double quotes for your string and attributes. The attributes should be using single quotes. {$row[id]} In the line above, you're using curly braces for no reason. Associative arrays are supposed to have single quotes around the keys and surrounding it with curly braces allows you to do that.
  10. That's odd with OP's so well-formed and properly indented code? lol. Hopefully that was caused by a copy and paste or something...
  11. Maq

    Blank Page

    Reply 9 & 10.
  12. Totally didn't even see that... If you want to order in descending order then you need to keep that clause in there but specify what to order by. ORDER BY [column_name] DESC LIMIT
  13. Maq

    Blank Page

    echo''; Why did you decide to format this string differently, well ultimately incorrectly? You have to learn how to concatenate and format strings properly.
  14. Maq

    Blank Page

    Before examining your code, turn error_reporting on by placing the following lines directly after your opening <?php tag: ini_set ("display_errors", "1"); error_reporting(E_ALL);
  15. Most likely your query is failing. Echo out the mysql_error() or the query string to see what's actually going on.
  16. Is this via RSS? Or is this content you already have? In which case you can just use a cron or scheduled task (windows).
  17. Where is $mail defined? You sure it has a value...?
  18. A simpler and safer solution would be to use SimpleXML. You can easily test for empty attributes, self-terminating elements, empty nodes, etc. with XPath.
  19. This was actually a MySQL question, which I moved. If this is resolved please mark as so.
  20. Then please mark as so.
  21. I believe the "value" attribute is the default value. To make it blank when the user clicks in the field, you're going to have to use Javascript, specifically onFocus(). If this specific thread is solved, please mark as so and post this new question in the Javascript section.
  22. That's good to hear. You have to initialize them like I mentioned before. Somewhere in the beginning of your script add: $x = 0; $construct = ""; EDIT: I realize you have error_reporting turned to max while in development, but when pushed live, error_reporting should be adjusted appropriately.
  23. I just implemented the suggestions mentioned in that article and I definitely see performance improvements. Reducing the amount of RAM during minimization is one of my favorites. I would use Chrome, but it's still "in-progess" for Linux. It's clearly faster for browsing, but, like you said, for development environment I like FF support and plug-ins much better. Warning: Please read this reply for potential issues these modifications may cause: http://www.boygeniusreport.com/2009/01/25/a-handful-of-firefox-tweaks-that-will-double-your-browser-speed/comment-page-2/#comment-382958 EDIT: But after reading this reply, it may be well worth it. http://www.boygeniusreport.com/2009/01/25/a-handful-of-firefox-tweaks-that-will-double-your-browser-speed/comment-page-1/#comment-382827
  24. Check out this note: http://us.php.net/manual/en/function.shell-exec.php#57215
  25. You never initialize $x, but the script should still work properly. You never initialize $construct but the script should still work properly. These two notices won't hurt you but you the "$Job Type" variable won't display. Change all occurrences of "$Job Type" to "$JobType" (notice the space). I would highly encourage you to never use spaces, instead use underscores if you want to separate words in variable names. You can keep the key name in the associative array from the query the same, change only the PHP variables.
×
×
  • 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.