Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. then your username is 'root', and your password is ''
  2. $username = $myrow['member_username']; return $username;  //Add this line here. Did you really read the link ?
  3. Don't fucking yell at us. If your problem still isn't fixed, obviously you're not explaining it well enough. Chillax and come back when you can communicate with us.
  4. And to catch these errors earlier, do: $result = mysql_query($sql) OR die(mysql_error());
  5. Why don't you try to write some first and then we'll help when you get stuck. You'll need to use if($condition){ //do }else{ //do this }
  6. No, that would mean he doesn't have the function on that page. See the !
  7. This indicates really poor design - your functions should be in a library file, and included on every page, so you don't HAVE to check if you've included the function on that page.
  8. You could do it on a scale. The more money they have, the more interest they get. So 1-1000 gets 1%, 1000-5000 gets 1.5%, etc.
  9. So here's the ways the word 'and' could appear. "and she said" "bob, fred, and jean" "toppings and" "Andy Smith" "My rock band is awesome!" "My rock band" So, you basically want to block " and" and "and ", but not "band ". So, search for instances of "and " and check what's before it. If there's another letter before it, it's not really and, it's something else. If there's nothing there, it's the first word, and remove it. Same concept for "and ".
  10. Off topic, but why are you giving random amount of interest? If my bank did that, I'd get kind of annoyed.
  11. print $_SESSION['myemail']; session_register is deprecated, use $_SESSION['myemail'] = $email; instead.
  12. I only watch during the first few weeks when they all suck :) But congrats to your friend. I'd like to audition, but I'm not very confident.
  13. It does it automatically. "mktime() is useful for doing date arithmetic and validation, as it will automatically calculate the correct value for out-of-range input. For example, each of the following lines produces the string "Jan-01-1998"." http://us2.php.net/mktime Read the examples Shogun and Jay.
  14. I was copy and pasting code you had picked out. Change $articles = mysql_query("SELECT id, title FROM NewsItem WHERE Members_id = '".$Members_id."'"); To $articles = mysql_query("SELECT id, title FROM NewsItem WHERE Members_id IN ('".implode(',', $Members_id)."')");
  15. Members_id = '".$Members_id."'"); If $Members_id is an array, this will show Members_id = 'Array"); You need to do Members_id IN ('".implode(', ', $Members_id)."')");
  16. print_r() is for printing arrays. Is $Members_id an array? What happens if you do print $members_id instead?  What does it print out?
  17. Um, in all fairness, my system (my laptop, not a dev machine) is also "Windows XP Professional Version 2002" Most people wouldn't think to include that year number on the end, and it won't make a difference. He's using XP Pro,
  18. tldr; You can break out of PHP to write your html. <?php code(); ?> <html> <?php moreCode(); ?>
  19. That's a timestamp, you need to then use the date() function on it. Ted, I'm actually impressed. I didn't check it very thoroughly, but looks good. Nice job.
  20. I've found that converting to an OOP style has made my code much faster to write and easier to maintain. It has really helped me to think in terms of objects. It was also a great way to get my SQL out of all the pages. So whenever I want to list a user's info, and say I add new info, such as letting them add their AIM screen name, now I only have to update one function and every page reflects it. Yes, you can easily do this with regular, non-class functions, but when writing, it's a lot easier to think "Oh, the user class has a getInfo() function, I use that here, instead of writing the sql here. As for the speed - I entered the game contest here - I wrote my site in 2 days. Now, I'm still adding a few features, but I wrote a game that exceeded the critera in a few hours. Let's say 5. Partly because I already had a few classes I was able to port over quickly, and partly because just the way of thinking has made everything faster for me.
×
×
  • 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.