Re: [PHP] Passing objects into methods or functions

2003-06-23 Thread Lars Torben Wilson
); > > function gallery_class(&$tpl) > { > if (is_object( $tpl )) > { > $this->_tpl = $tpl; > } > } > } > > ?> -- Torben Wilson <[EMAIL PROTECTED]>+1.604.709.0506 http://

Re: [PHP] set_error_handler always returns false

2003-06-23 Thread Lars Torben Wilson
ALSE on error, or the name of the previously defined error handler (if there was one) on success, I am thinking it's probably just returning the empty string--you likely didn't have an error handler set up before. http://www.php.net/set_error_handler So replace your '==' wi

Re: [PHP] PHP parser extension?

2003-06-24 Thread Lars Torben Wilson
acc for PHP would be great... Have you tried the tokenizer? Should be able to build what you're talking about with that (unless you just want hooks or something). http://www.php.net/tokenizer -- Torben Wilson <[EMAIL PROTECTED]>+1.604.709.0506 http://w

Re: [PHP] nl2br and

2003-06-27 Thread Lars Torben Wilson
report in the bug database at http://bugs.php.net. Note that I'm not going to argue for or against. :) Hope this helps, Torben -- Torben Wilson <[EMAIL PROTECTED]>+1.604.709.0506 http://www.thebuttlesschaps.com http://www.inflatableeye.com

Re: [PHP] Classes within classes

2003-06-27 Thread Lars Torben Wilson
other stuff goes here "; $this->out .= $this->font2->Output(); } function Display() { echo $this->out; } function CSSBorder() { $this->font1 = new CSSFont; $this->font2 = new CSSFont; } } $border = new CSSBorder

Re: [PHP] Re: Weird comparison error.

2003-06-28 Thread Lars Torben Wilson
s are identical, meaning that they are both of the same type, and that they both have the same value. More information: http://www.php.net/manual/en/language.types.type-juggling.php http://www.php.net/manual/en/language.types.string.php#language.types.string.conversion ...in fact, the whole 'Lang

Re: [PHP] Another newbie

2003-06-29 Thread Lars Torben Wilson
uge, everyone has an opinion, and I'm sure that for every suggestion I or anyone else makes there are good arguments against. Good luck, Torben -- Torben Wilson <[EMAIL PROTECTED]>+1.604.709.0506 http://www.thebuttlesschaps.com http://www.inflatablee

Re: [PHP] if and...

