Re[2]: [PHP] print vs heredoc

2003-07-08 Thread Tom Rogers
for stuff to interpolate. Could be a waste of time in some cases where $test is large. But again probably insignificant with regard to actual time to get it to the client. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[3]: [PHP] print vs heredoc

2003-07-08 Thread Tom Rogers
t contains no TR> php TR> $test = 'Hi there'; TR> echo $test; TR> $test will get parsed (i believe) looking for stuff to interpolate. TR> Could be a waste of time in some cases where $test is large. TR> But again probably insignificant with regard to actual time to get it TR

Re: [PHP] Object assignment

2003-07-08 Thread Tom Rogers
te number of elements by the same name, in the same level? What I have done is to keep an array of elements so it would work like this $elements = array(); //loop if(!isset($elements[$key])){ $elements[$key] = $doc->create_element($key); } $thisChild = $ancestor->append_child($elements[$key])

Re[2]: [PHP] Object assignment

2003-07-09 Thread Tom Rogers
Hi, Thursday, July 10, 2003, 6:44:55 AM, you wrote: MG> Tom: MG> Thanks for the help. Using the array setup you described, I end up with the MG> value of each "record" node being appended to a single instance of the MG> parent node. And that single instance of the parent

Re[2]: [PHP] Object assignment

2003-07-09 Thread Tom Rogers
Hi, Thursday, July 10, 2003, 6:44:55 AM, you wrote: MG> Tom: MG> Thanks for the help. Using the array setup you described, I end up with the MG> value of each "record" node being appended to a single instance of the MG> parent node. And that single instance of the parent

Re: [PHP] mcrypt warning

2003-07-10 Thread Tom Rogers
into mcrypt, tried a couple things, but nothing will get rid of DJ> that error. Could someone show me what I've done wrong? DJ> -Dan Joseph I use this to set iv to null so I don't need to worry about it :) $iv = pack("a".mcrypt_enc_get_iv_size($td),$iv); -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[4]: [PHP] Object assignment

2003-07-10 Thread Tom Rogers
//set its elements parseBranch($children, $doc, $child); } break; } } } which gives Value 1 Value 2 -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[5]: [PHP] Object assignment

2003-07-10 Thread Tom Rogers
$child = $parent->append_child($node); //set is elements parseBranch($children, $doc, $child); } break; } } } -- reg

Re: [PHP] Excel Parser

2003-07-10 Thread Tom Rogers
ks for any help. JM> Johnny I have started an exel reader class that outputs a table and a style sheet that may help get you started. still needs quite a bit of work but the basics are there. Let me know and I'll email you the files. -- regards, Tom -- PHP General Mailing L

Re: [PHP] Mailing list server with PHP frontend

2003-07-11 Thread Tom Rogers
MySQL and it JN> must be free software JN> Does this exist?? JN> Thanks in advanced, JN> Juan I use Limez as the list server co existing with qmail (it does not use qmail) works very well but not sure if any further development is being done. Here is the url http://www.limez.net/

Re: [PHP] How to hide URL but it's not from a form just a link ?

2003-07-11 Thread Tom Rogers
cust_no&search=1&value=WOR032 J> Thanks ! Encrypt then base64_encode the query string before adding, that way they can't stuff with it. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] How to hide URL but it's not from a form just a link ?

2003-07-11 Thread Tom Rogers
n do it with sessions, but that may open a whole new learning curve :) For quick links I usually encode anything that maybe 'fiddled' with to cause trouble. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] elegant way of doing something else the last time through a loop?

2003-07-14 Thread Tom Rogers
"and")) { PA> $sql.= "name like '%$val%' $logic"; PA> } PA> } PA> $length = strlen($sql); PA> $newlen = $length - 4; PA> $sql[$newlen].= " order by name"; PA> echo $sql; I would do

Re: [PHP] BigEndian to integer

2003-07-14 Thread Tom Rogers
t;ptr+1]) << 16) | (ord($this->data[$this->ptr+2]) << 8) | ord($this->data[$this->ptr+3]); $this->ptr += 4; return $r; } } //usage $datablock = file_get_contents($filename); $be = new bigEndian($datablock); $firstword = $be->getWord() //

Re[2]: [PHP] BigEndian to integer

