Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. <?php print $moveTo; if(!is_dir($moveTo)){ if(!mkdir($moveTo)){ // 153 return false; } }?> I get: /home/mysite/folder/ Warning: mkdir() [function.mkdir]: No such file or directory in /home/mysite/functions.php on line 153 When it's /home/mysite/folder it still doesn't work. Ideas?
  2. $time = time(); $time = $time-(3600); // One hour earlier.
  3. As well as anyone else who has a dynamic IP. So while my IP at home could constantly change, and I'd see the message a lot, I'd go to school and never see it there because someone else had been first - seems weird to me as a visitor. I recommend the "First Time?" buttons too.
  4. You'd have to change the server's time - if you're on a shared server, you won't be able to. You could just make sure to subtract/add the right number of seconds to any timestamp, or just use the time it's on...
  5. Instead of querying the database again, save the product IDs in the session when you do the search, then use them for the next and previous buttons - less database work.
  6. $sql = "DELETE FROM $table WHERE id=$id"; mysql_query($sql,$db) OR die('SQL: '.$sql.' - Error: '.mysql_error()); You never define $id, it needs to be $id = $_GET['id']; before the query, since you can't count on register_globals being on.
  7. That's not how it was meant to work. The code I originally gave you was example code of how to display text based on a link clicked.
  8. You could either just send one mail with lots of BCC, or send many mails. PHP is not really meant to send many mails with mail(), you might need to look at a mailer program.
  9. Can you paste the result of your print_r() here? (in the code tags please)
  10. Do you have session_start() at the top of every page? Are you going from www.mysite.com to mysite.com? Did you try print_r($_SESSION) at the top of the page to see if anything is in it?
  11. I think it is a custom defined function...although I've had bad luck with the manual today, I know it's not in there: http://us3.php.net/mysql
  12. Must be very old, because the manual says it can't find it. Are you talking about the MYSQL keyword DISTINCT? It's "modern".
  13. Yeah that would work. Just make sure the folder gets cleaned up occasionally, but not too often so you don't interupt a download, you know.
  14. You need to proofread before posting. "now if the is not count to update+1" What? Why don't you just store the comment count as a field in the picture table, and start it at zero, then just update it when one is made. Then you don't have to check anything.
  15. Once they add them to the basket, copy the file on your server and rename it with the right name.
  16. With the code you have it will always be inserted, so just don't do the update.
  17. mysql_query() will always return a result unless there was an error, so you will always have an $insert. What are you trying to do? It's a little unclear.
  18. It depends on what you mean by download, and how you've stored the original name.
  19. When I'm typing it, I generally call it "dot" because I started OOP with Java, and I just think to myself class.method() so I transfered that to php $class->method() is still class dot method to me... I guess I'm just weird. I've never had to say it out loud.
  20. Weird...when I looked it up in the manual to check the arguments, it redirected me to mysqli_affected_rows - over and over again. Now it's not doing it...wtf was I doing?
×
×
  • 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.