Jump to content

Adam

Moderators
  • Posts

    5,717
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Adam

  1. Not according to many articles I've read.. include should throw a notice, but require should cause an error... http://discomoose.org/2006/04/28/the-difference-between-require-and-include/ Just an example from one of the top results off google... Adam
  2. Yes you need session_start(); on every page you use sessions... Adam
  3. Do you have error reporting switched off at all?
  4. what happens in header.php? Basically you're setting the PHP file to display as an image, so you'd just use something like: <img src="your-php-file.php" /> You can't print out any HTML in the page though otherwise it won't work! Adam
  5. http://us.php.net/manual/en/function.imagestring.php Adam
  6. Sorry mate but that doesn't make much sense to me. From what I can understand, you're going a hell of a long way round to do simple things. I'd suggest rewriting them in a simpler, clearer form and then debugging any errors. An example of what I'm talking about is in the DisThread function; you're running a query to select all the thread IDs.. counting up the results.. then using a for loop to perform a query for each thread, to then pass the array onto the DTThreads function, when you could do all that in one function, with far less code and only one query! Adam
  7. Think Mchl has it! Reckon you might want to look into some security aswell by the way! Adam
  8. But people are trying to help you now? Can't because we can't actually help you find the problem... Often when I've been trying to find a problem for a long time, a break or a fresh pair of eyes helps you find it much faster... Adam
  9. Have you tried adding.. or die(mysql_error()); to the end of your queries, for example: $threads = mysql_query("SELECT * FROM threads") or die(mysql_error()); that should output any MySQL errors... Adam
  10. well i sort of get you, but what date will be stored in date? yesturday, today? could try something like.. SELECT max(xpField) FROM tableName WHERE dateField = 'someDate' Never really used max before though, mentions a lot about grouping the results, could try using it...
  11. Not amazing with regular expressions but could try adding.. eregi ($url, \^('http://') | ('https://') | ('ftp://')\) or... eregi ($url, "^('http://') | ('https://') | ('ftp://')") Adam
  12. From what I understand of servers, and i may very well be wrong, but to communicate with a server (or web server) you need to use TCP/IP protocols. Perhaps if you have the internet disabled you're also disabling the TCP/IP protocol, which then prevents you from communicating with the web server? Someone tell me if im wrong? Adam
  13. yeah, save the date field in your database as a "date" format .. and then use: mysql_query("SELECT * FROM yourTable WHERE dateField BETWEEN NOW() AND DATE_ADD(NOW(), INTERVAL 365 DAY)"); ... that's the way i use anyway... EDIT: Not massively experienced here so could be used with like 12 MONTH instead of 365 DAY ?? Adam
  14. okay, and your getting an error? what happens when you do use.. $content = '<table><tr><td><b><u>Name</u></b></td><td><b><u>Title</u></b></td><td><b><u>Level</u></b></td><td><b><u>Experience</u><b/></td><td><b><u>Gender</u></b></td></tr>'; print $content;
  15. Can't see any problem? what happens when you echo it?
  16. Do you have a link? perhaps its a really simple silly error?
  17. In this case perhaps, but die() does not redirect by normal... http://uk.php.net/die something has to be causing it to redirect in that circumstance.. perhaps on error or something?
  18. why doesn't it work in IE ? Sounds like a HTML/CSS issue in which case PHP isn't really the answer... try fixing the error? reckon the users would appreciate that more being as IE is a widely used browser...
  19. Going back to die() causing it to redirect, it doesn't .. die() basically kills the script and prints out an error message if ones passed. must be something in the rest of the script?? Can't imagine what, it's an odd one...
  20. didnt notice the double ?, why do you use it? why not just use like .. ?this=this&that=that ... but that wouldn't effect it as it's within a string. I personally can't see anything wrong with that line at all, but i would advise you switch the quotes. ie... echo '<option value="http://www.zerodefex.net/ccf/redo/pages/admin.php?user=true?UserID=' . $row['id'] . '">' . $row['username'] . '</option>'; .. notice now the HTML is correct and valid.
  21. Perhaps its using.. $string=md5(sha1(md5(sha1($string)))); can't imagine that's necessary anyway? md5 does the trick...
  22. Show us all the code, must be something causing it to redirect...
  23. Try looking at HTML symbols... http://www.w3schools.com/tags/ref_symbols.asp heart is represented as "♥" i believe..
  24. what happens in the "protect" function? Try printing out the username and password variables... What is actually printed out when you try and login? Need little bit more information..
  25. Say it didnt work one time though, he or the user won't know... Also the ()'s may not be required for it to work, but it's the right way to do it... as revraz says bad habbits...
×
×
  • 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.