Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. I'll just wait for you to either realize why what you posted gives a different result than what he wants, or for someone else to point it out to you because you're annoying me now.
  2. I know my homonyms, and I can read. Go back and read the post again genius. He doesn't want index.php, he wants news. Basename does NOT do what he wants. "Buddy".
  3. What? I thought you were trying to fill in the field in the form - so if they "edit" the form it will be pre-filled in. AFAIK the value="" field does not work on file inputs. So you can't keep the filename in the field. You could print it to the screen, but not in the field.
  4. That is for files, not for URL. To get the URL of the page the user is visiting, basename won't work.
  5. line 27 of /home/lilysgra/public_html/lilysgraveyard/index.php is session_start()? I don't think so... Unless you're calling session_start() twice but I don't think it gives that error. Obviously the code is loading THAT file so you need to find out where you're doing that.
  6. Did you try printing out what it gets? How would you tell substr() where to stop without strpos()? website.com/folder/blah.php is a different length than website.com/news/blah.php.
  7. Oh for pete's sake. Look at the error.
  8. Obviously it's not the first thing than. What is on line 27 of index.php?
  9. I don't believe you can fill in a file field at all.
  10. None really. I prefer print, but other prefer echo because it is one character shorter. It's a habit.
  11. Did you bother to look at the tutorials or research anything we said?
  12. You'll need to store something in the session which says they are logged in. On the page, check if the session variable is set. If not, redirect them back to the login screen.
  13. darkfreaks, considering some of the questions you've asked earlier today, let's leave the rude and sarcastic remarks to the professionals. If you're not actually going to HELP, hold back on the snark.
  14. Say you want three cells per row. It would work like this (this isn't tested but it should be close, you might have to work with it a bit) <?php print '<table>'; $counter = 0; $cellsPer = 3; while($row = mysql_fetch_assoc($result)){ if($counter%$cellsPer == 0){ print '<tr>'; } print '<td>'; print "This is the $number User. <br><br>" . "Name :{$row['picid']} <br>" . "Subject : {$row['userid']} <br>" . "<img src='{$row['url']}' width='400' height='300'><br>" . "Date uploaded : {$row['date']} <br><br><br>"; print '</td>'; if(($counter+1)%$cellsPer == 0){ print '</tr>'; } } ?>
  15. No I don't see what you mean. Are you saying you don't know how to do more than one cell per row?
  16. I guess you'd only use it in cases when you knew the offset, such as when you wanted to split it in half. Otherwise, you'd use another function. What are you trying to do?
  17. Use a combination of the following: $_SERVER['REQUEST_URI']; substr(); strpos(); See if you can get anything with that, and if not we can help more.
  18. An HTML table is just like any other html. Just echo it. What is the problem?
  19. Not quite...it will loop as many times as there are values in the array. However, $counter would always be 1.
  20. You set $counter = 1 in each loop. Use: foreach($mp3IDs AS $counter=>$mp3ID){ echo "new Ajax.InPlaceEditor('mp3title-".$counter."', '/process_mp3.php?mp3=".$mp3ID."');\n"; }
  21. You could, but it's a bit complicated. There are some tutorials on here about user login systems.
  22. The code has nothing to do with post or get! It's about a function, and the programmer not knowing enough about variable scope.
  23. Sorry, that should have been: foreach($mp3IDs AS $mp3ID){ echo "new Ajax.InPlaceEditor('mp3title-1', '/process_mp3.php?mp3=".$mp3ID."');\n"; }
×
×
  • 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.