Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. Take out all the @ so you can get some errors.
  2. $dbc = @mysql_connect (DB_HOST, DB_USER, DB_PASSWORD) OR die ('Could not connect to MySQL: ' . mysql_error() ); Try not surpressing the error so the or die can actually be reached. $dbc = mysql_connect (DB_HOST, DB_USER, DB_PASSWORD) OR die ('Could not connect to MySQL: ' . mysql_error() );
  3. The colors of the code give it away - see where you used "none" - that needs to be 'none'. Same for all those ""s Also, you don't need to submit null columns, just leave them out of the query.
  4. You answered your own question there... they can't just as easily use it because it's already being used...
  5. As long as you mark the fields user and item indexes, it won't be "checking", you'd just select * where user = $user. There are probably other solutions, but it seems more normalized than a big field of comma separated items.
  6. $header = 'From: Bob <bob@domain.com>';
  7. What are the results of the query? I suspect it has something like player 1 and player 2 - you're only ever getting player 1, because you always get $row[0]. You need to get that other player's ID. Without seeing the actual results I can't help anymore than that
  8. Which is why I said you need to look at the results of the query where you're trying to get the player ID. Use the same technique on your result9.
  9. So don't you see why the name is the same? You're just selecting the same player ID over and over. So the problem lies here: $result9 = mysql_query("SELECT * FROM scores WHERE (eventid = '$eventid' AND round = '2' AND complete = '1') ORDER BY gross ASC") ; while($row = mysql_fetch_row($result9)) { Where you get the $playerid. Do the same thing with that row and figure out why you keep getting 1 instead of 1 and 2.
  10. I forgot my code tags: print '<pre>'; while($row = mysql_fetch_array($result10)) { print_r($row); }
  11. instead of: ini_set('error_reporting', E_ALL); do: ini_set('display_errors', 1); error_reporting(E_ALL);
  12. Are you even reading what they're saying? Let's see. They've already posted code 3 times. Edit: I didn't see page 2 But still.
  13. There is a stickied topic about this. You can't print HTML before session_start().
  14. you can do it in php using strtotime() and date() or use mysql date_format: http://dev.mysql.com/doc/refman/4.1/en/date-and-time-functions.html
  15. You still get no errors? Are you actually connecting to the db?
  16. "What I want is to have the Not appear after DIVs (and other SPECIFIED BBcodes, not all)." It's hard to help because it's not clear what you want. "Maybe if there is a way to check if the line trimmed ends with ]" Check out substr, strrpos, etc.
  17. it might help to use mysql_fetch_array so you can have more readable variables. Do this: print '<pre>'; while($row = mysql_fetch_array($result10)) { print_r($row); } And show us what you get?
  18. The page is just code.php. When you link to the page, you make the link have show=1. Are you being serious? I think you're having a joke at us at this point. You've spent at least a week on how to do a query string...
  19. Yeah...2000 will get you a degree...at which accredited school? Just one semester with only 4 classes at a public university is costing me 3000. That's in-state. Now do that 8 times. It's way more than 2000.
  20. I concur To correct typos like that you could just use a list of common typos.
  21. I am studying for the exam - I got two study books and I did a practice test. The practice test was much harder than the book led me to believe it would be. The training however, is much too expensive for me to consider, so I'm not going to do it - if you do, please let me know how it goes. When are you planning on taking the exam?
  22. echo rand(0,100); echo "% compatible!"; $number = rand(0,100); You're getting two different rand() numbers. So they won't be the same. $per = rand(0,100); echo $per; if($per< 50){ }else{ }
×
×
  • 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.