2003-07-15 Thread Tom Rogers
jp Trying to use unpack by itself on large binary streams with variable packet sizes and content buried in them can become a nightmare. Try to unscramble an excel file using unpack() :) -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] running a php script in /cgi from /web

2003-07-18 Thread Tom Rogers
Hi, Saturday, July 19, 2003, 10:31:04 AM, you wrote: DW> Folks, DW> I've searched through the archives of the general mailing list and DW> cannot find the answer to my question. My web hosting service requires DW> ALL scripts run from /cgi. I've tried putting and

Re: [PHP] classes v. functions

2003-07-19 Thread Tom Rogers
x27;t used any other type of OOP then you won't have any problems trying to make PHP look like java, you can just grab the benifits with whats available :-) -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] running a php script in /cgi from /web

2003-07-20 Thread Tom Rogers
Hi, Sunday, July 20, 2003, 12:30:30 AM, you wrote: DW> Thanks for the response Tom. Unfortunately, that won't work either. A DW> little background I'm using Dreamweaver and their template feature. DW> for the site. I want to read some info out of a text file and fo

Re: [PHP] Some SESSION Vars not Registering

2003-07-22 Thread Tom Rogers
gedIn'] = 1; $_SESSION['id'] = $userArray['id']; $_SESSION['uid'] = $userArray['uid']; $_SESSION['fname'] = $userArray['fname']; $_SESSION['lname'] = $userArray['lname']; $_SESSION['dateapproved'] = $userArray['dateapproved']; $_SESSION['email'] = $userArray['email']; } Otherwise no idea at this point :) -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] Some SESSION Vars not Registering

2003-07-22 Thread Tom Rogers
uck it and see method -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] I need a PHP alternative to Windows Scheduled Tasks

2003-07-23 Thread Tom Rogers
t\Crypto\RSA\S-1-5-21-789336058-1788223648-682003330-1000 its the S-1... file -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] classes v. functions

2003-07-23 Thread Tom Rogers
ss structure far outway any loss of speed in my opinion. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Display Records (brief summary and full details)

2003-07-24 Thread Tom Rogers
> array of the session variable ['link'] ?? Another approach would be PSG> to get the names of the companies as a separate query and register them PSG> as an array of session variables. PSG> any suggestions will be welcome. Thanks in advance. PSG> --Pushpinder in t

Re[2]: [PHP] arguments against moving site from Linux/Apache/PHP server to Windows/IIS/PHP needed

2003-07-24 Thread Tom Rogers
veloper's Handbook CS> http://httphandbook.org/ Where can I download the patch that fixes URLScan vulnerability :-)? -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PHP Email use alternate SMTP

2003-07-25 Thread Tom Vogel
Hi, i'm trying to set up an email form on my website. When I originally ran the server from windows I could simply set SMTP = mailhost.ucalgary.ca and it would work. After moving the server to Mac OS X, I can't get it to work. I've read a bunch of FAQ's but they all seem to insist that I set up my

Re[2]: [PHP] Display Records (brief summary and full details)

2003-07-25 Thread Tom Rogers
Hi, Saturday, July 26, 2003, 7:28:16 AM, you wrote: PSG> Thanks Tom, PSG> I appreciate your help ! however I have a 2 quick questions... PSG> 1.) should we not save the names of the companies as $companies[$row] PSG> = $row['company']; PSG> 2.) the approach

Re: [PHP] unique id

2003-07-26 Thread Tom Rogers
an I use: $id = md5(uniqid(rand(),1)); -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Read values from Text Area Box

2003-07-26 Thread Tom Rogers
om each value and put all the values to array. K2> Please advise me if anyone knows about this. K2> Sincerely, K2> KEN You could try $array = explode("\n",$textareastring); -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Get Local IP Address

2003-07-27 Thread Tom Rogers
t work. CL> Many thanks in advance. CL> Regards, CL> Chris Try this: -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] Get Local IP Address

