Jump to content

Maq

Administrators
  • Posts

    9,363
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Maq

  1. The notices are stemming from your array, you need to put single quotes around the associative key. i.e.: $_GET['loginfo'] You should do this with all your POST, GET, and associative array values. Everything else looks fine to me. The notices are appearing because of the error reporting we turned on. Change that and tell me if the pages still turn up blank, like I said before, that usually means there's a syntax error somewhere. Do you get any other errors? (If that's not line 61 in mylogin.php, we need to see that and some surrounding code, before and after line 61.)
  2. I'm pretty certain you need to replace this line: INSERT IGNORE INTO StaffHistory with this: REPLACE INTO StaffHistory REPLACE INTO will either update a record if it's already there, or create (insert) a new record if it doesn't exist. * NOT TESTED - Back up before trying this *
  3. Maq

    Open Source

    Maybe I'm confused, but before I reply, are you talking about "the market", in the sense of the IT job market that use mostly open source technologies?
  4. Please post the code in tags, I'm not downloading anything. No, but we can help you.
  5. Maq

    Advanced desktop

    Would be nice to know what your setup is. I've never seen this problem before, did read this on a couple forums: Try with a sudo dpkg --clear-avail && sudo apt-get update Hope it helps.
  6. You should refer to the manual for proper format - mail. user@example.com, anotheruser@example.com, anotheruser@example.com, anotheruser@example.com
  7. Good, I marked as solved for you. Next time there's a topic solved tab, bottom left.
  8. You should have your value in single quotes if the `user` field is a VARCHAR. SELECT * FROM `users` WHERE `user` = 'admin'
  9. By organized, you mean properly formatted? You should always have your code properly formatted to easily detect problems and to maintain readable code. It only takes a moment.
  10. No. Because, in the latter if statement, it's true that the file does NOT exist. So the include gets executed. Echo out your $filename and make sure it exists. Other than that your code looks fine.
  11. Maybe you should try reading the manual - str_replace.
  12. Just the way you said it... What's the problem? Have you tried it?
  13. Can I see that portion of the code?
  14. Almost, the ini should be on a separate line. ini_set ("display_errors", "1"); error_reporting(E_ALL); session_start(); ?>
  15. Sure. You want a random id i.e. - 501#, 1064#. Assuming you the ids are always 3-4 digits long and end with a #, you can you this: $file = file_get_contents('http://opensvn.csie.org/EnglishTranslation/English/idnum2itemdesctable.txt'); preg_match_all("~\d{3,4}#~", $file, $matches); $random = rand(0, count($matches[0])-1); $desc = $matches[0][$random]; echo $desc; ?> Why aren't you storing all this in a database?
  16. Something like: $month1 = strtotime("now"); echo date("F j, Y", $month1) . " "; $month2 = strtotime("+ 15 Days"); $month2 = date("F j, Y", $month2); echo $month2 . " "; $month3 = strtotime("$month2 + 1 Month"); echo date("F j, Y", $month3) . " "; ?>
  17. If I understand you correctly, just change these lines: $subject = "Enquiry"; //The senders subject $message = trim($_GET['msg']) . "\n\r" . trim($_GET['subject']); //The senders message
  18. Please explain what's wrong. What's supposed to happen. What's not supposed to happen. Are there errors? NOTE - Surround your code with tags.
  19. Elaborate on, "doesn't work". You're missing a single quote after B. has_tag('B')
  20. Alternatively you can do: print_r($GLOBALS); which prints out almost the same thing.
  21. More than likely your query is failing. Change this line to this and post the output: $result=mysql_query($query) or die(mysql_error()); (I think you "mysql_numrows" and "mysql_num_rows" are the same, but the second one is more popular IMO.)
  22. Could be a multitude of errors, usually syntactical. Put this at the top of the pages that display blank right after your opening <?php tag: ini_set ("display_errors", "1"); error_reporting(E_ALL);
  23. I tried multiple ways, and it either ignored the statement or gave me a syntax error. So, what's the error? Make sure you have this at the end of your mysql_query() call: or die(mysql_error());
×
×
  • 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.