Jump to content


Staff Alumni
  • Posts

  • Joined

  • Last visited

Everything posted by ober

  1. Sorry, I meant to put UPDATE, not INSERT. My syntax is correct otherwise... see corrections above.
  2. if ($num != 0) { // A matching row found (thus the name/pass found) - authenticated session_start(); list($efirst_name) = mysql_fetch_row($result); $_SESSION['user'] = $eemail; header("Location: calendar.php?msg=Logged In"); } else header("Location: login.php?msg=Invalid Login");
  3. http://www.phpfreaks.com/tutorial/php-basic-database-handling
  4. <?php if (isset($_GET['msg'])) { echo "<div class=\"msg\">".$_GET['msg']."</div>"; } ?> When they get redirected, do you at least see the error message in the URL?
  5. Please show us more of the code so we can understand it better.
  6. You can't do "AND" in an insert. $sql = "UPDATE tablexyz SET value1 = '$x', value2 = '$y' WHERE id = '{$mem['id']}' or die(mysql_error());
  7. 1) Don't use short tags, maybe your server doesn't recognize them. Short tags are <? anything ?>. Use <?php whatever ?> 2) If this is truly an HTML file, file.html or file.htm will not process PHP unless the server is setup to do so (not likely). Make sure the file is called "file.php".
  8. There has to be more to it than that. Your array is $ddiArray2, but you are trying to sort "$dataArray"... ???
  9. You're joking... right? Tell me you're joking. Please. I don't want to delete this thread only because it's really the most ridiculous question ever.
  10. nah man, don't be seduced by that line of reasoning. After nuclear fallout, there'll be zombies everywhere. You can't be running from them when you're all fat and shit. They'll just catch you and eat you and take forever to do it and you'll just have to sit there all that much longer. BWHAHAHAHA... I should read the misc board more often. QUOTED!
  11. I'm surprised that one even works. You should have single quotes around 'yes'. Don't use empty, it is generally bad practice. Did you know that the string "0" is considered empty? Use: if($weight != '') { // whatever } And for God's sakes, clean your data!
  12. Store a "logged in" variable in your session or cookie (wherever you store you login info). If the user is not logged in, redirect (header) the user to the login page and store the link they were going to in a field on the login form. When they login, redirect them again to the page they were going to.
  13. Well, you don't have to echo the variable per-se... just set it to a class variable and then: print_r(get_object_vars($class), true); After the class is initiated.
  14. Is it not doing that right now? What you have looks ok to me.
  15. So if you take the quotes out, does it work? Can you echo the contents of what is passed to see if it is actually getting anything?
  16. You are probably opening the new site "within" the old site. Make sure that you either break out of the frame or open the new site in a completely new page. Also keep in mind that frames are completely client-side and should not affect session handling. The only problem would be is if you include or open a page within a page where sessions are already started.
  17. One more thing... move session_start out of the constructor. SESSION is a global array. I would never start my session inside a class, but that's just me.
  18. The value is being passed to the constructor.
  19. if(!include("$settings_file")) Should be: if(!include($settings_file)) No quotes... it's a variable, not a string.
  20. 2 things: 1) Why can't you use if-else? 2) If you're going to use LIKE in your SQL statement, surround the value with %: $query = "SELECT * FROM $table WHERE student_number LIKE '%".$_POST['txtSearch']."%'"; If this is a school assignment and you can't use if-else, you're probably looking for the ternary operator: http://us.php.net/operators.comparison
  21. You'll want to look at the count function to determine how many elements are in the array which will then allow you to determine which links to show. You'll also need to read $_GET['art'] to determine the page you are on.
  22. It is impossible to go from the form with the right value to the processing with the wrong value, so you are obviously passing the wrong ID.
  23. ".$board0['posts']." Why is there a 0 in there?
  • 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.