2003-07-27 Thread Tom Rogers
Hi, Monday, July 28, 2003, 4:29:46 PM, you wrote: >>Try this: >>>exec('ipconfig',$catch); >>foreach($catch as $line){ >>if(eregi('IP Address',$line)){ >>list($t,$ip) = split(':',$line); >>

Re[2]: [PHP] Get Local IP Address

2003-07-28 Thread Tom Rogers
Hi, Tuesday, July 29, 2003, 3:11:43 AM, you wrote: CZ> * Thus wrote Tom Rogers ([EMAIL PROTECTED]): >> Hi, >> >> Monday, July 28, 2003, 4:29:46 PM, you wrote: >> >>Try this: >> >>> >>exec('ipconfig',$catch); >>

Re: [PHP] problem: creating global alias inside function

2003-07-28 Thread Tom Rogers
need the =& in the function as you are passing a reference already. So you are setting $globalvariable to point to a reference that is pointing to $one. You just need: function setglobal(&$one) { global $globalvariable; $globalvariable = $one; } -- regards, Tom --

Re: [PHP] problem: creating global alias inside function

2003-07-28 Thread Tom Rogers
read what you really want :) You can use a class to track a variable which may achieve what you want like this: class globalvariable { var $gv = 0; function globalvariable(&$var){ $this->gv =& $var; } } $one = 1; $g = new globalvariable($one); echo &#

Re: [PHP] uploading a file from a form

2003-07-29 Thread Tom Rogers
;); AM> } } ?>> AM> > AM> AM> AM> Use the Browse button to locate your file on AM> your computer or local network. AM> AM> Company Logo File: > AM> AM> AM> AM> AM> AM> Any ideas? The first thing is to add ENCTYPE="multipart/form-data" to the form tag. > Then the rest will depend on what version of php you have. It may be worth doing print_r($_FILES); to see if that is available. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] DHCP web interface. New version.

2003-07-29 Thread Tom Rogers
p cache to be current for those ip's that exist -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] uploading a file from a form

