Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. Anytime you do a query you can debug it with this: $query = mysql_query($sql) OR die('Error: '.mysql_error().' with query: '.$sql);
  2. What is the problem? What are all these bits of code?
  3. We don't do homework let alone exams. Where are you taking a class in PHP?
  4. Yeah, but the next part of the code isn't. So it looks like it's not entering the IF.
  5. What's with the closing bracket after your mysql_query line? If it's within a conditional statement it's probably not being run.
  6. Did you get any errors? Post the new code including the SQL and query code.
  7. You have errors in your SQL, which you'd see if you had debugging or error checking. Try this: <?php $sql = 'SELECT houses.*, userregistration.* FROM houses, userregistration WHERE houses.HouseID ='.$row['HouseID'].' AND userregistration.UserID='.$_SESSION['Current_User']; //Do print $sql; here to preview your query. your first on has a TON of errors. $FindHouseRents = mysql_query($sql) OR die(mysql_error().' with query: '.$sql); ?>
  8. if ("$attackroll">"$defendroll") You're comparing strings here. Take out the quotes around them to compare numbers.
  9. Add this to the top so you can see the errors: ini_set('display_errors', 1); error_reporting(E_ALL);
  10. http://www.google.com/search?q=php+short+tags&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a Short Tags may not be on by default, so use <?php, not <?
  11. If you're going to use mod_rewrite soon, why are you worrying about this?
  12. Save them into an array. while($en = mysql_fetch_array($mp3user)) { $mp3IDs[] = $en['mp3_id']; echo "<li>MP3 " .$counter. " : <span id=\"mp3title-".$counter."\">".$en['mp3_title']. "</span> | <a href=\"process_mp3.php?user=" .$en['mp3_userid']. "&mp3=" .$en['mp3_id']. "\">Delete</a></li>\n"; $counter++; } ... foreach($mp3IDs AS $mp3ID){ echo "new Ajax.InPlaceEditor('mp3title-1', '/process_mp3.php?mp3=" .$en['mp3_id']. "');\n"; } etc. Or you could make a big string of the Ajax code in the while loop and print it later.
  13. When I read it the first time I read it the way you saw, then I read it again and thought it was different. Gah. *headdesk* I had it right
  14. HoboWars doesn't allow people to transfer money on the same IP. If they're doing it once, they don't care. If they do it too many times, they stop it.
  15. if($date != '0000-00-00'){ //Added }
  16. Your use is right by PHP - it's MySQL that has a problem. SeatVers=". $row['SeatVers'] ." group Needs to be: SeatVers='". $row['SeatVers'] ."' group Note the single quotes surrounding the variable. That makes it a string in SQL. Even though you close the PHP string, you're starting a MySQL string and then closing it around the variable.
  17. echo '<br /><a href="editcurrent.php?id='.$row['id'].'">Click here to edit</a>'; Variables inside single quoted strings will not be seen as variables.
  18. It helps if you use more arguments in mail(); mail($to, $subject, $message, $headers, '-f'.$from);
  19. That should have affected firefox too... If you mess up the HTML it's not the browser's fault. It's the code...
  20. how can it return if it's not inside a function? If you really want it to return a value make a function. But you have to use the if else construct, like I said. It's the same thing, just with the PROPER statements.
×
×
  • 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.