Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. Your code says if the price per lb at $i is less than 0, the price is the price per lb at $i. Is that what you want it to say?
  2. It looks like you're doing an if else. If it's 0 do one thing, otherwise do another. The same logic applies if you want to do if it's not 0, do that other thing, otherwise do that first one.
  3. Try if it's > 0. PHP will convert it for you,
  4. This can't be your actual code, it has significant syntax errors. Before this code, add print_r($pricelb); and see what you get.
  5. If you just randomly put code in and don't know why or what it does, you won't get very far.
  6. What is $string? You'll only find '' in $string if $string == ''; stristr will also NEVER return true. What are you trying to do?
  7. Still wrong. He's defined died as a function. He can call it fred for all he wants, it's his function.
  8. What is the exact URL you see for the page the style comes from? Firebug is not always 100% on these things in my experience. When you view the source, what files are being included for styles?
  9. *buzzer sound* You cannot override existing PHP functions. As for the problem, "it's not working" is useless to us.
  10. I would assume they'd do it the easy way and just record the license information in their own db, and update it when they get a new license.
  11. The $num_rows == 1 is only HALF the error. The comments say check if the username exists, but that's not what the code is doing.
  12. In wordpress, you can edit the theme and you'll see a file that ends in .css The syntax is body{ color: #000099; } Not sure if you're trying to do text or background.
  13. Use code tags when you post here. Your form does no error checking on your queries. Also this part is going to cause problems for you in the future. Think about what you said you're trying to do here. $query = "SELECT * FROM user WHERE username = '$username' AND password = '$password'"; $result = mysql_query($query); $num_rows = mysql_num_rows($result); //check to see if the $result is true if ($num_rows = 1){ $errorMessage = "Username already exists"; }
  14. Not if one book can have two authors. There should be 3 tables, since an author can have 1+ books and a book can have 1+ authors. authors author_books books
  15. You did not assign the actual query to a string. $sql = "SQL here"; $result = mysql_query($sql) or die("$sql: ".mysql_error());
  16. No problem. I just made a page on my localhost with the code and played with it till it worked, some of those tree traversals are tricky.
  17. So if "SMELL OF SMOKE AND ALARM OPERATING" is a predetermined message, can you get the list of all possible messages, then just take whatever comes after one of those list as the address
  18. Then reply to him and tell him you can't set it.
  19. Are the alerts always the same text or a set of pre determined messages before the address?
  20. $('#container .top').children('.sub:first-child').addClass('selected'); That works for me. Make sure you change container from . to #
  21. try $('.container .top).first('.sub').addclass('selected'); If that doesn't work you may need to use each();
  22. You'll have to put a div around them, set it's width, and then give it a margin of 0 auto;
×
×
  • 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.