2003-07-29 Thread Tom Rogers
Hi, Wednesday, July 30, 2003, 12:09:44 AM, you wrote: AM> The version is PHP Version 4.2.3. AM> On Tue, 29 Jul 2003, Tom Rogers wrote: Then you can use the $_FILES array like this: if($_FILES["photo"]["error"]==0){ //make sure no errors on upload if(!em

Re: [PHP] Global variables in a class? Nested classes VS inheritance...

2003-07-30 Thread Tom Rogers
$classes['a'] =& $this; } } class b { var $a; function b(){ global $classes; if(isset($classes['a'])){ this->a =& $classes['a']; }else{

Re: [PHP] php-cli - Controlling external programs

2003-07-30 Thread Tom Rogers
> Mike Maybe this will help http://sourceforge.net/projects/mtx/ -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Cookies on WinXP

2003-07-31 Thread Tom Rogers
B> Thanks SB> Steve try setting up a domain on your laptop, add this to the hosts file 127.0.0.1 mylaptop.com 127.0.0.1 www.mylaptop.com Then use that instead of localhost, maybe it will be better with a real looking domain. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Possible My Website was hacked... with PHP... please tell me what this is???

2003-07-31 Thread Tom Rogers
Hi, Thursday, July 31, 2003, 4:06:12 PM, you wrote: JH> I found this on my server... I have no idea what it is... can someone JH> tell me what it does... if you use apache you can do this to protect against uploaded php scripts php_flag engine off -- regards, Tom -- PHP G

Re: [PHP] Clarification..... UTF-8 Enccoding .....

2003-08-03 Thread Tom Rogers
t; messing up the xml... RPJ> Thanks RPJ> Russ I do this before feeding it to xml $description = iconv("ISO-8859-1","UTF-8",$description); -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Making i18n work on all Unix webservers ?

2003-08-04 Thread Tom Rogers
y. CC> Can someone help ? The PHP documentation is far from beeing CC> clear and precise enough in that particular field. CC> --- CC> Christophe Chisogne CC> Developper, Publicityweb sprl CC> http://www.publicityweb.com Try using $dir_name = setlocale(LC_MESSAGES); After setup and that should return the string that gettext will use to locate its files. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] Making i18n work on all Unix webservers ?

2003-08-04 Thread Tom Rogers
not set the paths for gettext it just calls the gettext library function. According to the gettext web site docs gettext will use setlocale() to find the right directory. What happens if you drop the setenv() and just setlocale(LC_MESSAGES,'fr_FR') (It works for me without the setenv set

[PHP] www.php.net

2003-08-09 Thread Tom Miller
Clear Daywww.php.net has an error on the main page. Tom -- == -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Piping and the CLI parser

2003-08-10 Thread Tom Rogers
echo fgets(STDIN, 1024); } stdin is a file stream not part of the command line arguments Note that this simple code will sit there for ever if you have no input or till you send it ^d (tested on linux) -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] htmlspecialchars() and HTML code

2003-08-11 Thread Tom Rogers
Hi, Saturday, August 9, 2003, 1:57:04 AM, you wrote: TJQ> CPT John W. Holmes wrote: TJQ> TJQ> > Try this: TJQ> > TJQ> > This is text TJQ> > TJQ> > If you submit that "text" and then print $_REQUEST['text'], you'll TJQ> see that TJQ> > you have TJQ> > TJQ> > This is text TJQ>

Re[2]: [PHP] Container functions....

2003-08-14 Thread Tom Rogers
Hi, What about this: if(developer_execute()) { execute this code only } Where the function developer_execute would be defined as: function developer_execute() { if(getenv("REMOTE_ADDR")=="000.000.000.000") return true; return false; } -- regards, Tom -- PHP

Re[2]: [PHP] segmentation faults

2003-08-14 Thread Tom Rogers
--- >> michal migurski- contact info and pgp key: >> sf/cahttp://mike.teczno.com/contact.html >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://w

Re: [PHP] [php] explode that :) !

2003-08-17 Thread Tom Rogers
John if the number is always first and an integer: echo "Your score is: ".intval($P1OC1Q1)."\n"; -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Removing empty array values.

2003-08-18 Thread Tom Rogers
Hi, Monday, August 18, 2003, 10:03:25 PM, you wrote: z> How do I remove empty array values? z> -- z> - Zavaboy z> [EMAIL PROTECTED] z> www.zavaboy.com In a loop with unset() foreach($array as $key=>$val){ if(empty($val) unset($array[$key]); } -- regards, Tom -- P

Re: [PHP] Problem with the post variables.

2003-08-18 Thread Tom Rogers
ing.""; KKA> echo "Var em get: ".$_GET['texto'].""; KKA> //phpinfo(); ?>> KKA> KKA> Some one can help me...??? KKA> Klaus Kaiser Apolinário KKA> Curitiba online is your second page Teste2.php or test

Re: [PHP] Problems with post (Again)

2003-08-18 Thread Tom Rogers
Klaus Kaiser Apolinario KKA> Curitiba online do you have - instead of = in the ini file? -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PHP page caching issue

2003-08-20 Thread Tom Tsongas
nyone ever encounter this problem? I am assuming it has to do with page caching but I am not certain how to deal with it. Any help would be appreciated. Thanks! - Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to make an argument optional...confirmation...

2003-08-21 Thread Tom Rogers
ill be optional JV> } JV> is this correct? Yes that is correct, you don't have to use null any value can be put in as a default. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] eval function

2003-08-22 Thread Tom Rogers
ELF"] == $databasepagename[$i]) MW> eval("content".$databasepagename[$i]."();"); MW> } MW> but that doesn't work... MW> How could I achieve that? Thanks for answering... MW> SvT MW> -- MW> Who is the ennemy? This should do it: eval('

Re[2]: [PHP] eval function

2003-08-23 Thread Tom Rogers
Hi, Saturday, August 23, 2003, 10:01:54 PM, you wrote: MW> Hallo Tom, MW> am Samstag, 23. August 2003 um 05:14 hast Du Folgendes gekritzelt: TR>> This should do it: TR>> eval('${"content".$databasepagename}[$i]();'); MW> I'm afraid to say it,

Re[2]: [PHP] eval function

2003-08-23 Thread Tom Rogers
if($_SERVER["PHP_SELF"] == "/login.php") MW> contentLogin(); MW> if($_SERVER["PHP_SELF"] == "/logout.php") MW> contentLogout(); MW> ... MW> Using the "if-cascade", it is working, for you to know that the MW> mistake is definitly

Re: [PHP] user-defined superglobals?

2003-08-23 Thread Tom Rogers
uot;feature requests"? MN> Regards, MN> Matthias You can always add to one of the superglobals, remembering not to have a name clash with get or post variables. $_GET['test'] = 'Hi"; now that will be available in all functions. -- regards, Tom -- PHP Genera

Re: [PHP] Cookie saving path on Clinet

2003-08-26 Thread Tom Rogers
) but it wasn't there. BA> Please tell me. BA> Thanks BA> Binay You should find it in C:\Documents and Settings\login_user_name\Cookies -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Sensibly accounting for timezone differences?

