Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. What I wrote won't return an error either, and it's shorter :-P
  2. Did you try it? I would just take it out of the $_POST for later use, $password = md5($_POST['password']); But why are you asking us if it's possible if you read it and could easily test it?
  3. mkdir, copy, etc. Did you try looking in the manual before asking? It's incredibly smart. I can type php.net/makedir and it will correct me to mkdir(). Try searching it for obvious things before asking
  4. m is month, i is minutes. Read the docs.
  5. I think that's ADODB. It's not standard, as it's not built-in... What do you call to create $database?
  6. How do the cookies and session ever start though? This is a bit insane. I hope someone with a longer temper comes to help you. Good luck.
  7. No, I didn't write your login form either. How does the system check if a username and password are right? That's what you need to check I guess.
  8. Does that look like code? I mean, you can write code which looks pretty similar to english, but that contains no variables, functions, or operators. It's just English.
  9. What doesn't work? Errors, what? The fact that if (login is valid) isn't actually code? We can't help you unless you describe an actual problem, not just a vague problem.
  10. check if they are logged in on the page, and if not, send back. It depends on how you're doing your "login"
  11. It would help if you showed us some code.
  12. "SELECT * FROM testimonials ORDER BY rand() LIMIT 1"
  13. don't do stripslashes, use nl2br and then stripslashes.
  14. Take out the freaking bool. bool is what it returns, that's what the manual says. You don't type that when you call it.
  15. add this ?><pre><? print_r($_POST); ?></pre><? before here: $firstname = $_POST['bio_fname']; And tell me what it prints.
  16. No, like how you did before, but add those other two arguments. setcookie("preuserID", $preuserID, $expire, '/', 'net-petz.com');
  17. Add the path and domain as well "bool setcookie ( string name [, string value [, int expire [, string path [, string domain ..." Path is '/' and the domain is 'yourdomain.com'. Try that. And don't surround vars in "" when you don't need them.
  18. It's PHP, not PhP. Books are awful for learning programming languages. There are tons of great tutorials, but the best way is to just get started. Draw out a structure of how you think it should work, then start programming! When you run into errors, then we can help.
  19. So like poco said, you need to fix your UPDATE.
  20. The code says nothing about 'factories'. Are factories a seperate table? If so, you need to edit your query to get all players who have a record in the factory table. You haven't provided us enough info. Plus, poco is right, your updates are wrong ;)
  21. Nhoj is right. A more effective way of writing all that is: [code] <?php echo 'Setting number of apples to 1.<br>'; $apples=1; echo "Number of apples: $apples<br> Adding 3 more apples.<br>"; $apples = $apples + 3; echo "Number of apples now: $apples<BR>"; ?> [/code] OR: [code] <?php echo 'Setting number of apples to 1.<br>'; $apples=1; echo 'Number of apples: '.$apples.'<br> Adding 3 more apples.<br>'; $apples = $apples + 3; echo 'Number of apples now: '.$apples.'<br>'; ?> [/code]
  22. Did you try it? To format a date from MySQL's date format with date(), you do have to use strtotime() date("Y-m-d", strtotime($date)); If you're working with the empty date, your strtotime() will result in 0, resulting in date thinking it's in 1970, the Unix Epoch. Formatting it using date() won't do you any good.
×
×
  • 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.