Jump to content

ober

Staff Alumni
  • Posts

    5,327
  • Joined

  • Last visited

Everything posted by ober

  1. I do. Bunch of hard-line, right-wing, state-arrogant folks. Everyone from Texas thinks that they are better than anyone else from any other state. Most of them are also very close-minded in terms of progressive thinking on social matters. My experience is based on the fact that my company has a office in Texas and I've been dealing with them for close to 3 years now. I've actually been to Texas about 20 times and the mindset seems to be spread across towns, so it's not limited to the small amount of people I deal with. Granted, most of them are nice people... they just have their own way of doing things.
  2. You cannot force a page to print to specific dimensions unless you're using something like an ActiveX control or something. Also, if your page width is greater than the average piece of paper (8.5x11), it's not going to print properly. The best thing to do is to have a "screen" stylesheet and a "print" stylesheet so that you can restructure the page for printing. Here's a good article: http://www.alistapart.com/articles/goingtoprint/
  3. Beautiful post. That's the best analogy I've heard so far.
  4. phpDesigner2008 for me. I'm with Daniel on the pros of an editor as well. It makes me faster.
  5. You're probably using "setcookie" after you've already sent something to the browser. That function has to be used before any HTML is written or PHP outputs anything to the page.
  6. $pagenum must be 0. You can't have a negative in a limit.
  7. Right.
  8. Screw flash...
  9. <div align="left" style="margin-bottom:15px;"><img src="templates/bcrc/images/latest_news.png" alt="" /></div> <?php // no direct access defined('_JEXEC') or die('Restricted access'); $query = "SELECT title, introtext, created FROM jos_content WHERE state=1 AND sectionid=1 AND catid=1 ORDER BY ordering"; $content = mysql_query($query); if($content && mysql_num_rows($content) > 0) { while ($row = mysql_fetch_assoc($content)) { echo "<p>".$row['title']."</p>"; } } echo '<p>'.$params->get('catid').'</p>'; Time to go error trapping...
  10. Remove the <script> tags, otherwise, yes.
  11. Save the JavaScript in a .js file and echo something like this: <script type="text/javascript" src="whatever.js"></script>
  12. If you comment out from the $query to the end of the while loop, do you still get it?
  13. This just keeps getting worse. I think the problem is with your design, not with our methods.
  14. That code looks fine. Are you sure that error isn't coming from another part of the page?
  15. Damn... missed that. Good catch.
  16. You cannot DECRYPT the value in your login script. Here's how it works. 1) User provides password. 2) You insert the plain text password into database but you md5 it first: INSERT INTO Student (StudentUsername, StudentPassword) VALUES ('$user', '."md5($password)."') 3) User tries to login with their plain text password: $query = "select * from student where StudentUsername ='".$dbuser."' and StudentPassword = '".md5($dbpass)."'"; So once again, it is taking the plain text password and running md5 against it to compare it to the md5 value in the database. md5 = md5 is the comparison. Also, make sure that the password field can hold an md5 length value (32 characters).
  17. What version of MySQL? MySQL 4 doesn't support subqueries, which is what you are trying to do.
  18. mysql_query("SELECT * FROM tbl WHERE field IN (".implode(',', explode('-',$myvar))."); That should do it. I didn't test it but I'm pretty sure that will get you what you want without all that extra garbage.
  19. Sorry about the extra period. I was moving too fast. The difference is that your query would have said: $query = "select * from student where StudentUsername ='John' and StudentPassword = LONGSTRINGOFCHARACTERS"; MD5 returns an alphanumeric string that must be surrounded in quotes, just like the username. What isn't working?
  20. mod_rewrite (Apache .htaccess change) will get you what you want. If there is only one example where you need to this and "home.php" doesn't exist, you could always create a custom 404 page.
  21. That's just inefficient... not to mention that wasn't what the OP was looking for.
  22. $query = "select * from student where StudentUsername ='".$dbuser."' and StudentPassword = md5('".$dbpass."')"; There is your problem. $query = "select * from student where StudentUsername ='".$dbuser."' and StudentPassword = '".md5($dbpass.)."'";
  23. mysql_query("SELECT * FROM tbl WHERE whatever IN (".implode(',',$myvar)."); Note: if your array values are strings, you'll need to implode with quotes around the pieces.
  24. $data = mysql_query("UPDATE profilePics SET def='0' WHERE filename= (SELECT filename FROM profilePics WHERE usrID='$usrID' AND def='1'")) or die(mysql_error(); All you have to do is count. The "or die" part never gets passed to mysql_query().
  25. $query = "SELECT master_serial, charger, battery, abc, dc1, dc2, radio, network, sr2_1, sr2_2, sr5_1, sr5_2, ethernet FROM activecontrol WHERE master_serial='$id'"; When it contains a number and character, it is a string. Strings have to be surrounded by quotes.
×
×
  • 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.