2003-03-17 Thread Tom Rogers
; Murray Wells, MW> Urban Legend Web Design (ABN 18 635 979 727) I have this in an auto prepend file putenv('TZ=Australia/Brisbane'); That fixes most of the date type functions -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Mailing List Digest

2003-03-18 Thread Tom Sommer
What does the mailing list digest contain, compared to a normal subscription? What is the difference? -- Tom Sommer, Denmark www.tsn.dk - www.dreamcoder.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Error on mysql_num_rows

2003-03-20 Thread Tom Rogers
nt. An easy way is like this if(!$result = mysql_query ("SELECT count(id) AS id_count FROM listings WHERE agent = '$agent' AND child = '0'")){ echo 'Oops : '.mysql_error(); }else{ $row = mysql_fetch_array($result); echo 'count = '.$row['id_count']; } -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Removing Risky Characters

2003-03-22 Thread Tom Rawson
as quotes. ------ Tom Rawson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] [php] Blind?

2003-03-22 Thread Tom Rogers
TJ> AGAINST (\''.stripslashes($searchenquiry).'\' IN BOOLEAN MODE) ORDER BY id asc;'; JTJ> I've tried looking at it in a .phps but don't see it. Is that an extra ; near the end ;'; -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Select DataBase Mysql Problem

2003-03-23 Thread Tom Rogers
ot;\t\n"; MA> foreach ($line as $col_value) { MA> print "\t\t$col_value\n"; MA> } MA> print "\t\n"; MA> } MA> print "\n"; MA> /* Free resultset */ MA> mysql_free_result($result); MA&g

Re: [PHP] foreach() or for()

2003-03-24 Thread Tom Rogers
ly I need to isolate certain elements oof a foreach: RW> foreach($var as $v){ RW> if ($v != 'argument') RW> { RW> //add all the $v's for a total RW> } ?>> RW> Thank you! RW> -- I assume $val is an array of numbers?: '; ?>

Re: [PHP] mysql_fetch_* and stripslashes

2003-03-26 Thread Tom Rogers
ECTED] AD> PGPKeyID# 0x65AB5571 Sounds like your doing addslashes twice before storing the data. or magic_quotes_runtime is set on in your php.ini -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Stupid question perhaps?

2003-03-27 Thread Tom Tsongas
annot Display' or 'Document contains no data' errors. I am not sure if this is a configuration issue on Apache or PHP. phpinfo seems to work fine and I don't encounter issues accessing pure HTML pages directly. Just the PHP ones? Any ideas folks? - Tom -- PHP General Mailing

Re: [PHP] Stupid question perhaps?

2003-03-27 Thread Tom Tsongas
Thx for the feedback everyone. Based on what most have told me, I think I will defer to an older Apache version (1.3.x) and use that with the latest PHP. Not enough time to experiment with getting newer Apache to work with newest PHP. - Tom Evan Nemerson wrote: -BEGIN PGP SIGNED MESSAGE

Re: [PHP] preg_match_all()

2003-04-03 Thread Tom Rogers
(.*)<\/td>/m", $html, $out); TJ> I have been doing this before, but I can't remember how I got it working... TJ> Any thougts? I think you need /s to cope with newlines -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Creating Session Variables

2003-04-03 Thread Tom Rawson
can't quite imagine this) current local scope? Thanks, -- Tom Rawson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Q. Adding line numbers to highlighted source

2003-04-03 Thread Tom Rogers
return 2 static $line = 1; One solution is to use a second parameter to reset the counter like this: function addPrefix( $matches, $reset=False ) { static $line; if(!$reset) return $line++ . $matches[0]; else $line = 0; } $url = split("\?", $_GET['url']);

Re[2]: [PHP] Q. Adding line numbers to highlighted source

2003-04-03 Thread Tom Rogers
ix( $matches, $reset=False ) TR> { TR> static $line; TR> if(!$reset) return $line++ . $matches[0]; TR> else $line = 0; TR> } TR> $url = split("\?", $_GET['url']); TR> //reset counter TR> addPrefix('',True); TR> $source = highlight_fi

[PHP] Running scripts in non-php file

2003-04-04 Thread Tom Tsongas
s add the extension to the AddType application in the apache configuration file so it looked like this: AddType application/x-httpd-php .php .html .xml I tried it but the code isn't being executed. (And yes, I did restart apache) Am I missing something? Tom -- PHP General Mailing

Re[2]: [PHP] Apache SetHandler

2003-04-04 Thread Tom Rogers
oes not need to know anything of the auth process. You would probably be better off using an apache module for this. Something like Mod Auth MySQL It would be easy to make the module set a few enviroment variables if you need to pass info to php. -- regards, Tom -- PHP General Mailing List (htt

Re[2]: [PHP] Finding the height of a JPG in pixels using PHP

2003-04-05 Thread Tom Rogers
-up for your own FREE Personalized E-mail at Mail.com Dd> http://www.mail.com/?sr=signup You will find it much easier to store the size info at the time of upload than dicking around with binary files. In fact I would store the whole serialized array that is returned by getimagesize() so al

Re: [PHP] imagearc() and imageline()

2003-06-06 Thread Tom Rogers
to the conclusion = DH> that it is not possible to draw lines or arcs with a pixel width greater = DH> than 1. Could you please tell me if there are other functions that = DH> would allow me to draw arcs and lines and greater width. DH> Thanks. DH> Dan maybe this does what

Re: [PHP] include_path

2003-05-27 Thread Tom Rogers
. 3550 Arapahoe Ave. #6 AMK> http://www.pcraft.com . . .. Boulder, CO 80303, U.S.A. You can do this at the top of each page ini_set ("include_path",'./:/local/path/:'.ini_get("include_path")); -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Resending POST Variables

2003-05-29 Thread Tom Woody
a GET happen at the same time. The search results are done as links to the $_SERVER['PHP_SELF'] with get variables appended on the URL. This sets the page I'm looking at, then I use the offset and limit on the mysql query to build the next page. If you are interested I can send

Re: [PHP] Does PHP have vb's 'mid' function (or similar)?

2003-06-05 Thread Tom Rogers
re it's simple... so a little helper would be grand! L> Cheers, Liam substr() -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] mysql - get actual row

2003-06-10 Thread Tom Woody
increment NR i've actually inserted? > mysql_insert_id() in the future a search of the archive first, or a search of php.net would have found this. -- Tom In a world without boundaries why do we need Gates and Windows? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Generating Related Drop Down Boxes

2003-06-11 Thread Tom Rogers
Check this out http://www.mattkruse.com/javascript/dynamicoptionlist/ -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] can't figure out how to get this dynamic dropdown to work correctly

2003-06-11 Thread Tom Rogers
defaults from database $current_customer = $database_cutomer; $selected_conf = $database_conf; } then in your select loops use $current_customer and $selected_conf to determin when to output "selected" Probably need to tweak the above but it is a start :) -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] prevent modifying querystring

