Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. If you want the break to apply when your conditional is true, you need to put it INSIDE the conditional's braces. (If it's going to work at all, break is weird when nested.)
  2. I didn't fix your code, I showed you why it won't work. The break is outside of the loop. It will execute every time (and therefore only one time.)
  3. Without curly braces only the first line is in the loop. So your code is this: <?php for ( $i = 1 ; $i < 4 ; $i++ ) { for ( $j = 1 ; $j < 4 ; $j++ ) { echo "Running i = $i and j = $j <br>" ; if ( $i == 2 && $j == 1 ) { echo "Breaks inner loop when i = $i and j = $j <br>" ; } break ; } } ?>Just use them. It will be easier for you to read. Use them and indent.
  4. Your yes link actually sends you to a new page. The no one stays on the same page and goes nowhere. That is exactly how you have coded it. If you want the yes link to go to a new page AND scroll down to an anchor, that page needs to have the anchor on it, then you need to add it in the end of the link.
  5. Did you bother searching google? I found an answer in less than 1 minute.
  6. Did you check the error log? Does your server have PHP? You need to talk to your host.
  7. The database structure would be fairly simple, the tricky part is outputting that data in a way that is readable.
  8. Each item should be linked to a catalogue ID. Look up data normalization. You'll show the current catalog, and past catalogs, then the items within them.
  9. Post your exact code and the exact error. Looking at the code you have now: echo "<a href=\"C:\php\website\files\{$inf}\">Link</a>"; Should work. It'd be easier to read if you used A. a real url and B. single quotes but that would work.
  10. OMFG. echo '<a href="C:\php\website\files\'.$info['file'].'">Link</a>';
  11. Probably because you didn't A. Use code tags B. ask an actual question or describe a problem.
  12. You should turn on PHP error reporting and find out.
  13. Did you read the manual? Because that's kind of a basic thing.!=
  14. That's better, but there's no reason for the random empty strings... Did you try it?
  15. Shout out! My husband and I only have one child right now but we plan to adopt as well and have a big family. My husband wanted a baseball team, I talked him down to basketball Welcome to PHP Freaks
  16. rename('/user/user_bilder/'.$_GET['fil'].'', ''.$_GET['uid'].'.'.$format.''); Uhm, the error message shows you exactly what you did. You are looking for one file with a comma in it. Check your string concatenation. This function will take two arguments, not one.
×
×
  • 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.