Jump to content

premiso

Members
  • Posts

    6,951
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by premiso

  1. Avoid using the @. Instead I would use this: <?php session_start(); if (!isset($_SESSION['cookie']) || $_SESSION['cookie'] != "yes" ) { header("Location: login.php"); exit (); } ?> As far as why it is redirecting to the member page, you need to post the full code for that page. As I do not see anywhere there that would redirect you to the members page.
  2. I think you are mis-interpreting the code. The $password should return, as he stated it is just initializing the $password variable, which is what you should do. But back on topic. What is going on? Are you updating with a new password, but yet you cannot login with that password. Right? Have you tried and trim the password variable that comes from the login form before checking it against the DB? Are you using the MySQL MD5 function for the checking against the DB? Or the PHP, as they may return different variables. You need to be consistent with those. EDIT: Given this code: $query = "select * from student where StudentUsername ='".$dbuser."' and StudentPassword = '".md5($dbpass)."'"; Try this instead: $query = "select * from student where StudentUsername ='".$dbuser."' and StudentPassword = MD5('". $dbpass ."')"; And see if it lets you in. If that fails, try this for trimming the variable then checking: $dbpass = trim($dbpass); // remove extra whitespaces that may come. $query = "select * from student where StudentUsername ='".$dbuser."' and StudentPassword = MD5('". $dbpass ."')"; EDIT EDIT: The basic gist, stick with either the php md5 or the MySQL, do not mix and match as they will most likely yield different values. Stay consistent.
  3. Google is always your friend. If on *NIX cron is the way to go. If on M$ then Scheduled Tasks would be the equivalent.
  4. Browser should not matter, unless it is set to deny cookies. As session's use cookies. Check your browser settings.
  5. premiso

    Array

    $temp[] = $row["Temperature"]; Should do it.
  6. Not worth it. I have a reseller account and it is a pain to maintain and keep up with the customers etc. That and you have to charge enough to get back what you paid, and a lot of times it is tough to fill that demand. Especially with the free/cheap hosts out there. That is my opinion.
  7. mysql_num_rows is that what you are looking for?
  8. //$bg = '#eeeeee'; // Set the background color. while ($row = mysql_fetch_array($result)) { // no longer needed with the score choosing $bg = ($bg=='#eeeeee' ? '#ffffff' : '#eeeeee'); // Switch the background color. echo '<tr class="' . changeCssScore($row['score']) . '"> <td align="left">' . $row['player'] . '</td> <td align="left">' . $row['school'] . '</td> <td align="left">' . $row['score'] . '</td> </tr> '; } echo '</table>';
  9. Are you including the class before you try and run the query in main.php?
  10. if (isset($_SESSION['myusername'])) {
  11. preg_match is one way. Javascript would be another, granted JS could be disabled.
  12. I would agree, but most of the people who play WoW have friends who play and meet up with them and help them. That is the real "attractant", at least to me to WoW. The social portion of it. In the 10 days, however, you can get to a decent level (if you play 5-8 hours a day with a guide you can even get to Level 70 if no level cap (which there probably is)). But yea, that is probably the worst part of WoW. 80 levels is hard to achieve from level 1 and takes a normal person 1-3 months to do...per character. If they made a way to start at a higher level for any toon, that would be good. I know the new toon Death Knight starts at Level 55, but that is only 1 of those per server and must have a level 65+ character on the server. 55 is better, but it would be nice to start any character, once you reached 65+ at that level and not just Death Knights. But yea. That is a major down fall if you ask me. A 30-day trial would be much better.
  13. You just cannot have a re-declaration of the function. If that page is included twice, and needs to be included twice on the same page, yes. It would be better to create a functions file and include that once at the top of the page so that function is accessible. Alternatively you can define the function declaration inside of an function_exists if.
  14. round should do it. Set the mode to PHP_ROUND_HALF_UP and it should work like you want, but that is the default I believe so it is not necessary to specify it.
  15. I am sure it is still true. But that does not mean that D3 will be free to play online...I mean I bet they will make it a subscription service. As far as WoW sucks from jackpf. Do you think a 10 day trial period of your low level character give you an actual idea of the game? Doubtful, most low level toons are alternate characters and all those people care about is getting their toon to level 80 as fast as they can to do those PvPs. As they say, you do not judge a book by it's cover. But WoW is not for everyone as well, I am just simply saying, you cannot get the full experience from a 10day trial, especially without a higher level toon to try it on.
  16. I would suggest, if you are happy not playing them, not to start. Especially with WoW...very addictive and once you reach the end there is nothing to do but get better gear and gold and buy nothing. Wasted 8 months on that game and a couple hundred dollars. Finally got away from it. However, D3 maybe worth playing. Looks pretty awesome, as long as they do not make it like WoW and try to milk the money out of it. WoW has just become a massive money maker for Blizzard, and I doubt they will ever add more substance to it that is actually worth playing. Basically WoW is now just a large social network you pay $15 a month to join and play. Anyhow end of my WoW rant
  17. I had a syntax error in the revision I did: $message = "FName: {$_POST['first_name']} \n LName: {$_POST['last_name']} \n Message: {$_POST['message']} \n\n"; Replacing that line should fix it.
  18. You are using it in a class. It has to be defined by that class. $what = new whatever; $what->serVariable($a); $what->init(); class whatever { private $a; function init(){ echo $this->a; } function setVariable($a) { $this->a = $a; } } Would give you the correct output. If you made $a global in the function init, it will probably work without doing the setVariable part.
  19. You would have to format the date using MySQL's date format to remove the hours/minutes. Then use the NOW() and format that to use only the date as well.
  20. Or if the user wanted to use weird characters like Ô or / or " or ' or ; or Q@!$#^%()_+=| It sucks to be vague, as you get what you ask for.
  21. Have you looked for a plugin that already does this? Wordpress Adwords Plugins
  22. PHP Basic Database Handling Tutorial
  23. Yea, we all cannot be as perfect as CV I guess
  24. Are you just testing this using AJAX at the moment? If you are I would really create a form that mimics the ajax but actually does a page reload. This way you can see any errors coming out and once you get that script working with a regular form allow the AJAX to use it. Otherwise it is a pain in the butt to debug. I am not sure what is causing it to fail, but I would add this in and test it: $res1 = mysql_query($sql1) or die("SQL WAS: {$sql}<Br />Error was: " . mysql_error()); And see if the insert has an error or issue with it.
  25. Yea, lol I forgot about that too. I was actually looking for it, but my mind must of just glossed over it
×
×
  • 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.