2003-06-11 Thread Tom Rogers
o write the encode decode functions using mcrypt (slow on a lot of values) or your own system) -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Setting Return-Path header for mail() on Linux

2003-06-13 Thread Tom Woody
From: or Reply-To:). Changing the Return-Path would solve this for everyone. Any thoughts ideas, or am i just out of luck? -- Tom In a world without boundaries why do we need Gates and Windows? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Difference between $_POST[foo] and $_POST['foo']?

2003-06-17 Thread Tom Woody
t as $var= $_POST['foo']; before??? > The rule of thumb I follow with these and other Associative Arrays is: when setting the variable its $_POST['foo'] when accessing the variable its $_POST[foo] so it your example it would be: $sql = "select * from db where apple = &

Re: [PHP] Problem while retrieving data from cookie with unserialize

2003-06-21 Thread Tom Rogers
pe someone has any answers on this. SÖ> Best regards, SÖ> Sævar Öfjörð Magnússon SÖ> [EMAIL PROTECTED] SÖ> ICELAND SÖ> -- SÖ> PHP General Mailing List (http://www.php.net/) SÖ> To unsubscribe, visit: http://www.php.net/unsub.php Try base64 encoding/decoding it instead of urlencode -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Defining Super Globals

2003-06-23 Thread Tom Rogers
Hi, Tuesday, June 24, 2003, 3:36:12 AM, you wrote: DAC> Can some1 tell me how can I define Super Globals (like the Application DAC> Scope in ASP)? Have a look at msession, that will allow you to setup application wide variables -- regards, Tom -- PHP General Mailing List

Re: [PHP] File Uploads!

2003-06-29 Thread Tom Rogers
s the MAX_FILE_SIZE directive that was specified in the html form. UPLOAD_ERR_PARTIAL Value: 3; The uploaded file was only partially uploaded. UPLOAD_ERR_NO_FILE Value: 4; No file was uploaded -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] File Uploads!