2003-06-30 Thread Lars Torben Wilson
amp;&). Also, you need to use == or === to check for equality. = is the assignment operator, and attempts to assign the value of the expression on the right to the variable on the left. Also, you should quote any strings. So: if ($biz == 'my_business' && $id_nu

Re: [PHP] high % of capital letters in a string

2002-06-06 Thread Lars Torben Wilson
ERS. > > Justin French > > Creative Director > http://Indent.com.au > One I wrote last year sometime: Output: Percentage of characters which are CAPITALS: 4% Percentage of characters which are CAPITALS: 38% Percentage of characters which are CAPI

Re: [PHP] Emulating a class destructor

2002-06-11 Thread Lars Torben Wilson
_shutdown_function(): http://www.php.net/register_shutdown_function Note: Instead of a function name, an array containing an object reference and a method name can also be supplied. A simple test script: Hope this helps, Torben > If anyone has any ideas I'd appreciate the h

Re: [PHP] Emulating a class destructor

2002-06-11 Thread Lars Torben Wilson
xiting now "; > exit; > ?> > > > Tom Won't work if you create another object; you'll get a 'Fatal error: Cannot redeclare cleanup() in...' if you create more than one object. You can only declare a function once...and executing the line it starts on coun

Re: [PHP] Emulating a class destructor

2002-06-11 Thread Lars Torben Wilson
e to fix up that page in the next few days. -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Emulating a class destructor

2002-06-11 Thread Lars Torben Wilson
= new cRoute("First:"); > $c2 = new cRoute("Second:"); > echo "exiting now "; > ?> > > Tom It's probably easier just to do it this way...less code to maintain and no magic (although I like your solution too): close(); } function close()

[PHP] Re: [PHP-DEV] Re: [PHP] RFE: $HTTP_POST_VARS =& $_POST;

2002-01-24 Thread Lars Torben Wilson
elseif( isset( $GLOBALS['HTTP_COOKIE_VARS'][$varname] ) ) > > return( $GLOBALS['HTTP_COOKIE_VARS'][$varname]; > > else > > return( FALSE ); > > } > > > > $option = gpc('price_option'); > > if ( $op

Re: [PHP] Feature requests for PHP development - where to post them?

2002-01-29 Thread Lars Torben Wilson
On Tue, 2002-01-29 at 06:53, Stefan Rusterholz wrote: > Is there a place especially meant to make feature-requests to the > php-development team? > > TIA > stefan rusterholz http://bugs.php.net Select 'Feature/Change Request' as the bug type. Cheers, Torben -

RE: [PHP] Swapping for \n... ?

2002-01-29 Thread Lars Torben Wilson
to remove the > > \n altogether - anyone know how I can kill the \n and put a > > in it's place? > > Sounds like you want a simple ereg_replace("\n", "", $sourcestring); > > Jason > -- Torben Wilson <[EMAIL PROTECTED]> http:/

Re: [PHP] Could somebody PLEASE explain this one to me

2002-01-29 Thread Lars Torben Wilson
helps, Torben > } > > function thisisatest() > { > $this->$obj->echotest(); > } > } > > $test = new test2; > > $test->thisisatest(); > ?> > > > > > > -- > PHP General Mailing List (http://www.php.net/) >

Re: [PHP] Function call stack

2002-01-30 Thread Lars Torben Wilson
gards > > Christian Novak > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- Torbe

Re: [PHP] Re: Ereg/replace/i/ or something ??

2002-01-30 Thread Lars Torben Wilson
ion.strlen.php Just a small correction--you should use is_numeric(), not is_int(); form fields are always presented as strings. Torben -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 --

Re: [PHP] .

2002-01-30 Thread Lars Torben Wilson
On Wed, 2002-01-30 at 19:10, jtjohnston wrote: > . > ? -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMA

Re: [PHP] variable function call (Re: [PHP] unset a function?)

2002-01-31 Thread Lars Torben Wilson
t; > But i would prefer something like > $temp=make_$wat($this); > > How can i do this? > > Tnx, > > Bas Use variable function names, like so: Essentially, if you stick an argument list on the end of a variable name, that variable will be evaluated and used as the

Re: [PHP] where is PHP_SELF?

2002-01-31 Thread Lars Torben Wilson
register_globals is off, the $_SERVER array will not be extracted into the global scope. Try $_SERVER['PHP_SELF'] and you should be fine. Hope this helps, Torben > > > Erik Price > Web Developer Temp > Media Lab, H.H. Brown > [EMAIL PROTECTED] -- Torben Wilson

Re: [PHP] suppressing division by zero errors

2002-01-31 Thread Lars Torben Wilson
;5', since the @ binds more tightly than the / (i.e. @ has a higher precedence). So you need to force precedence, which in PHP is done with parentheses: echo @(5/0); Check the following page for more information: http://www.php.net/manual/en/language.operators.precedence.php Hope this help

RE: [PHP] suppressing division by zero errors

2002-01-31 Thread Lars Torben Wilson
't want to do that unless I REALLY have to > > > > Martin > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators,

Re: [PHP] suppressing division by zero errors

2002-01-31 Thread Lars Torben Wilson
and turn it back on afterwards, but > > I don't want to do that unless I REALLY have to > > > > Martin > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL

Re: [PHP] Re: Anyone Up?

2002-02-01 Thread Lars Torben Wilson
> > Brian Clark | Avoiding the general public since 1805! > > Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8 > > 5 out of 4 people have trouble with fractions. > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > T

Re: [PHP] Anyone Up?

2002-02-01 Thread Lars Torben Wilson
ng List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] To > > contact the list administrators, e-mail: [EMAIL PROTECTED] > > > -- > PHP General Mailing List (http://www.php.net/) > To un

Re: [PHP] Re: Anyone Up?

2002-02-01 Thread Lars Torben Wilson
> -- > Brian Clark | Avoiding the general public since 1805! > Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8 > I intend to live forever - so far, so good. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECT

Re: [PHP] Connect() function

2002-02-01 Thread Lars Torben Wilson
(http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschaps.com http://www.hybrid

Re: [PHP] Re: Anyone Up?

2002-02-01 Thread Lars Torben Wilson
On Fri, 2002-02-01 at 10:48, Erik Price wrote: > > On Friday, February 1, 2002, at 05:07 AM, Lars Torben Wilson wrote: > > > Everything is correct 'cept the 'double quotes' bit--XML accepts > > attribute values enclosed in either single or double quotes. &

Re: [PHP] Need eregi() help

2002-02-01 Thread Lars Torben Wilson
ot;, $line, $out)) { print_r($out); } else { echo "Failed\n"; } Hope this helps, Torben > echo "$out[1]"; > fclose($file); > ?> > > > Robby -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschaps.com http://www.hybrid17

