Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. today: $sql = "INSERT INTO table(field) VALUES(now())"; Don't use a variable, just do now() plus a year $year = time()+(60*60*24*365);
  2. You should probably change the name to description so you don't keep having this problem in the future. Best of luck.
  3. Wow, three hours. I'm amazed you're not an expert by now. If you don't have the time to learn, and you absolutely need something done, you hire someone else to do it for you, who HAS devoted the time and energy to learning.
  4. DESC is an SQL keyword, you can't use it for a fieldname unless you escape it with `desc`
  5. You probably have a javascript error, can you post a link?
  6. It means there is no value to that array. before while($file = @readdir($dir)) add $sprite_images = array(); And take off all the @s so you can get the errors from readdir and other functions. There's your problem.
  7. When the user logs in, do $_SESSION['username'] = $username; <-- whatever the hell your username variable is, don't just copy and paste. Then use the code cage posted. Put session_start() on the top of every page.
  8. No one is going to do it for you. Save the username in the session so you can use it on later pages.
  9. That was my point, you'll need to adapt it for your code. Once the user is logged in, where are you storing their username? Use that.
  10. Yes, you can only have PHP code on PHP pages. You'll obviously have to adapt the code to your variables.
  11. if($username){   print $username; }else{ ?>form here<? }
  12. It won't do much good for anyone to have his user/pass when the database is local, but it is a good idea to remove it. Looks like the passwords are hashed. Where is the code in which you insert the password?
  13. [quote author=jesirose link=topic=124327.msg514894#msg514894 date=1169928332] Where's the code where you define $user? [/quote] I meant show us the code, not show me the file where it runs. I can't help you without seeing the code.
  14. You're not even using fgets in this code. Is this even the right file?
  15. switch($k){   case 'news':     include ('news.php');     break;   case 'bob':     include ('bob.php');     break; }
  16. Where's the code where you define $user? Do you have register_globals on?
  17. You can't use the -> operator on a non-object. What is $tnode supposed to be? A "Text Node". What is that? $element=$tnode->createTextNode("michelle"); Where is the function createTextNode defined?
  18. Because they're strings, they're sorted as strings, which is correct. You could get all of them into an array, take out the $, and sort the numbers in PHP. Then add on the non-numeric ones at the end. If you post some of your code, we can help you edit it, but you should try on your own first.
  19. That's called CAPTCHA - if you google it, there are tons of premade ones.
  20. You need to use HTML. A new line in html is [code] <br /> [/code]
  21. The one I posted for you will, yes. If you need to format time from a timestamp into mysql datetime format, just use date(); so say you want to put yesterday's date in the db. $yesterday = time()-(60*60*24); $str = date("Y-m-d H:i:s", $yesterday); $sql = "INSERT INTO table(yourDate) VALUES('$str')";
×
×
  • 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.