2003-06-29 Thread Tom Rogers
$HTTP_... CT>> Any idea is appreciated. CT>> Cheers, CT>> Catalin Maybe you have to wind up the post_max_size in php.ini and then control with MAX_FILE_SIZE in the form for the error to show up in the $_FILES array -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[4]: [PHP] File Uploads!

2003-06-29 Thread Tom Rogers
Hi, Monday, June 30, 2003, 4:14:02 AM, you wrote: JW> On Sunday 29 June 2003 20:40, Tom Rogers wrote: >> Maybe you have to wind up the post_max_size in php.ini and then control >> with MAX_FILE_SIZE in the form for the error to show up in the $_FILES >> array JW> &q

Re: [PHP] Passing form value into another form value?

2003-06-29 Thread Tom Rogers
something MJLM> nice. MJLM> Thanks MJLM> -- MJLM> Louie Take the value from the first form and pass it in the second using a hidden field.. //from first form $value = $_post['value'] //second form . . . -- regards, Tom -- PHP General Mailing List (http://www.

Re[2]: [PHP] Refreshing

2003-06-30 Thread Tom Rogers
Hi, Tuesday, July 1, 2003, 3:41:56 AM, you wrote: JB> Also, this may not be PHP but...does anyone know how to stop the JB> annoying click on Internet Explorer when something refreshes? JB> [/snip] control panel -> sounds -> set select to 'none' -- regards, Tom --

Re[2]: [PHP] imagecolortransparent()

2002-07-22 Thread Tom Rogers
Hi, Tuesday, July 23, 2002, 5:16:43 AM, you wrote: N> "Tom Rogers" <[EMAIL PROTECTED]> wrote in message N> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... >> Hello Nick, >> >> Monday, July 22, 2002, 8:47:39 PM, you wrote: >> >> N> i g

Re[2]: [PHP] imagecolortransparent()

2002-07-22 Thread Tom Rogers
Hi, Tuesday, July 23, 2002, 5:16:43 AM, you wrote: N> "Tom Rogers" <[EMAIL PROTECTED]> wrote in message N> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... >> Hello Nick, >> >> Monday, July 22, 2002, 8:47:39 PM, you wrote: >> >> N> i g

Re: [PHP] When to destroy sessions that iterate

2002-07-24 Thread Tom Rogers
session to stay alive? What about if I want P> to have an intranet application that could ( and preferably should) be P> able to be open indefinately? P> Ta Just checkout the session section of the manual and you will find you can set the timeout to what you want. -- Best r

Re: [PHP] Object problem

2002-07-24 Thread Tom Rogers
what I do is to create a global array of class objects to provide inter class communication. class a { var $test; function a(){ global $class; $class['a'] =& $this; $this->test = 'Opened'; } } class b { function b(){ global $clas

Re: [PHP] Running ./configure multiple times

2002-07-24 Thread Tom Rogers
n php-4.2.2]# CG> TIA, CG> c. CG> -- CG> PHP General Mailing List (http://www.php.net/) CG> To unsubscribe, visit: http://www.php.net/unsub.php it may be looking for libgd.a in the gd directory do a make libgd.a then copy it to /usr/lib -- Best regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Hitting return in a textarea box...

2002-07-24 Thread Tom Rogers
to an article on how to accomplish this? JL> Thanks very much for any help. JL> Jesse JL> __ JL> Post your ad for free now! http://personals.yahoo.ca I use wrap="soft" in the textarea input and then to d

Re: [PHP] Numbers with leading zero...

2002-07-24 Thread Tom Rogers
have a look at the sprintf() function for full info: sprintf("value = %02d", $value); -- Best regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

<    1   2   3   4   5   6   7   8   9   10   >