Re: [PHP] Re: Anyone Up?

2002-02-01 Thread Lars Torben Wilson
n trying to avoid calling XML entities "tags", I forgot that we were > talking about XHTML, where "tags" do indeed exist. > > Thanks for the correction. > > > Erik -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschaps.com http://www.hy

Re: [PHP] file validation

2002-02-01 Thread Lars Torben Wilson
;); > $pipes5=fgets($fd,50); > echo ($pipes5); > fclose($fd); > > if ($pipes5) { > print "wrong number of pipes"; > } > > The uploaded file below should not pass but it does: > > a|b|c|d|e > a|b|c| > a|b|ccc

Re: [PHP] A weird problem / bug with concatenation operator in aclass

2002-02-01 Thread Lars Torben Wilson
(CURRENT_DATE)-YEAR(dob)) - (RIGHT(CURRENT_DATE,5) $age .= " BETWEEN '$this->minAge' AND '$this->maxAge')"; > $this->age_Range = $age; > echo "Echoed from IN class Profile, no white space"; > echo $this->age_Range.""; > Return (

Re: [PHP] Re: Sending an e-mail to 1,000 people

2002-02-02 Thread Lars Torben Wilson
end 1,000 > email to 1,000 different persons. > > Regards, > > Lars WIlhelmsen > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] >

Re: [PHP] file validation

2002-02-03 Thread Lars Torben Wilson
style issue could be argued for days--go with what works for you. Torben > Mike Frazer > > > > "Lars Torben Wilson" <[EMAIL PROTECTED]> wrote in message > 1012602758.3230.127.camel@ali">news:1012602758.3230.127.camel@ali... > > On Fri, 2002-02-01 at 14:

Re: [PHP] file validation

2002-02-03 Thread Lars Torben Wilson
testpipes.txt'; $upload_file = file($filename); speedtest(array('test_foreach', 'test_for', 'test_while'), 5000); ?> Curioser and curiouser Torben -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschap

Re: [PHP] PHP's include_path

2002-02-04 Thread Lars Torben Wilson
s??? > > Hope someone can help :) > > Neil > > Email: [EMAIL PROTECTED] > [EMAIL PROTECTED] > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscrib

RE: [PHP] ereg_replace help

2002-02-04 Thread Lars Torben Wilson
> > > search through the entire file to find matches and > > > replace those matches? Any help is greatly > > > appreciated. > > > > > > Thanks, > > > John > > > > > > __ &

