Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. You could add some basic logic to help you figure out where the problem is, btw. <?php $dir = " . "; // im using the dot to show files in the current directory if(is_dir($dir)) { if($dir_handle = opendir($dir)) { while($filename = readdir($dir_handle)) { echo "filename: {$filename}<br />"; } }else{ echo 'Cannot open'; } }else{ echo 'Not a dir'; } ?>
  2. session_start() needs to be the VERY first line. You can't start a session after outputting HTML.
  3. That's weird. I'd expect that to produce a warning, but ok. It's probably something to do with the rest of your code, but we can't tell if you don't post it. try adding print_r($_SESSION); after defining them. You're also doing a LOT of unnecessary typing the way you have it. You could probably just put the row you get from MySQL directly into the session.
  4. What's with the random { }? Did you verify those variables are set on page 1?
  5. http://php.net/manual/en/function.uniqid.php
  6. You need session_start on every page. Not within an if.
  7. When you're creating folders and files you don't use the domain name, you use the path from the root. I've never seen someone try to create a folder by using the full domain name. Which is what you're doing.
  8. You can find answers to most of that in the manual. Look at the String section.
  9. You need to do the implode after you're done making the array you want to implode.
  10. There is no "standard" way to do that. It's not something one normally does.
  11. http://en.m.wikipedia.org/wiki/Cron One of the things you can do is run a PHP file.
  12. $qx = "select count(*) as num_rows FROM products"; Will return 1 row with 1 column called num_rows containing the number of rows.
  13. You don't normally use localhost as a folder name though. It's the host, like a domain name sort of. You would just use DispatchReports.
  14. Uhm, what? Your second set of code has a basic syntax error, as shown by the code highlighting.
  15. Because when $i is greater than 3, you ONLY add the new lines and set $i to 0. Then you go to the next row. You could save a lot of work by using modulo %
  16. If you want to test your own code, set up a localhost using WAMP or similar.
  17. You should use user_id not username to store relational data.
  18. So the from_user _____ to_user will be that username. Fill in that blank. (BTW: you really should be the PK, not usernames).
  19. Honestly, this is a topic I know nothing about, but did you TRY IT? It cannot possibly hurt to try.
×
×
  • 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.