RE: [PHP] Passing vars w/refresh w/register globals off?

2002-01-17 Thread scott [gts]
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 you could save the password to a database, associated with an ID number, then pass the ID number. DATABASE: - id| password 12345 | blah$$ URL: form.php?id=12345 - Scott Hurring - Internet Programmer GraphicTy

RE: [PHP] variable variables

2002-01-17 Thread scott [gts]
there's one example of var-of-vars along with arrays below my rant var-of-var is almost always an evil thing. there are some rare instances where they're necessary, but i assure you that your script would be MUCH cleaner and easier to modify in the future if you used a simple array. compare: $

RE: [PHP] How would you code: $r = func() or return 0?

2001-09-26 Thread scott [gts]
than the other two ways and i'm looking for an equally terse way of accomplishing the same thing with PHP > -Original Message- > From: Sterling Hughes [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, September 26, 2001 4:57 PM > To: scott [gts] > Cc: php > Subject:

[PHP] How would you code: $r = func() or return 0?

2001-09-26 Thread scott [gts]
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I thought i'd ask for your comments on how you'd code this common perl code with PHP: $value = some_function() or return 0; i usually code my functions to return 0 or "" on error, but have to use the following code to handle it... neither seem lik

RE: [PHP] Have y'all seen this?

2001-09-14 Thread scott [gts]
it's also a joke, in case anyone happens to take is seriously :-) > -Original Message- > From: Jon Farmer [mailto:[EMAIL PROTECTED]] > Sent: Friday, September 14, 2001 10:01 AM > To: Thomas Deliduka; PHP List > Subject: Re: [PHP] Have y'all seen this? > > > > This is a pretty funny art

RE: [PHP] is_numeric for php3

2001-08-28 Thread scott [gts]
my understanding is that numeric is a broad term for number values (any value with only numbers and a decimal point) like 1, 5.6, 332, 0.5532, for example. integers are a sub-set of numerics, so any integer is a numeric value, but any numeric value is not necessarily an integer. $num=123 is an

RE: [PHP] is_numeric for php3

2001-08-28 Thread scott [gts]
a few months to fully understand them and get over regexp-heebie-jeebies of my own. > -Original Message- > From: daniel james [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 28, 2001 6:42 PM > To: scott [gts]; php > Subject: RE: [PHP] is_numeric for php3 > > &g

RE: [PHP] Check if a word is in my string.

2001-08-28 Thread scott [gts]
use regexps. that's what their specialty is ;-) // case insensitive if ( preg_match("/$text/i", $string) ) { print "$text is in $string"; } // case sensitive if ( preg_match("/$text/", $string) ) { print "$text is in $string"; } > -Original Message- > From: daniel james

RE: [PHP] Link Checker

2001-08-28 Thread scott [gts]
although it's a bit klunky (and not entirely correct) to do things this way, but a simple fopen(); will tell you if the URL is retrievable or not. (although i dont think that fopen() handles redirects or any of those esoteric HTTP features) but if you want to make sure that a link is there, with

RE: [PHP] is_numeric for php3

2001-08-28 Thread scott [gts]
i think he's asking for a numeric test, not an integer test. your example looks like it should fail "3.50" (for example), even though "3.50" is a perfectly valid numeric value. personally, i think you should just use regexps. ;-) i tried to write a little is_num() type function, but i kept gett

RE: [PHP] Last Modified question..

2001-08-28 Thread scott [gts]
did you try stat()'ing the file? as long as you have read permission to the file, you should be able to run a stat() on the file with no problems > -Original Message- > From: Jay Paulson [mailto:[EMAIL PROTECTED]] > Subject: [PHP] Last Modified question.. > > I have a problem... I want

RE: [PHP] The future of PHP

2001-08-23 Thread scott [gts]
:-) for the type of sites that i develop (non-mission-critical, non-financial), i find PHP's simplicity and elegance more than offsets a lack of things like strong typing and a harshly BDSM compiler (and whatever else Java/JSP has that PHP doesn't) for most websites out there, Java is probably o

RE: [PHP] Re: Mem and variables

2001-08-22 Thread scott [gts]
amen. :-) > -Original Message- > From: Richard Lynch [mailto:[EMAIL PROTECTED]] > Subject: [PHP] Re: Mem and variables > > At any rate -- The right way to worry about perforance is to figure out > where your code is spending 90% of its time, and to optimize that. I'm > betting it ain'