Re: [PHP] Why does heredoc fail in this instance?

2002-02-04 Thread Lars Torben Wilson
about this at: http://www.php.net/manual/en/language.types.array.php#language.types.array.donts (Sorry if the URLs wrap.) Cheers, Torben > > return $snippet; > > > } // END GetAddCommentSnippet > > > --- > "Reality is tha

RE: [PHP] trouble passing variables through a URL

2002-02-04 Thread Lars Torben Wilson
ECT comp, content FROM $_REQUEST[locale] WHERE sec = '$_REQUEST[sec]' AND subsec = '$_REQUEST[subsec]' AND name = '$_REQUEST[name]' ORDER BY comp "; Hope this helps, Torben -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] file validation

2002-02-04 Thread Lars Torben Wilson
On Sun, 2002-02-03 at 14:06, Lars Torben Wilson wrote: > On Sun, 2002-02-03 at 12:12, Mike Frazer wrote: > > Your reply piqued my curiosity so I whipped together a script that times the > > execution of a foreach(), a while() and a for() loop executing the same > > comman

Re: [PHP] Re: General question...

2002-02-04 Thread Lars Torben Wilson
ctly then it would redirect the user to the index.php page? > > Thanks in advance... > > Jas > > P.S. A tutorial on this would definately prevent me from posting the same > > question again. =) > > > > > > > > -- > > PHP General Mailing List (http:

Re: [PHP] strtotime problem

2002-02-04 Thread Lars Torben Wilson
uot;; > print $date3.""; > > The code above gives me the following output: > > Fri Oct 11 2002 > Mon Feb 4 2002 > Wed Dec 31 1969 > > Is the strtotime() function causing this problem? > Thanks. What do you get with the following? Torben -- Tor

Re: [PHP] strtotime problem

2002-02-04 Thread Lars Torben Wilson
te Input Formats' link to: http://www.gnu.org/manual/tar-1.12/html_chapter/tar_7.html You will find this sentence: The construct 'month/day/year', popular in the United States, is accepted. In other words, '10/12/2002' should work fine with strtotime()

Re: [PHP] uksort wisdom

2002-02-04 Thread Lars Torben Wilson
{ return -1; } else if ($b['premiere'] === 'yes') { /* Otherwise, if $b is the premiere, put it first. */ return 1; } /* Otherwise, just string-compare the names. */ return strcmp($a['name'], $b['name']); } ...just &#x

Re: [PHP] strtotime problem

2002-02-04 Thread Lars Torben Wilson
US Pacific Coast. In other words, her server time zone >(which affects the way data > functions work) is likely subject to Summer Time discontinuities. This combined with >the date being converted > back and forth with datetime formats, crosses the from one day to the other. Yeah, t

Re: [PHP] breaking out of two loops

2002-02-04 Thread Lars Torben Wilson
manual/en/control-structures.break.php). Hope this helps, Torben > > > Erik Price > Web Developer Temp > Media Lab, H.H. Brown > [EMAIL PROTECTED] -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com

Re: [PHP] Grabing Meta Tag information.

2002-02-04 Thread Lars Torben Wilson
this helps, Torben > Philip J. Newman > Philip's Domain - Internet Project. > http://www.philipsdomain.com/ > [EMAIL PROTECTED] > Phone: +64 25 6144012 -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatable

Re: [PHP] Templating

2002-02-04 Thread Lars Torben Wilson
our fopen() call: $fp = fopen($tutorial, 'a'); This is documented on the fopen() page in the manual, btw: http://www.php.net/fopen Hope this helps, Torben -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.infl

Re: [PHP] Reading log files.

2002-02-04 Thread Lars Torben Wilson
. Take your pick: Hope this helps, Torben -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP script for command line

2002-02-05 Thread Lars Torben Wilson
tially, you are looking for the -q command line option. http://www.php.net/manual/en/commandline.php Hope this helps, Torben -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP Gener

