Jump to content

dustinnoe

Members
  • Posts

    187
  • Joined

  • Last visited

    Never

Everything posted by dustinnoe

  1. <a href="http://us.php.net/imagesx">imagesx()</a> <a href="http://us.php.net/imagesy">imagesy()</a> If you have GD library installed.
  2. It's kind of a long story so here it goes. It's my first name and then my last name.
  3. Here is a more simplified solution <?php $doy = date(("z"), time() - (14400 * 1)); $currentYear = date(("Y"), time() - (14400 * 1)); $lastDay = strtotime("Dec 31, $currentYear"); $numDays = date('z', $lastDay); $daysTil = $numDays - $doy; if ($doy == 0) { echo "Happy New Year!"; } else { $newYear = $currentYear + 1; echo "There are {$daysTil} days left until {$newYear}."; } ?>
  4. http://www.phpfreaks.com/forums/index.php/topic,127902.0.html Here are the resources you will need. It's worth learning this on your own as opposed to someone writing the code for you. I struggled through it and I'm glad I did.
  5. I know this has nothing to do with your question but get rid of all those print statements and wrap it all in one echo. It will save you lots on script execution time not to mention readability.
  6. http://akismet.com/ I use this to allow anonymous comments and eliminate spammers. It has worked great so far. Could save you a lot of coding and headaches. You know it's doing something when you have 5000 hits to a web form and only 8-10 actually post.
  7. I think I would start with <a href="http://us2.php.net/preg_match">preg_match()</a> using the "matches" parameter
  8. <?php // leap year to test $time = strtotime("Dec 31, 2004"); $julian = date('z', $time); echo $julian; ?> This will output '365' but Jan 1st will output '0' so the answer to your question is yes and no at the same time.
  9. Actually, that has nothing to do with why it uses parenthesis. Print and echo are language constructs, so are include, require, include_once, require_once, etc. They are not actually functions and therefore do not need parenthesis surrounding the "parameters," however it should work fine even if you do have them there. In his case, that's not what is causing the problem. Try, on a blank page: <?php $array = array('my', 'test', 'array'); print "<pre>", print_r($array, true), "</pre>"; ?> print does act like a function in that it always returns a value. I don't know what I was thinking on the parenthesis though.
  10. <?php echo "This was written out by PHP"; ?> print() uses parenthesis because it actually returns a value. echo returns nothing so no parenthesis. <a href="http://us.php.net/echo">more info</a>
  11. Your signature is $firstName . $lastName
  12. You can have valid HTML and still screw over users with disabilities. Semantic HTML is just as important as valid HTML. It should be set up so that a machine can understand your document well. Use CSS to achieve a more human readable page. If you start using HTML the right way it is super simple when validating. The same thing applies to SEO.
  13. I guess this would be the way to really "experience" India <a href="http://vids.myspace.com/index.cfm?fuseaction=vids.individual&videoid=2013499621">Cobras in India</a> Not something you would see me doing though!
  14. If you are talking about the url that is something the server does if it cannot set a cookie on the users machine.
  15. I knew what he was talking about, I was just wondering if I could trim the query down some. You answered my question though. Thanks! Still have not got to try it but I will post here when I do.
  16. Watch out for SQL injection. A crafty person could give themselves more leave or something like that. How great would that be for the employee. Maybe you should get the employee's to pay you for the project.
  17. Just think of a few projects you want to do and do them. Your code will be very crude to start with but that's OK. As you learn just keep updating your projects. I have been using php for almost 4 years and I am constantly going back through my projects and updating code as I learn. Whenever you have questions you can use your books for reference but the best are places like this forum.
  18. So if I go with solution B can I remove the other two 'GROUP BY qt.id'?
  19. Oh How I hate IE. Got it fixed.
  20. That's essentially the same point I was trying to make in so many words.
  21. Why not create a relationship id for all related numbers and then tie each number to that relationship id. So if your relationship id equals 1 all you would need is 1, 7 1, 8 1, 20 1, 5 Some of these numbers could also be related to another set 2, 7 2, 20 2, 2 2, 38 Now all those numbers are related with much less processing and storage. Hope this helps.
×
×
  • 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.