Search found 11 matches

by chris22
Fri Oct 03, 2003 12:01 pm
Forum: PHP - Code
Topic: not staying logged in
Replies: 3
Views: 797

You're doing waaaaay too much work with cookies. What for? Use sessions instead. That's one temporary cookie that goes away automatically when the browser is closed and handles all of your user specific variable needs. Set only one permanent cookie with the information necessary to automatically sta...
by chris22
Fri Oct 03, 2003 11:35 am
Forum: PHP - Code
Topic: Is this an error? Can someone else test?
Replies: 5
Views: 1279

Let me guess. Using Internet Explorer to download? There's hundreds of problems with IE regarding the headers. For instance, IE users can't download zip files (maybe its all files? I forget) from an https site (using sessions), no matter what headers are set. Try another browser and see if you get t...
by chris22
Fri Oct 03, 2003 11:15 am
Forum: PHP - Code
Topic: Not showing nulls.....HELP
Replies: 16
Views: 2122

Re: Not showing nulls.....HELP

<?php // snip echo '<td>'; echo '<H2>'; echo $physicians['title']; echo '.<b></b> '; echo $physicians['first_name']; echo '<b></b> '; echo $physicians['last_name']; echo '<b></b></H2> '; // snip ?> What's with all of the extra junk tags? Those bold tags aren't doing anything, just get rid of them! ...
by chris22
Sat May 10, 2003 9:42 pm
Forum: PHP - Code
Topic: Can not access Global Vars inside a function?
Replies: 2
Views: 634

<? // don't need to global it here, its already global. // don't need to "initialize" variables like in C, just set it. $USState = array(); // always quote named indexes, otherwise it throws a low level error $USState&#1111;'name']&#1111;0] ="AL(Alabama)"; $USState&#...
by chris22
Wed Apr 30, 2003 3:16 pm
Forum: Databases
Topic: IDENTITY_INSERT error?????
Replies: 2
Views: 1869

Don't insert into the auto incrementing field. Just leave it blank and it will automatically auto increment.
by chris22
Thu Apr 24, 2003 11:11 am
Forum: Javascript
Topic: HREF="JavaScript:....... Help!
Replies: 9
Views: 3651

Re: HREF="JavaScript:....... Help!

NEVER NEVER NEVER do this!!!
Gen-ik wrote:

Code: Select all

<a href="JavaScript:document.getElementById('bob').src='newbob.php';">change bob</a>
The correct way to do it:

Code: Select all

<a href="url_for_no_js.html" onclick="return js_function()">
by chris22
Thu Apr 24, 2003 11:02 am
Forum: Databases
Topic: Variables in a sql row?
Replies: 12
Views: 1397

by chris22
Wed Apr 23, 2003 1:04 pm
Forum: PHP - Code
Topic: Functions within functions: Setting variables
Replies: 6
Views: 789

$this->color didn't work, so I wanted to simply try color. Of course it isn't going to work. $color isn't defined when you're setting the class' $color property. First off, OOP is supposed to be abstract. When you're setting properties to specific arbitrary request variables, you're losing the abst...
by chris22
Wed Apr 23, 2003 12:42 pm
Forum: Databases
Topic: Variables in a sql row?
Replies: 12
Views: 1397

Why exactly are you wanting to store variables in a database?

If you're really desperate to put php code (variables) within a database, you might want to try the eval function. However, it is a pretty big security risk.
by chris22
Wed Apr 23, 2003 12:35 pm
Forum: Databases
Topic: mssql/error_reporting problems
Replies: 2
Views: 991

Have you looked into custom error handlers ? I would also like to point out that an empty string ($php_errormsg) is not the same as null. If you're going to check for nullness, you have to set it to be null. Otherwise, I can't figure out exactly what your problem is. What exactly is raiserror suppos...
by chris22
Tue Apr 22, 2003 9:45 pm
Forum: Databases
Topic: Mysql Order By Problem
Replies: 1
Views: 993

Sounds like the field you're sorting on is not a numeric field. The character 1 comes before 9 in the "ascii alphabet". Try changing your field to a float or int.