Re: [PHP] whic OS is under?

2002-02-05 Thread Lars Torben Wilson
defined constants, try http://www.php.net/get_defined_constants. Hope this helps, Torben -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP General Mailing List (http://www.php.net/) To uns

Re: [PHP] MySQL selecting the maximum value from a column

2002-02-05 Thread Lars Torben Wilson
ur query 'SELECT MAX(Thought_Num) FROM quotes' will return a column named 'MAX(Though_Num)'--so you either need to do this: print "the result is $myrow[MAX(Thought_Num)]"; Or, much preferably, explicitly name the column in the query: SELECT max(Thought_Num) as Th

Re: [PHP] Dynamic Dropdown menu question.

2002-02-05 Thread Lars Torben Wilson
scription=$row['description']; > $my_job_id=$row['my_job_id']; > > > echo " > if ($job_id == '$my_job_id') { This is your problem: remove the quotes. PHP does not interpolate single-quoted strings: http:/

Re: [PHP] Convert 24hr to 12hr

2002-02-05 Thread Lars Torben Wilson
p://www.mysql.com/doc/D/a/Date_and_time_functions.html Your query would then be something like the following, assuming a table named my_table and a date/time column named my_column: select date_format(my_column, '%r') from my_table Alternatively, select the date as a timestamp and

Re: [PHP] breaking out of two loops

2002-02-05 Thread Lars Torben Wilson
On Mon, 2002-02-04 at 20:19, Daniel Grace wrote: > "Lars Torben Wilson" <[EMAIL PROTECTED]> wrote in message > > > > From the manual: > > > >break accepts an optional numeric argument which tells it how > >many nested enclosing structures

Re: [PHP] mktime() Algorithm

2002-02-06 Thread Lars Torben Wilson
algorithm is? > > -- > David A Dickson > [EMAIL PROTECTED] Sure: it starts around line 80 on ext/standard/datetime.c in the source tree: http://cvs.php.net/co.php/php4/ext/standard/datetime.c?r=1.82 Hope this helps, Torben -- Torben Wilson <[EMAIL PROTECTED]> http://

Re: [PHP] in_array algorithm

2002-02-06 Thread Lars Torben Wilson
http://cvs.php.net/co.php/php4/ext/standard/array.c?r=1.156 Search down the page for 'php_search_array'--that's the function which actually does the searching. Looks like a simple sequential search to me. Torben -- Torben Wilson <[EMAIL PROTECTED]> htt

Re: [PHP] Re: Newbie: Question about filesize()

2002-02-06 Thread Lars Torben Wilson
27; operator, which returns true when its operands are both equalivalent and of the same type: http://www.php.net/manual/en/language.operators.comparison.php Cheers, Torben -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye

Re: [PHP] Re: Newbie: Question about filesize()

2002-02-06 Thread Lars Torben Wilson
boolean FALSE value. The correct way to do this is: while (FALSE !== ($file = readdir($handle))) { . . . } Note the !== instead of !=. Hope this helps, Torben -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflat

Re: [PHP] secure form handling

2002-02-06 Thread Lars Torben Wilson
> > how do i hide this data while still passing it to the credit card script > > along with all > the other info? > > thanks. Sorry, perhaps I've misunderstood. You would like to charge a customer's card without the customer knowing how much you're c

Re: [PHP] secure form handling

2002-02-06 Thread Lars Torben Wilson
ich I believe is the way it's normally done. Torben > Lars Torben Wilson wrote: > > > On Wed, 2002-02-06 at 17:36, wm wrote: > > > hi, > > > > > > i'm fairly new to this. > > > > > > what i want to do is use a form so the user can s

RE: [PHP] Formatting a MYSQL time

2002-02-07 Thread Lars Torben Wilson
the local date and time. Torben > $timestamp = mktime($hour, $min, $sec, $month, $day, $year); > > Hope this helps some. > > -- > Kevin Stone > [EMAIL PROTECTED] > www.helpelf.com -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschaps.com http:

Re: [PHP] ODBC_EXECUTE has a DANGEROUS 'feature'!!!

2002-02-08 Thread Lars Torben Wilson
c() or fopen() without some serious checking, would you? ;) Sure, PHP could try to prevent every possible problem from cropping up, but that would make the language pretty useless. It's up to the coder to not program security flaws. -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] mysql_select_db() problem

2002-02-09 Thread Lars Torben Wilson
t select database '$sel_db'; reason was " . mysql_error() . "\n"; return false; } i.e. what do you get if you use mysql_error() after this fails? Torben -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Parameters via Link

2002-02-09 Thread Lars Torben Wilson
t; > > > > > link: > > > > > > > > > > > > php code: > > > > > > if($link == home) > > > > if ($link == "home"); > > > > > > > > -- > > Jason Wong -> Gremlins Associates ->

Re: [PHP] Nested functions

2002-02-09 Thread Lars Torben Wilson
so: $key=" . $item . "~"; } //end of FnNested function ShowList( $title, $aList ) { echo "Listing array=$title: n=" . count( $aList ); array_walk( $aList, "FnNested" ); } //end of function ShowList //mainline code $aLocated = array( 'zero'

Re: [PHP] Parameters via Link

2002-02-09 Thread Lars Torben Wilson
On Sat, 2002-02-09 at 15:54, Manuel Ritsch wrote: > I have PHP Version 4.0.5 and register_globals turned on but it doesnt' work > =( Is it inside a function? If not, can you send me a copy of the script? Torben > "Lars Torben Wilson" <[EMAIL PROTECT

Re: [PHP] my math stinks

2002-02-10 Thread Lars Torben Wilson
greater (maximum) of $pa and $pb; Then just add $ca and $ps. So something like this will do it: $result = (max($pa, $pb) - min($pa, $pb)) + $ca + $ps; Hope this helps, Torben -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschaps.com http://www.hybrid17.com http://www

RE: [PHP] ODBC_EXECUTE has a DANGEROUS 'feature'!!!

2002-02-12 Thread Lars Torben Wilson
t; Of course you can say that is the users own fault. But it is the developers > duty to inform and advise users, and not to look the other way in the hope > that it goes away. > > Jerry I don't recall saying that this shouldn't be documented. -- Torben Wilson <[EMAI

Re: [PHP] ereg-digits only...

2002-02-12 Thread Lars Torben Wilson
print "Only numbers"; > > } > > << > > Can anyone give some feedback... > > regards, > Bart Sure, try is_numeric(): http://www.php.net/is_numeric Hope this helps, Torben -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebutt

Re: [PHP] PHP not parsed in HTML

2002-02-12 Thread Lars Torben Wilson
.inc .php ...which, if the PHP module is available in the server, will tell the server to run these file types through PHP. Alternately, you could compile PHP as a CGI and just install it in your home dir and use that. Hope this helps, Torben -- Torben Wilson <[EMAIL PROTECTED]> http://

Re: [PHP] getting $PHP_SELF's basename

2002-02-12 Thread Lars Torben Wilson
7;]); > $current_page_name = array_slice($current_page_name, -1); > return $current_page_name; > } > > but I'm wondering if someone already did it for me. > > > > Erik echo basename($_SERVER['PHP_SELF']); http://www.php

Re: [PHP] getting $PHP_SELF's basename

2002-02-12 Thread Lars Torben Wilson
On Tue, 2002-02-12 at 13:32, Erik Price wrote: > > On Tuesday, February 12, 2002, at 04:26 PM, Lars Torben Wilson wrote: > > > echo basename($_SERVER['PHP_SELF']); > > > > http://www.php.net/basename > > > > Thank you Torben. Reading th

Re: [PHP] How to obtain the script's path?