RE: [PHP] header() not working.

2001-08-21 Thread scott [gts]
header() works. it's the text that header() is printing that's causing problems. what are you outputting via header() ? > -Original Message- > From: Jay Paulson [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 21, 2001 3:10 PM > To: [EMAIL PROTECTED] > Subject: [PHP] header() not work

RE: [PHP] PNG support...

2001-08-20 Thread scott [gts]
looks like some GD options were changed between builds. check phpinfo() to find out how PHP was compiled, and what version GD it's using. > -Original Message- > From: Jeff Lewis [mailto:[EMAIL PROTECTED]] > Sent: Monday, August 20, 2001 10:21 AM > To: [EMAIL PROTECTED] > Subject: [PHP] P

RE: [PHP] build button with php

2001-08-15 Thread scott [gts]
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 just output the proper HTML codes. > -Original Message- > From: nafiseh saberi [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 15, 2001 3:12 PM > To: [EMAIL PROTECTED] > Subject: [PHP] build button with php > > > > hi. > I want to

RE: [PHP] need real expert (geting outer files) *english/german*

2001-08-15 Thread scott [gts]
> -Original Message- > From: Chris Hayes [mailto:[EMAIL PROTECTED]] > Subject: Re: [PHP] need real expert (geting outer files) > > hi Patrick, > your question is not entirely clear. > > > I try to get a URL like: www.server.com?var=xyz > > i would recommend www.server.com/x.php?var=xy

RE: [PHP] large external script to include in many pages

2001-08-13 Thread scott [gts]
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 here docs also work good for big blocks of text (although interpolation will occur, which you might not want) $mytext = < -Original Message- > From:

RE: [PHP] UPDATE syntax

2001-08-13 Thread scott [gts]
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 try this syntax: UPDATE table SET col=value, col2=value2 ... WHERE ID=$id; > -Original Message- > From: Gerard Samuel [mailto:[EMAIL PROTECTED]] > Sent: Monday, August 13, 2001 3:20 PM > To: PHP > Subject: [PHP] UPDATE syntax > > > I hav

RE: [PHP] new one is it ??

2001-08-13 Thread scott [gts]
n when I get hit by > many many servers within a given netblock). > > > -Original Message- > > From: scott [gts] [mailto:[EMAIL PROTECTED]] > > Sent: Monday, August 13, 2001 10:38 AM > > To: php > > Subject: RE: [PHP] new one is it ?? > > > > &g

RE: [PHP] Having trouble with PHP exec function calling CGI program

2001-08-13 Thread scott [gts]
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 it could be that the webserver chroot()'s to some "secure" path, and thus your script cannot find `date`. perhaps all you have to do is to copy the binaries that you need into the "safe" directory (if you can first find out where the server is chro

RE: [PHP] The secrecy of PHP code

2001-08-13 Thread scott [gts]
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 they are kinda safe if the webserver is the only way that your files can be viewed if people can log into the machine, they could just view the plaintext of your PHP script. hint: security thru obscurity is not secure. > -Original Message-

RE: [PHP] new one is it ??

2001-08-13 Thread scott [gts]
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 what about something like this ? (just configure apache to have PHP handle *.ida files) > -Original Message- > From: Tim [mailto:[EMAIL PROTECTED]] > Subject: Re: [PHP] new one is it ?? > > > Boy that looks familiar...my (apache) logs a

RE: [PHP] PHP in corporate settings?

2001-08-09 Thread scott [gts]
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 a big reason i use PHP as much as i do is becuase of the excellent documentation and ease of finding it all... > -Original Message- > From: Jeff Lewis [mailto:[EMAIL PROTECTED]] > Sent: Thursday, August 09, 2001 1:02 PM > To: Rasmus Lerdor

RE: [PHP] Copy function usage ?

2001-08-09 Thread scott [gts]
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 look in httpd.conf to get the user name, then chown the directory to that user ex. chown apache:apache ./dir/ chmod 755 ./dir/ and make sure that you change permissions to all files that you write into the directory to be read-write only (not exec

RE: [PHP] regexps

2001-08-08 Thread scott [gts]
here are two regexps that might do what you want "\w" matches alphanum (1-9a-zA-z) IMO, the best way to check for non-alphanum chars is to check for "\W" (upper case is negation of alphanum, which will match only non-alphanum). if (preg_match('/^\w+$/', $data)) { print "entirely alpha

RE: [PHP] Spot the difference?

2001-08-03 Thread scott [gts]
ASP is basically like PHP, only it uses a VB-based language instead of perl/c-based one. which means it sucks - vb is evil. > -Original Message- > From: Jon Yaggie [mailto:[EMAIL PROTECTED]] > Subject: Re: [PHP] Spot the difference? > > isnt this fact a good enough reason to believe it

RE: [PHP] <----- BEING AN ASS CLICK HERE NOT ABOVE!!!!!

2001-08-03 Thread scott [gts]
and since you're running Win32, i'd *highly* suggest running apache to a service... so that you dont have to spawn a console window everytime you want to use your webserver. > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]] > Sent: Thursday, August 02, 2001 5:5

RE: [PHP] How to Compare dates?

2001-08-03 Thread scott [gts]
or, if the field is a MySQL DATE field, try comparing to "-00-00", since that's what a blank date defaults to. > -Original Message- > From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] > Sent: Thursday, August 02, 2001 10:34 AM > To: Jack Sasportas > Cc: php > Subject: Re: [PHP] How to

RE: [PHP] Oh and one more thing

2001-08-02 Thread scott [gts]
it's a little bit complicated, but here goes. 1) format your harddrive 2) take out your motherboard and spraypaint it bright orange. 3) dance around the desk three times holding the motherboard above your head chanting "mail mail, give me mail" "date date, give me date" "o

RE: [PHP] Q: Hiding Folder Directories from public while still...

2001-08-02 Thread scott [gts]
if you're using apache, there's a *much* easier/secure way of doing this. setup an .htaccess file to restrict access to certain username/passwords. check out both: man htaccess man htpasswd > -Original Message- > From: Jon Yaggie [mailto:[EMAIL PROTECTED]] > Sent: Thursday, August 02,

RE: [PHP] How to Compare dates?

2001-08-02 Thread scott [gts]
it also appears that you're checking for the same thing over and over and over '0' is the same as "0" and 00 is the same as 0 and "00" is the same as '00' try checking for either 0 or "-00-00" > -Original Message- > From: Tim [mailto:[EMAIL PROTE

RE: [PHP] Replacing template variables with values?

2001-08-02 Thread scott [gts]
try using single quotes : preg_replace("/\$(\w+)/e", '${$1}', $template); > -Original Message- > From: Ryan Fischer [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 01, 2001 6:37 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Replacing template variables with values? > > > Hello! :)

RE: [PHP] Installing PHP probs

2001-08-01 Thread scott [gts]
you dont have to have a server running. just use the CGI binary. ...and if you're using windows - why not just use apache... it's free, easier to install/configure than PWS (yech!) and it has *MUCH* better documentation and support than microsoft can ever offer. :-) > -Original Message--

