ober
Staff Alumni-
Posts
5,327 -
Joined
-
Last visited
Everything posted by ober
-
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.
-
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/
-
Beautiful post. That's the best analogy I've heard so far.
-
phpDesigner2008 for me. I'm with Daniel on the pros of an editor as well. It makes me faster.
-
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.
-
$pagenum must be 0. You can't have a negative in a limit.
-
<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...
-
Remove the <script> tags, otherwise, yes.
-
Save the JavaScript in a .js file and echo something like this: <script type="text/javascript" src="whatever.js"></script>
-
If you comment out from the $query to the end of the while loop, do you still get it?
-
This just keeps getting worse. I think the problem is with your design, not with our methods.
-
That code looks fine. Are you sure that error isn't coming from another part of the page?
-
Damn... missed that. Good catch.
-
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).
-
What version of MySQL? MySQL 4 doesn't support subqueries, which is what you are trying to do.
-
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.
-
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?
-
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.
-
That's just inefficient... not to mention that wasn't what the OP was looking for.
-
$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.)."'";
-
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.
-
$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().
-
$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.