2002-02-12 Thread Lars Torben Wilson
en $PHP_SELF don't work. > Can anybody has a solution for this? Thanks in advance for > any answers! > > Regards, > > Alex One way to do it: #!/usr/local/bin/php -q Hope this helps, Torben -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschaps.com h

Re: [PHP] Convert a string to an array w/o spliting or exploding

2002-02-13 Thread Lars Torben Wilson
t; appropriate for the task. I cant find any ino on php.net, > > Thanks, > > Bren Convert a string to an array based on what criteria? Every character becomes an element, or every word becomes an element, or every line, or what? :) Torben -- Torben Wilson <[EMAIL PROTECTED]>

Re: [PHP] Convert a string to an array w/o spliting or exploding

2002-02-13 Thread Lars Torben Wilson
x27;t mean a character-based array, you'll have to be more > specific about what you're asking -- provide an example. > > Also, are you sure you mean to use brackets when you say 'split[]' and > 'explode[]' ? It's supposed to be parentheses. 'split()&#

RE: [PHP] Php is serversided????

2002-02-13 Thread Lars Torben Wilson
on't understand... > Everybody says PHP is server based, so everything is calculated before the > user sees it in his browser. But if that is the case how is it then possible > to use if-statements. Wouldn't that mean that the if-statement has been > executed before the user

Re: [PHP] querystrings passed in header("Location: n") ?

2002-02-13 Thread Lars Torben Wilson
e function. Hope this helps, Torben > Back to the subject at hand, I am sorry to report that header() is not > passing along the querystring. > > > Erik > > > > Erik Price > Web Developer Temp > Media Lab, H.H. Brown > [EMAIL PROTECTED] --

Re: [PHP] trouble with headers

2002-02-13 Thread Lars Torben Wilson
r text-based format; or, for that matter, binary data such as JPEG, GIF, PNG, or whatever. This means that PHP is *required* to output whatever it is asked to--regardless of whether it might look like HTML or not. Hope this explains it, Torben -- Torben Wilson <[EMAIL PROTECTED]> h

Re: [PHP] Filling Forms with $variables

2002-02-13 Thread Lars Torben Wilson
drops > off everything after the space. If I echo $name outside of the form it > prints fine. > > Any help would be really appreciated. Thanks! Always quote your HTML attributes. Your code should read: Cheers, Torben -- Torben Wilson <[EMAIL PROTECTED

Re: [PHP] ODBC_EXECUTE has a DANGEROUS 'feature'!!!

2002-02-13 Thread Lars Torben Wilson
rst three problems to the dev team; I guess we'll see whether someone gets around to committing them in time for 4.2.0. I personally would like to see a cleaner way to do this though. Torben > -- > > * R&zE: -- Torben Wilson <[EMAIL PROTECTED]> http://www.t

Re: [PHP] Browse and Upload file

2002-02-13 Thread Lars Torben Wilson
It is fully explained there, with examples. Hope this helps, Torben -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Browse and Upload file

2002-02-13 Thread Lars Torben Wilson
why is that? > The webserver and the browser is on local LAN, and there is no firewall. > > Thanks for any help. > Reuben D. Budiardja First, check that the file size is less than the max upload size set in php.ini and/or the upload form. Second, what version of PHP are you runn

Re: [PHP] Browse and Upload file

2002-02-13 Thread Lars Torben Wilson
Array ( [name] => timecard.png [type] => image/png > [tmp_name] => /home/web/phpZKBTak [size] => 38656 ) ) > > But I still can't find the file at /home/web/. > > Thanks for your help. > Reuben D. Budiardja You need to move the temp file to whereever its fina

Re: [PHP] Browse and Upload file

2002-02-13 Thread Lars Torben Wilson
"/home/web/final/some_file_name.jpg"); Hope this clears it up for you. Torben > ?> > > Thanks a lot for helping me. > Reuben D. Budiardja > > > -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschaps.com http://www.