RE: [PHP] PHP INSTALL (please, im too young to die!!!)

2001-08-01 Thread scott [gts]
get the windows ZIP > -Original Message- > From: Kyle Smith [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 01, 2001 11:04 PM > To: [EMAIL PROTECTED] > Subject: [PHP] PHP INSTALL (please, im too young to die!!!) > > > ok i really need to get this sorted quickly so could somebody pl

RE: [PHP] Re: How can I make a Loading... screen?

2001-08-01 Thread scott [gts]
make the same window say "Loading"? not unless you used DHTML to create an IFRAME or DIV or some similar HMTL element (i havent kept up on DHTML, so i dont know exactly what you'd need to use). set it to be the entire size of the browser width and height = 100%, then, at the bottom of the page,

RE: [PHP] How can I make a Loading... screen?

2001-08-01 Thread scott [gts]
use javascript. put this at the top of your big document: var waitwin = window.open( ... ); and this at the end: waitwin.close(); you might have to double-check the syntax, as i dont really use javascript too often, but that should work fine. > -Original Message- > From: Michael Champ

RE: [PHP] Installing PHP probs

2001-08-01 Thread scott [gts]
it's a piece of cake for windows... two steps: 1) download the .EXE and double-click on it or download the .ZIP and unzip it somewhere (usually C:\php) 2) configure & restart your webserver if you download the .EXE it'll configure any non-apache server for you. if you use apache, you'll have

RE: [PHP] Testing if Scripting has been disabled

2001-08-01 Thread scott [gts]
m: Don [mailto:[EMAIL PROTECTED]] > Subject: Re: [PHP] Testing if Scripting has been disabled > > Well, yes, but if I disable scripting in I.E., won't PHP scripts not work as > well? > > - Original Message - > From: "scott [gts]" <[EMAIL P

RE: [PHP] SQL syntax error in PHP script. dunno what's wrong

2001-08-01 Thread scott [gts]
no offense to you sam, but please dont ever simply place single quotes around values. you have to escape the values *themselves*. what if someone submitted the form field title as: $title = "'; DELETE FROM seminar; " if you didn't escape the single quotes in there, it would get interpreted as a

RE: [PHP] Testing if Scripting has been disabled

2001-08-01 Thread scott [gts]
"Scripting" is a rather large word... do you mean javascript? > -Original Message- > From: Don [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 01, 2001 12:58 PM > To: php list > Subject: [PHP] Testing if Scripting has been disabled > > > Is there a method to test if Scripting has

RE: [PHP] Re: Hmmm?

2001-08-01 Thread scott [gts]
oh man... it gives me such a headache when i have to try and make sense of scripts with no indentation (or arbitrary indentation)... it's always fun dealing with things like this :-) if ($this){ print " hi ";} else {print " bye ";

RE: [PHP] env var

2001-08-01 Thread scott [gts]
a lot of people send the reply to the list and Cc: a copy to the sender so you end up getting two copies. > -Original Message- > From: Jon Yaggie [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 01, 2001 12:41 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] env var > > > thanks

RE: [PHP] SQL syntax error in PHP script. dunno what's wrong

2001-08-01 Thread scott [gts]
*always always always* quote everything in SQL statements. you run the risk of letting people insert arbitrary SQL statements into your script if you dont quote values. if you're using MySQL, try mysql_escape_string http://php.net/manual/en/function.mysql-escape-string.php or you could roll you

RE: [PHP] Re: FAQ

2001-08-01 Thread scott [gts]
and adding a little explanation of the http://php.net/function syntax for searching the php.net site would be a big help too. > -Original Message- > From: Johnson, Kirk [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 01, 2001 11:32 AM > To: [EMAIL PROTECTED] > Subject: RE: [PHP] R

RE: [PHP] Re: issues with __sleep() and __wakeup()

2001-08-01 Thread scott [gts]
i added a (hopefully helpfull) addition to the online notes regarding magic-functions: http://www.php.net/manual/en/language.oop.magic-functions.php Here's what i posted, if anyone's interested: Here is a sample class and some test statements to demonstrate how __sleep() is used. If you do no

RE: [PHP] PHP and push buttons

2001-08-01 Thread scott [gts]
if i understand your question correctly, this should help... name the buttons different things then, even thought the form is posted to one place, you can determine which button the user pressed by checking the value of $action; > -Original Message- > From: Don [mailto:[EMAIL PROTE

RE: [PHP] writing while reading

2001-08-01 Thread scott [gts]
try only locking the file on a write, *not* on a read. you are going to have many times more reads than writes, even on the busiest day what you need to have is a blocking-lock your writes and not bother with locks for reading. the way you have it setup now, there's no locking for writes, s

RE: [PHP] Example high-profile PHP sites

2001-08-01 Thread scott [gts]
www.audiogalaxy.com is almost entirely PHP > -Original Message- > From: CC Zona [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 01, 2001 4:57 AM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Example high-profile PHP sites > > > In article <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] (

RE: [PHP] Visual Login

2001-08-01 Thread scott [gts]
if you go this route, you would, however, have to check for valid-login users on every page that you want to have security on. > -Original Message- > From: Ben Bleything [mailto:[EMAIL PROTECTED]] > Subject: RE: [PHP] Visual Login > > One way would be to use a database (of any type) to s

RE: [PHP] Attitude of B van Ouwerkerk

2001-08-01 Thread scott [gts]
so now it's shifted from his attitude to your seeming inability to cope with "words related to sexual intercourse"? we all need to calm down and relax. > -Original Message- > From: Alexander Wagner [mailto:[EMAIL PROTECTED]] > Subject: Re: [PHP] Attitude of B van Ouwerkerk > > B. van Ou

RE: [PHP] Re: issues with __sleep() and __wakeup()

2001-08-01 Thread scott [gts]
> -Original Message- > From: Richard Lynch [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 01, 2001 3:52 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Re: issues with __sleep() and __wakeup() > > > > class Scott { > > var $svar = array(); // free-form hash for whatever data > > fu

[PHP] references... found it

2001-07-31 Thread scott [gts]
im sorry, but i was trying to do that the hard way. i figured out how to execute a function name in a variable. $x ="test"; print "Hello: $x\n\n"; $x(); function test() { print "yee haw"; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] F

[PHP] references

2001-07-31 Thread scott [gts]
i've been reading over the docs on references, and i can't see anyway to pass around functions as references. i know how to do this easily with perl, but i cannot seem to find the correct syntax for creating a reference to a function in PHP. what i'd like to do is something like this: // X is no

[PHP] issues with __sleep() and __wakeup()

2001-07-31 Thread scott [gts]
I am having a problem with __sleep(); there mere existance of it is causing my object to not get serialized at all. __wakeup() works fine. i am using PHP v4.0.6 / apache / win2k. If i keep __sleep() in the object, it will not serialize, but if i remove it, it serialized fine. Does anyone know

RE: [PHP] FAQ - was "Attitude of B van Ouwerkerk"

2001-07-31 Thread scott [gts]
- i use it everyday, but not too many newbies seem to know about it) > -Original Message- > From: mike cullerton [mailto:[EMAIL PROTECTED]] > Subject: Re: [PHP] Attitude of B van Ouwerkerk > > on 7/31/01 12:37 PM, scott [gts] at [EMAIL PROTECTED] wrote: > > > there

RE: [PHP] RE: php_oci8.dll

2001-07-31 Thread scott [gts]
try using: extension_dir = c:\php\extensions that's what i use on my Win32 machine with an identical install as Liviu. > -Original Message- > From: Liviu Popescu2 [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 31, 2001 11:12 AM > To: [EMAIL PROTECTED] > Subject: [PHP] RE: php_oci8.dll

RE: [PHP] Re: HELP!! What wrong with this code...

2001-07-31 Thread scott [gts]
or, if you're going to be dealing with a lot of data that has lots of quotes in it, you could take the safe route and just exit out of PHP mode lots of times, it's easier than escaping every single " php; code; here; ?> Your feedback has been sent to -Original Message- > From: Inércia S

RE: [PHP] Question on Commercial Offerings

2001-07-31 Thread scott [gts]
and not to mention that almost any form of script protection or source-code encryption can be broken with minimal effort... you'd probably be wasting valuble time trying to protect your scripts that you could better spend improving and maintaining the code. IMO: it's better to spend your time wor

RE: [PHP] Failure Configuring 4.0.6 on SuSE 7.1

2001-07-31 Thread scott [gts]
it seems that your 'lex' is in a non-standard place, and cannot be found in your PATH. make sure you have 'lex' on your machine, find out where, then open up the Makefile and change it's path to lex to the correct one. > -Original Message- > From: Chris Anderson [mailto:null@YAST_ASK] >

RE: [PHP] fopen not opening url

2001-07-31 Thread scott [gts]
i wish i could help you out, but i tried your code (below) and it worked perfectly... i'm running PHP Version 4.0.4pl1 on a Windows 2000 box. perhaps it isn't the fopen() that's failins. $x = fopen("http://p.moreover.com/cgi-local/page?c=Music%20business%20news&o=xml","r";) or die("Canno

RE: [PHP] Attitude of B van Ouwerkerk

2001-07-31 Thread scott [gts]
there's a fine line between being terse and being nasty. please don't misinterpret this, but i think that we could all benefit from being less sensitive of the style each of us express ourselves in... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] Fo

RE: [PHP] Re: What tools do you use to develop PHP?

2001-07-31 Thread scott [gts]
TextPad is my personal favourite, but i've also tried ConTEXT and PHP Coder and liked them a lot, so i'd recommend that you check out all three of them. TextPad: http://textpad.com/ PHP Coder: http://synedit.sourceforge.net/ ConTEXT: http://www.fixedsys.com/context/ > -Original Message-

RE: [PHP] Good Tutorial

2001-07-31 Thread scott [gts]
The red WROX book, "Professional PHP Programming" is really good. > -Original Message- > From: Steve Wright [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 31, 2001 11:12 AM > To: PHP List > Subject: [PHP] Good Tutorial > > > > Hey, > > I have done a few tutorials, but they aren't ve

RE: [PHP] MS SQL datetime format problem

2001-07-30 Thread scott [gts]
*how* are you putting it in? > -Original Message- > From: Brian Weisenthal [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 30, 2001 1:01 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: [PHP] MS SQL datetime format problem > > > Hi, > > I am having trouble setting a datetime in

RE: [PHP] Revision Tracking - program concept

2001-07-30 Thread scott [gts]
you are severely re-inventing the wheel. Look for CVS or RCS programs on the net. you'll save yourself a ton of work. > -Original Message- > From: Dave Freeman [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 30, 2001 6:27 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Revision Tracking - p

RE: [PHP] php stand alone

2001-07-24 Thread scott [gts]
but remember, if you put your cron/admin scripts into a directory on a publicly accessable webserver, you run the risk of having anonymous websurfers run your scripts at inopportune moments. > -Original Message- > From: Gunther E. Biernat [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 2

RE: [PHP] Email Software

2001-07-19 Thread scott [gts]
...and also a really sleazy way to annoy people. > -Original Message- > From: Christian Reiniger [mailto:[EMAIL PROTECTED]] > Sent: Thursday, July 19, 2001 3:35 PM > To: Wee Chua; PHP (E-mail) > Subject: Re: [PHP] Email Software > > > On Wednesday 18 July 2001 14:50, Wee Chua wrote: > >

[PHP] A good PHP auto-reply system

2001-07-19 Thread scott [gts]
Can anyone reccomend a good PHP (or perl) Web-based email auto-reply thingy. I work at a company that hosts websites and provides POP email accounts, and i'd like to allow our clients to come to our website, log into a "clients" section and have more control over their service... I'd like to all

RE: [PHP] set var in PHP

2001-07-18 Thread scott [gts]
u $TITLE = "some title here"; > -Original Message- > From: jessica lee tishmack [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 18, 2001 11:28 AM > To: php > Subject: [PHP] set var in PHP > > > In html, I can do > > > > How do I do this in PHP? > > Thanks, > Jessica > >

RE: [PHP] Making php execute php

2001-07-18 Thread scott [gts]
It's failing becuase $abc is not valid PHP code, but is HTML. to get eval to work correctly, only pass it valid PHP code. This will print "Hello World"; $abc = ' print "$Message"; '; $Message="Hello World" ; eval ($abc) ; If you want to output HTML, enclose it within a print "" statement, or

RE: [PHP] Need help with formatting time

2001-07-17 Thread scott [gts]
This will convert minutes to hours, then convert to 12-hour am|pm based time. all hours have 60 minutes. it's simple mathematics to convert. $m = 780; $h = 0; // convert to hours:minutes while ($m >= 60) { $h++; $m -= 60; } print "$h:$m \n"; // convert to 12-hour am|pm if (!$h) { $suf

RE: [PHP] wordwrap()

2001-07-17 Thread scott [gts]
i know this is a silly question, but you're not looking at it thru a web browser, are you? browsers are for HTML and markup code. the output on my computer is the same as the manual output: A very long wooo ord. > -Original Message- > From: Tyler Longren [mailto:[EMAIL PROTECTED]

RE: [PHP] Exec, system, passthru didn't work

2001-07-16 Thread scott [gts]
did you try and capture error messages from the system calls? webserver probably doesnt have permission to do what you want it to do. > -Original Message- > From: Reuben D Budiardja [mailto:[EMAIL PROTECTED]] > Subject: [PHP] Exec, system, passthru didn't work > > Hi, > I tried to execu

RE: [PHP] submitting free-form text to a database

2001-07-16 Thread scott [gts]
for the quotes thing. you must have single quotes around the values that will go to the database, and you must escape single quotes inside the value with either "''" or "\'" (at least in MySQL, both work) and as for the database... IMO, you should download MySQL now and save yourself a ton of t

RE: [PHP] Do not get any PHP-binary in install?

2001-07-16 Thread scott [gts]
i know it's silly to ask -- but did you look for "php" in /usr/local/bin/ > -Original Message- > From: Lasse Andersson [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 16, 2001 2:49 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: [PHP] Do not get any PHP-binary in install? > >

RE: [PHP] RE: string search

2001-07-16 Thread scott [gts]
hehe... that's what regular expressions are for. they're extrememly powerful... but that doesnt mean that you should only use them for extremely complicated situations. they work great everywhere... if you dont like "overdoing it", you might as well loop thru the string character by character, C

RE: [PHP] string replace using ereg

2001-07-16 Thread scott [gts]
what code are you trying to use? i have exactly the following code, and it prints out: Hello there, this is a test. My name is BOB $text = "Hello there, <>. My name is <>"; $ASSIGN = array(test => "this is a test", 'name'=> 'BOB', ); $OPENTAG = "<<"; $CLOSETAG = ">>"; print

RE: [PHP] string replace using ereg

2001-07-16 Thread scott [gts]
$text = "Hello there, <>. My name is <>"; $ASSIGN = array(test => "this is a test", 'name'=> 'BOB', ); $OPENTAG = "<<"; $CLOSETAG = ">>"; print preg_replace( "/$OPENTAG(.*?)$CLOSETAG/e", '$ASSIGN[$1]', $text ); prints: Hello there, this is a test. My name is BOB To do what you want, throw

RE: [PHP] How can I see if variable is a odd or an even number?

2001-07-16 Thread scott [gts]
even numbers are even becuase they're divisible by 2 w/o a remainder... use this property to your advantage: if ( $num % 2 ) { print "$num is odd"; } else { print "$num is even"; } > -Original Message- > From: SED [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 16, 2001 1

RE: [PHP] RE: string search

2001-07-16 Thread scott [gts]
read the docs for ereg... i hardly use it, so i dont know for certain if it will match. (althouth the use of "^" at beginning *and* end suggests that it wont do what you expect) preg will match "aol.com" with this regexp: preg_match('/aol.com/', $string ) > -Original Message- > From: J

RE: [PHP] echo vs printf

2001-07-16 Thread scott [gts]
from the manual: [print is a language construct [EMAIL PROTECTED]] The print() function returns a boolean indicating the status of the call. If the write was successful, print() returns 1. If not, it returns 0. This can be used to detect when the client has closed the connection, and appropriate m

RE: [PHP] sessions . . . .

2001-07-16 Thread scott [gts]
any number of things could happen to the $directory variable... it could be out of scope, gotten overwritten or unset by another function, or it might just never have been saved to the database... but the real problem with that code is that there are no error checks on the file functions. that

RE: [PHP] Variable name declarations?

2001-07-13 Thread scott [gts]
> -Original Message- > From: Matthew Aznoe [mailto:[EMAIL PROTECTED]] > Subject: [PHP] Variable name declarations? > > However, I do have one complaint about PHP that seems to have a tendency to > bite me far too often, and that is the lack of variable declaration. While > I do not thi

RE: [PHP] peculiar behaviour of large integers with "<" and ">"

2001-07-13 Thread scott [gts]
MAIL PROTECTED]] > Sent: Friday, July 13, 2001 2:47 PM > To: php > Subject: RE: [PHP] peculiar behaviour of large integers with "<" and ">" > > > I am running 4.0.6. Nothing prints to the screen using a cut and paste of > the code below. > > &g

RE: [PHP] peculiar behaviour of large integers with "<" and ">"

2001-07-13 Thread scott [gts]
" > > > // compare 5 to the max value of an integer > if (5 < -2147483647) { > print "This is"; > } else { > print "Nothing "; > } > > // knock a digit off the max and compare again > if (5 < -214748364) { > print "weird"

[PHP] peculiar behaviour of large integers with "<" and ">"

2001-07-13 Thread scott [gts]
Has anyone come across this before? // compare 5 to the max value of an integer if (5 < -2147483647) { print "This is"; } // knock a digit off the max and compare again if (5 < -214748364) { print "weird"; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL P

RE: [PHP] session problem using headers

2001-07-13 Thread scott [gts]
you're passing the PHPSESSID incorrectly, it seems you must do something like this: or header("Location: nextpage.php?$SID"); what you're doing now will go to page "input.php?=SID" instead of "input.php?938sa9fa98f7daf987a9s" (or similar) > -Original Message- > From: David Allen [

RE: [PHP] Re: How to convert a string into a mathematical expression?

2001-07-13 Thread scott [gts]
be *extremely* careful. eval() is like spawning another PHP interpreter... it'll execute *any* code that you give it. people could type in unlink(); and such commands and really trash your webserver. > -Original Message- > From: Philip Hallstrom [mailto:[EMAIL PROTECTED]] > Subject: [PH

RE: [PHP] forms and IP numbers

2001-07-13 Thread scott [gts]
stat() > -Original Message- > From: Randy Johnson [mailto:[EMAIL PROTECTED]] > Sent: Friday, July 13, 2001 4:09 PM > To: scott [gts]; php > Subject: RE: [PHP] forms and IP numbers > > > I would like to pull the date and time of the creation of a file via a php

RE: [PHP] forms and IP numbers

2001-07-13 Thread scott [gts]
no offense, but that's a bad kludge for the problem. however, if you really want to do that, you could try checking $SERVER_NAME and $HTTP_REFERER and other enviornment variables like that... what would be easier (and better practise) to do is to verify that the incoming username is valid...

RE: [PHP] Alternative to phpMyAdmin

2001-07-13 Thread scott [gts]
like you said... as long as the database provider accepts connections from outside, you can administer it from anywhere. if the provider doesn't accept incoming connections, no amount of tools and software will work for you. > -Original Message- > From: Alexander Skwar [mailto:[EMAIL PRO

RE: [PHP] Re: How to maintain a variable between PHP pages (sessions?).

2001-07-13 Thread scott [gts]
sessions or cookies is the way you probably want to go. you could pass the variable around to each and every form, but that is a pain in the ass, and extremely prone to errors. on the first page, where you check the user's ability to use attachments, you could simply set a cookie setcookie('co

RE: [PHP] Enabling short tags in PHP 4.0.6

2001-07-13 Thread scott [gts]
what do the tags look like? or <% %> the first is a short tag the second is an asp style tag maybe you're looking at the wrong option in the 'ini' file. > -Original Message- > From: Ralph Guzman [mailto:[EMAIL PROTECTED]] > Sent: Thursday, July 12, 2001 11:17 PM > To: Coulee Web; [EM

RE: [PHP] The need for strong typing...

2001-07-13 Thread scott [gts]
you could easily write yourself a typing function to take care of all that (as someone suggested previously) using the same familiar syntax as you want to use in the function definition. function pay($fromaccount, $toaccount, $amount, $memo) { $good = checkInput($fromaccount, "int", $toaccount

RE: [PHP] Strong typing?

2001-07-13 Thread scott [gts]
and as far as i know, perl's 'strict mode' has absolutely nothing to do with typing of variables... use strict; will force you to define all variables with "my $var;" or "local $var;" before you assign values to them or try and use them... but it doesnt do anything about enforcing typing... in

RE: [PHP] Thumbnail Generation from DB Stored Images.

2001-07-13 Thread scott [gts]
Here is my code to turn a directory full of *files* into thumbnail images. im sure you can adapt it to your own needs... the code is a bit long-winded, but it was my first attempt at writing thumbnail code, so forgive me ;) // example call to the function make_thumbs('./pictures/cavern/', './

RE: [PHP] quotes

2001-07-12 Thread scott [gts]
also: mysql_escape_string() will format data properly for use in MySQL queries > -Original Message- > From: Alexander Wagner [mailto:[EMAIL PROTECTED]] > Subject: Re: [PHP] quotes > > > Heidi Belal wrote: > > I have a problem using apostrophes/single quotes. > > I am using PHP and MySQL

RE: [PHP] installation

2001-07-12 Thread scott [gts]
the RPM is a binary. if mysql support is not in the RPM, there's no way to add it if you want to install PHP the simplest way, get the sources and compile it yourself as a stanalone binary (NOT using --with-apache or --with-apxs) then you can tweak it however you want, and compile in suppor

RE: [PHP] apache not handling 404 errors for .php pages

2001-07-12 Thread scott [gts]
thanks... cant believe i didnt think of capturing 500 errors myself... must mean the coffee's wearing off :) > -Original Message- > From: DAve Goodrich [mailto:[EMAIL PROTECTED]] > Subject: Re: [PHP] apache not handling 404 errors for .php pages > > ErrorDocument 500 /path/to/my_error_

  1   2   3   >