version
of PHP, using PHP as a module is a bit more involved,
but still very simple)
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
-Original Message-
From: Mac Ne [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 05, 2002 3:17
Ahhh! quote that ID number before using it in a query! :)
// for mysql
mysql_quote($_GET['ID']);
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
-Original Message-
From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]]
Sent
available.;
}
echo br.This information retrieved frombr.a
href=\$theurl\$theurl/abr.on .(date(l jS F Y g:i a T));
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
-Original Message-
From: Anthony Ritter [mailto:[EMAIL
to all hell and back to
verify contents, i still quote. i'm paranoid. :)
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
-Original Message-
From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 05, 2002 5
... there are as many different
views on OO as there are programmers :)
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
-Original Message-
From: Henry Blackman [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 05, 2002 5:33 PM
To: [EMAIL
Since you didnt include the code for InsideClass, i can only
assume that you're probably getting errors becuase $bob
is not initialized anywhere.
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
-Original Message-
From: James
Try creating an .htaccess protected script, and do a
var_dump($GLOBALS) to see what vars are set, and if
any of them contain the name you logged in with.
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
-Original Message
As someone else suggested a few days ago: try using an IFRAME,
and refreshing it from javascript with the values you need.
The whole browser will not refresh, just the IFRAME, which
will give the illusion of jscript and php talking to each
other in realtime.
---
Scott Hurring
Systems Programmer
Normalization for some good
design pointers:
http://home.earthlink.net/~billkent/Doc/simple5.htm
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
-Original Message-
From: Hawk [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 05, 2002 6:04
Yes, but you really must realize how utterly easy it is to
POST bogus variables to a form (Save the page as HTML, edit,
load in browser, submit -- bingo).If you're using the
assumption these vars were POSTed, so they're safe, you're
begging for trouble.
---
Scott Hurring
Systems Programmer
change
the value and the MD5 hash to be the correct hash of
the new value and circumvent all your work.
(But then again, if you get anyone that's smart and
committed, it's just a matter of time before he will
figure out *some* loophole to subvert your forms)
---
Scott Hurring
Systems Programmer
Grab the PHP ZIP, unzip it, add it to your PATH. done. :-)
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
-Original Message-
From: John Taylor-Johnston [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 05, 2002 5:13 PM
Try: $ary[this] = array(that = 1);
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
-Original Message-
From: Chris Boget [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 1:48 PM
To: PHP General
Subject: Re: [PHP
in C, and flawed Double-byte char
support in IIS, to name a few recent and
better-known exploits.
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
-Original Message-
From: Adam Voigt [mailto:[EMAIL PROTECTED]]
Sent: Thursday
Javascript, being silly, has silly string rules:
function pop1($id) {
window.open(info.php?prod_id=+ $id);
}
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
-Original Message-
From: Chris Knipe [mailto:[EMAIL PROTECTED
every question,
especially when the questions aren't related to PHP,
or are really vauge or common or just plain silly :-)
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
-Original Message-
From: 1LT John W. Holmes [mailto
Nope.
For future reference, perhaps create two identical tables,
one for actual live data and one for trash, and instead of
deleting anything, just move it all into the trash table.
then, you can purge the trash table every few days/months.
---
Scott Hurring
Systems Programmer
EAC Corporation
In that case, split it up into two-steps, to only init the
array if you need to i'm not really sure how the rest of
your code is -- you could probably do this a nicer way,
but this will work:
if (!is_array($ary[this]))
$ary[this] = array();
$ary[this][that] = 1;
---
Scott Hurring
into bug hell.
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
-Original Message-
From: Jas [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 3:48 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: Anyone?
Ok, I think you
why it's not working if you don't check return
statuses
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 3:44 PM
To: [EMAIL PROTECTED
);
}
function cleanup($form)
{
// Only run once per instance
if ($this-cleanup_called)
return 1;
$this-cleanup_called = 1;
// ... do cleanup
}
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
-Original Message-
From
to getParentNodes:\n;
print currentBranch[$nodeName] = .
$currentBranch[$nodeName] . \n;
?
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
-Original Message-
From: Chris Boget [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002
I assume you're not checking the status returned by the
database function calls, becuase they'd probably give
you valueable information on *why* it's doing that. :)
try checking the return val, and (if using mysql) print
out mysql_error() if you get a bad return val.
---
Scott Hurring
Systems
)
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
-Original Message-
From: Robert [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 07, 2002 4:46 PM
To: [EMAIL PROTECTED]
Subject: [PHP] very simple eregi / loop question
How
Did you verify that the variables actually contain data?
They're probably empty, which is why they dont seem to
be passing correctly.
--
Scott Hurring
Systems Programmer
EAC Corporation
scott (*) eac.com
--
Kris Vose [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL P
Try (this is untested)
if (length($string) 30) {
print substr($string, 0, 30) ;
}
else {
print $string;
}
--OR-- (if you want to over-write $string)
$string = ((length($string) = 30) ? substring($string, 0, 30) :
$string );
--
Scott Hurring
Systems Programmer
EAC Corporation
This is completely off the top of my head (i've never done this
before) -- but try single-quoting it to prevent interpolation
register_shutdown_function('$this-cleanup()');
--
Scott Hurring
Systems Programmer
EAC Corporation
scott (*) eac.com
--
William_dw -- Sqlcoders [EMAIL PROTECTED] wrote
Well, IMO, the only languages that really need goto's are low-level
ones like assembly and C.
goto's are more trouble than they're worth when you get into
structured or OO programming.
--
Scott Hurring
Systems Programmer
EAC Corporation
scott (*) eac.com
--
Carlos U. Cirello Filho [EMAIL
();
$this-close();
}
function close(){
//close open sockets, etc.
}
} // End of class
function cRoute_Destructor($x) {
$x-cleanup();
}
// end of cRoute.inc
$test = new cRoute();
exit;
--
Scott Hurring
Systems Programmer
EAC Corporation
scott (*) eac.com
--
Sqlcoders.Com Programming
I think this is similar to what you're asking for, but it's
probably slower (you have to split(), traverse, then join())
foreach ($noiselist as $noise)
foreach ($inputlist as $input)
if ($noise == $input) // do something
--
Scott Hurring
Systems Programmer
EAC Corporation
scott
There's no way to for PHP to say Yo, let's ride... submit that form
Client-side manipulations must be done client-side, with
javascript or something similar.
--
Scott Hurring
Systems Programmer
EAC Corporation
scott (*) eac.com
--
Kris Vose [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED
, build a stronger backend.
--
Scott Hurring
Systems Programmer
EAC Corporation
scott (*) eac.com
--
Scott Fletcher [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi Erik!
This is my 2nd posting, not sure what happened to my first one. Sorry about
not see
a million things you could do, that's the beauty
and curse of knowing how to program... too many projects
and ideas, not enough time.
--
Scott Hurring
Systems Programmer
EAC Corporation
scott (*) eac.com
--
Jay Blanchard [EMAIL PROTECTED] wrote in message
002f01c229ba$a796a9c0$8102a8c0@niigziuo4ohhdt
or, more appropriately, use the database-specific escape function...
for mysql:
http://www.php.net/manual/en/function.mysql-escape-string.php
http://www.php.net/manual/en/function.mysql-real-escape-string.php
--
Scott Hurring
Systems Programmer
EAC Corporation
scott (*) eac.com
--
Martin
There's a problem with IIS and the rest of the world :-)
--
Scott Hurring
Systems Programmer
EAC Corporation
scott (*) eac.com
--
Brian McGarvie [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
OK This is a followon from my Browser thread... on [EMAIL P
Warning: Unexpected character in input: '' (ASCII=4) state=1 in
/usr/local/bin/php on line 3392
Warning: Unexpected character in input: '' (ASCII=27) state=1 in
/usr/local/bin/php on line 3393
Parse error: parse error, unexpected T_STRING in /usr/local/bin/php on line
3393
---
Scott Hurring
Systems
Try $answers[answer.$n]
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
-Original Message-
From: Jule [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 17, 2002 4:41 PM
To: [EMAIL PROTECTED]
Subject: [PHP] $answers[answer$n
Probably don't have the GD extension enaabled.
On a win machine, it's easy, look in your php.ini
and set the extensions_dir to where your extensions
are then un-comment php_gd.dll
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
Or why not just use include_once() or require_once() ??
That's their purpose.
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
-Original Message-
From: Paul Roberts [mailto:[EMAIL PROTECTED]]
Subject: Re: [PHP] Variable
Are you on a Win32 platform?
If so, use COM...
$cell = $sheet-Cells($row,$col);
$cell-activate;
$cell-formula = your formula;
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
-Original Message-
From
-Original Message-
From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]]
Subject: Re: [PHP] PHP Excel
I would think that you wouldn't need formulas. Isn't that the
idea of using
PHP to create the Excel document? Have PHP compute the values of the
formulas and print out the actual
) ($cookie_load+75)) {
print fetch from DB;
SetCookie(cookie_load, date(U));
}
else {
print Loaded ($cookie_load), now . date(U) . -- NOT
fetching\n;
}
if (!$cookie_load)
SetCookie(cookie_load, date(U));
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL
translate %40 to @.
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
... so open up the text file and read it.
What problem are you having? Are permissions set
correctly? Are you making sure to escape \ on Win?
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
-Original Message-
From
on is just begging for trouble.
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
friend.
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
-Original Message-
From: r [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 22, 2002 2:51 AM
To: [EMAIL PROTECTED]
Subject: [PHP] substrwhat does this mean? (newbie
Try it out for yourself. :-
class Test{
var $x = '';
function Test(){}
}
$x = new Test();
$y = new Test();
$x-x = Way;
$y-x = No;
print $y-x . $x-x;
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
-Original Message-
From
and maintaining the filesystem that Miguel
mentioned.
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
-Original Message-
From: Jason Soza [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 22, 2002 3:26 PM
To: Miguel Cruz
Cc: PHP
file_append($file, $text); ??
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
-Original Message-
From: Vail, Warren [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 22, 2002 3:46 PM
To: 'Rasmus Lerdorf'; 1LT John W. Holmes
slower than heavily optimized
code.
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
TIMTOWTDI
$string = Jacko;
print preg_replace('/.$/', '', $string);
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
-Original Message-
From: Ed Gorski [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 28, 2002 9:41 AM
I'm not sure if it's atomic, but (AFAIK) you can
do something like this with Mysql:
UPDATE table SET field=field+1 where .
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
-Original Message-
From: J Smith [mailto:[EMAIL
strip_key(list, yadda?list=XXX);
print strip_key(list, yadda?list=XXXtwo=three);
print strip_key(list, yadda?no=wherelist=XXX);
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
-Original Message-
From: Scott Reismanis [mailto
Look at Sequences for Postgres.
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
-Original Message-
From: webmaster [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 28, 2002 7:12 AM
To: [EMAIL PROTECTED]
Subject: [PHP
there
in the future for MySQL questions
--
Scott Hurring
Systems Programmer
EAC Corporation
scott (*) eac.com
--
Georgie Casey [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
rite,
my primary key column (id) is set to auto_increment as usual which is very
handy. Bu
simply use an
absolute path, it'll point to whatever machine (local dev, live server,
etc...) it happens to be running on without you having to care.
i.e. a href='/moviesite.php?favMovie=$favMovie'
--
Scott Hurring [scott dot hurring dot lists at gmail dot com]
http://hurring.com/
is on the box, then you can worry a little
bit less about your private key being stolen.
--
Scott Hurring [scott dot hurring dot lists at gmail dot com]
http://hurring.com/
Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
Scott Hurring [scott dot hurring dot lists at gmail dot com]
http://hurring.com/
, visit: http://www.php.net/unsub.php
--
Like Music?
http://l-i-e.com/artists.htm
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
Scott Hurring [scott dot hurring dot lists at gmail dot com]
http://hurring.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
Scott Hurring [scott dot hurring dot lists at gmail dot com]
http://hurring.com/
ID'ed checkboxes to check
or uncheck groups. It could be done the other way, but then JavaScript
code has to have more to it to increment from the value of the first ID.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
Scott Hurring [scott
-user vhost. There might be security implications for CGI php5 that
i'm not aware of, simply because i didn't use it in that context.
I'd be interested to know if anyone does get both php4 php5 modules
installed together without file extention hints or port proxying.
--
Scott Hurring [scott dot
://www.php.net/unsub.php
--
Scott Hurring [scott dot hurring dot lists at gmail dot com]
http://hurring.com/
, unless you have a *really* good reason for doing things this way,
putting values into an array is almost always better than using the $$
direct declaration.
i.e. why not use? $vars[ $row[0] ][ $row[2] ] = $row[1];
--
Scott Hurring [scott dot hurring dot lists at gmail dot com]
http://hurring.com/
;
$already_selected = 1;
}
$text .= {$word};
$text .= /option\n;
}
}
$text .= $end;
return $text;
}
--
Scott Hurring
Systems Programmer
EAC Corporation
scott (*) eac.com
--
Davy Obdam [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi People,
I ve just
With RedHat, AFAIR you have to compile PHP from source
*after* first configuring the GD libraries.
It's always been a massive PITA when i've had to compile PHP
on Redhat with Graphic ext's -- try debian instead ;-)
--
Scott Hurring
Systems Programmer
EAC Corporation
scott (*) eac.com
--
Ray
You're limited to one action per statement, not one record.
Using UPDATE ... WHERE, you can update any number of rows
with a single SQL statement.
--
Scott Hurring
Systems Programmer
EAC Corporation
scott (*) eac.com
--
Hugh Danaher [EMAIL PROTECTED] wrote in message
001301c29fc8$b20f06c0
having a
more recent command line version than apache module
and couldn't figure out why cmdline scripts were acting
differently than when served up thru apache.
--
Scott Hurring
Systems Programmer
EAC Corporation
scott (*) eac.com
--
[EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">new
reporting on your test server to E_ALL (look in php.ini)
--
Scott Hurring
Systems Programmer
EAC Corporation
scott (*) eac.com
--
Adam Voigt [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Umm, try this:
$ftp = ftp_connect(ftp.direw.net) or die(Couldn't
find the line you want)
TIMTOWTDI :-)
--
Scott Hurring
Systems Programmer
EAC Corporation
scott (*) eac.com
--
[EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hey guys, I've been searching the manual for a way to grab the number of
lines in a file
Add 0
?
$nums = array(70.00, 65.50, 33.75, -1, -1.00, -1.05);
foreach ($nums as $n) {
print ($n) . -- . ($n + 0) .\n;
}
?
--
Scott Hurring
Systems Programmer
EAC Corporation
scott (*) eac.com
--
Beauford.2002 [EMAIL PROTECTED] wrote in message
001b01c2a1af$b9995e20$6401a8c0@p1"
to FALSE, as you'd expect;
}
?
--
Scott Hurring
Systems Programmer
EAC Corporation
scott (*) eac.com
--
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
round it
http://www.php.net/manual/en/function.round.php
--
Scott Hurring
Systems Programmer
EAC Corporation
scott (*) eac.com
--
Max Clark [EMAIL PROTECTED] wrote in message
atdba1$2id$[EMAIL PROTECTED]">news:atdba1$2id$[EMAIL PROTECTED]...
Hi-
How can I control the decimal places
I figured it was along those lines... i know that perl also caught
me a few times becuase perl differentiates between == and eq
for numerical or string comparisions.
I'll probaly end up using the ===, becuase i've got a severe
aversion to using functions for comparisions. :-)
--
Scott Hurring
74 matches
Mail list logo