Re: [PHP] how a function 'return' statement works

2002-02-14 Thread Lars Torben Wilson
; > array. If that's the case, just use something like: > > > > return $current_page_name[-1] > > > > to return the last element in the array. I do not know where this came from, but it just ain't so. -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] good practice

2002-02-14 Thread Lars Torben Wilson
echo " \n"; >echo " \n"; >echo "\n\n"; > > ?> You might want to put the form in a heredoc or break out of PHP mode entirely here: echo << EOT; Torben -- Torben Wilson <[EMAIL PROTECTED]> http://www.th

Re: [PHP] Sorting an array of arrays....

2002-02-14 Thread Lars Torben Wilson
ata[white] = array("name", "age", "time", "1"); > $data[black] = array("name", "age", "time", "9"); > > I want to be able to sort this array of arrays by the very last element, the > numbers. Hope thi

Re: [PHP] More about sessions.

2002-02-14 Thread Lars Torben Wilson
iffs and whatnot) and to just use the cookie value as a key to find it again when the user comes back. You do not, however, need cookies enabled. Check out SID and --enable-trans-sid at http://www.php.net/session. Cheers, Torben -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebut

Re: [PHP] really weird problem

2002-02-14 Thread Lars Torben Wilson
gt; About", > "reservations => Reservations", > "directions => Directions", > "contact => Contact" > ); I doubt that this does what you expect. ;) I could be w

Re: [PHP] Anyway to open a PHP file and view its code in thebrowser?

2002-02-14 Thread Lars Torben Wilson
If not, it's a bug, and it would be a bit of a showstopper--which leads me to believe that something else is going on, or someone would've noticed by now. :) But we do miss things, so can you post a short sample script? > Much Thanks, > Kevin Stone <[EMAIL PROTECTED]&

RE: [PHP] Anyway to open a PHP file and view its code in thebrowser?

2002-02-14 Thread Lars Torben Wilson
> > This works.. > View Source for > Myscript.php > > This doesn't work.. > http://www.mydomain/myscript.php";>View > Source for Myscript.php > > Thanks for your help. It's always the little things that'll get ya. :) > > -- > K

Re: [PHP] fopen

2002-02-14 Thread Lars Torben Wilson
temporary file with tempnam(), write the new data to that, *append* the data from the original file, and rename the temp file over the original file. Cheers, Torben > Regards, > John Smythe > http://www.smythey.org/ -- Torben Wilson <[EMAIL PROTECTED]> http://www.th

RE: [PHP] fopen

2002-02-15 Thread Lars Torben Wilson
condition'. The other method avoids that, since while you're writing data to the temp file, processes just keep using the original. Once you're done, the rename happens atomically, preventing the race condition. Torben > -Original Message- > From: Lars Torben Wils

Re: [PHP] fopen

2002-02-15 Thread Lars Torben Wilson
On Fri, 2002-02-15 at 08:14, Erik Price wrote: > > On Friday, February 15, 2002, at 04:53 AM, Lars Torben Wilson wrote: > > > The problem with that is that you have a time lag (perhaps only > > in microseconds, but it still is a problem) while you're writing > &

Re: [PHP] writing / reading from text files

2002-02-15 Thread Lars Torben Wilson
> > demand, and update values at random, I want to do this all in the same > > text > > > file. > > > > > > what is the best way to go about this? > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.p

Re: [PHP] The ASP "application" object in PHP?

2002-02-15 Thread Lars Torben Wilson
- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] What Do You Think?

2002-02-15 Thread Lars Torben Wilson
unsub.php > > > > > -- > Sliante, > Richard S. Crawford > > mailto:[EMAIL PROTECTED]http://www.mossroot.com > AIM: Buffalo2K ICQ: 11646404 Yahoo!: rscrawford > MSN: [EMAIL PROTECTED] > > "It is only with the heart th

<    1   2   3   4   >