Re: [PHP] Document root, preferred way to find it???

2005-03-02 Thread Tom Rogers
Hi, Thursday, March 3, 2005, 5:21:58 AM, you wrote: A I've been using in my scripts $_SERVER['DOCUMENT_ROOT'] to find the base path A for includes, etc. A We just moved the site to a new virtual host and it doesn't work. print_r() A gives me: $_SERVER['document_root']=

Re: [PHP] retrieve single field from database without while loop

2005-02-16 Thread Tom Rogers
Hi, Wednesday, February 16, 2005, 9:48:41 PM, you wrote: rac Is there a way to retrieve and display a single value (customer number) from rac a database and display it without using rac while ($row = mysql_fetch_array) ($result)){ rac I have a value I know the query will only ever return a

Re: [PHP] Help with encryption

2005-01-14 Thread Tom Rogers
Hi, Friday, January 14, 2005, 7:53:30 AM, you wrote: BD Howdy all - BD I have RTFM and STFW and I still can't get encryption to work. What I BD finally ended up with from the PHP documentation is long, unwieldy, BD confusing, and doesn't work. I give up. I threw my big mess away and BD would

Re: [PHP] PHP form POST question

2005-01-09 Thread Tom Rogers
Hi, Monday, January 10, 2005, 12:04:28 PM, you wrote: JI I just narrowed something down about forms and POST and would like JI education. In the following scenarios, all work except #4. $_POST is JI null. Why is that? JI Setup: JI 1) Running on localhost JI 2) /foo/index.php has the following:

Re: [PHP] Sort by string length...

2004-12-21 Thread Tom Rogers
Hi, Wednesday, December 22, 2004, 7:18:52 AM, you wrote: RPJ Any idea how to sort an array by string length? RPJ Russ Jones With a user defined sorting function something like this ?php function cmp($a, $b){ $x = strlen($a); $y = strlen($b); if ($x == $y) { return 0; } return

Re: [PHP] Not quite PHP, but related...

2004-12-10 Thread Tom Rogers
Hi, Saturday, December 11, 2004, 8:16:44 AM, you wrote: BBBM Hi you all, BBBM is that possible using .htaccess to redirect every request to a BBBM specified script? BBBM for example if you have: BBBM http://www.yoursite.com/en/articles/blab.html BBBM where there isn't a en dir., so it would

Re[2]: [PHP] How do you work this thing

2004-12-09 Thread Tom Rogers
Hi, Friday, December 10, 2004, 11:05:50 AM, you wrote: RC No, no, no, we want to keep the earth clean... a dynamo and pedals ought RC to give him an unlimited renewable energy source. Maybe he has one with pedals and that's what he can't get to work? -- regards, Tom -- PHP General Mailing

Re: [PHP] Shifting banner on re-display

2004-11-13 Thread Tom Rogers
Hi, Sunday, November 14, 2004, 2:00:08 AM, you wrote: AD Hi, AD I have a very annoying problem with pages that re-display using the form action tag. On re-display the banner, which is set absolute position at 0px, AD shifts down by about an inch. I've isolated the cause to the form action

Re: [PHP] displaying repetitive results

2004-11-13 Thread Tom Rogers
Hi, Thursday, November 11, 2004, 4:04:27 AM, you wrote: CL Given a database query thats returns results from a linking (or xref) CL table which includes repetition because of the joins: CL ++--+--+ CL | id | title| subject | CL

Re: [PHP] header variable ?

2004-11-10 Thread Tom Rogers
Hi, Thursday, November 11, 2004, 8:51:49 AM, you wrote: JS What variable header use? If I send something in header, what GLOBAL JS variable header use? If you are talking about redirection You have to use the GET method then look in $_GET or $_REQUEST $url =

Re: [PHP] PDFLIB error 2516

2004-11-05 Thread Tom Rogers
Hi, Friday, November 5, 2004, 8:18:16 PM, you wrote: JvZnc Hi All, JvZnc I upgraded my test system to 4.3.9 (from 4.3.4) and now run into problems JvZnc with pdf creation. Scripts that ran fine before now return the following JvZnc error: JvZnc Fatal error: PDFlib error: [2516] PDF_findfont:

Re: [PHP] Getting the date of Monday from a week number and year

2004-11-03 Thread Tom Rogers
Hi, Wednesday, November 3, 2004, 8:29:27 PM, you wrote: S Hi, S is it possible to get php to calculate the date of the monday given a week S number and the year? I have looked http://uk.php.net/strtotime here and can S find refererence to everything but this! S Thanks for your help, This

Re: [PHP] postgres-embedded images via php. two issues...

2004-11-02 Thread Tom Rogers
Hi, Wednesday, November 3, 2004, 8:45:17 AM, you wrote: PG i am storing images in a postgres database and i have set up a little PG php file to retrieve them in such a way that i can do: PG echo img src='gif.php?name=$picname'; PG ...from another php file. PG it's working great, BUT i've

Re: [PHP] Date Calculation

2004-10-28 Thread Tom Rogers
Hi, Friday, October 29, 2004, 4:51:20 AM, you wrote: MT I have a shell script that inserts the unix date and time that the MT script ran into a MySql database. For example Thu Oct 28 13:41:33 CDT MT 2004. I would like to have my web page do the math so that it displays MT the time since the

Re[2]: [PHP] Date Calculation

2004-10-28 Thread Tom Rogers
Hi, Friday, October 29, 2004, 7:19:09 AM, you wrote: MT Ok, so here is what I have. Please check to see if there is a better MT way. There are a lot of database calls to me. MT ? MT $database_name = CETechnology; MT $host = server; MT $login = username; MT $password = password; MT

Re: [PHP] Problem with Regular expression

2004-10-27 Thread Tom Rogers
Hi, Wednesday, October 27, 2004, 9:04:14 PM, you wrote: k Hi all. k I have a problem: i want subs any characters from a string but i don't k have fix the problem. k The string that i want to manipulate is the value from a text field of a k search engine. k The characters that i want to try

Re: [PHP] Session management

2004-10-22 Thread Tom Rogers
Hi, Friday, October 22, 2004, 4:10:50 PM, you wrote: HS Hi HS I am a PHP newbie from a Java/C/Oracle background. I HS cannot seem to get session management with PHP HS working. HS ?php HS #echo 1; HS $old = ini_set('session.use_cookies', 0); HS session_start(); HS $username =

Re: [PHP] PDFlib 6 and PHP 4.3.8/9

2004-10-21 Thread Tom Rogers
Hi, Friday, October 22, 2004, 7:44:37 AM, you wrote: BPC Hi Everyone, BPC I am hoping someone out there may be able to help... BPC I have recently installed PDFlib 6 and am running PHP 4.3.8. I am having BPC trouble with the pdf_open_file() function. I would like to create a PDF BPC to memory

Re: [PHP] list of Months

2004-09-30 Thread Tom Rogers
Hi, Friday, October 1, 2004, 6:16:46 AM, you wrote: aan Hi, aan to create a list of all months in drop-down menu I use this code: aan ?php aan $month_names = array(1='Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', aan 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); ? aan select name=QuoteMonth aan option

Re[2]: [PHP] Make cron file

2004-09-28 Thread Tom Rogers
Hi, Wednesday, September 29, 2004, 1:18:20 AM, you wrote: JB [snip] JB I need make a cron file, for example a .job file: JB #mi hodimeseq jobcomment JB 45 11** 0-5 php -q /home/test/test.php # Make backup JB How can make it?. JB

Re: [PHP] Newbie array problem

2004-09-23 Thread Tom Rogers
Hi, Thursday, September 23, 2004, 10:34:14 PM, you wrote: P If i have an array P $array = array(1, 2, 3, 4, 5, 6, 7) P How can i display the array element sepparated by (;) like this P $display = 1;2;3;4;5;6;7 P Thanks Straight from the manual $string = implode(;, $array); -- regards, Tom

Re[2]: [PHP] mysql_connect does not connect

2004-09-18 Thread Tom Rogers
Hi All, I don't normally bother with these kind of meaningless threads as they waste valuable electrons but I did find this interesting http://www.urban75.com/Mag/troll.html PS This is not a dig at you Jason, it's just your post is the only one I didn't delete :) -- regards, Tom -- PHP

Re: [PHP] download pdf using php script

2004-09-16 Thread Tom Rogers
Hi, Thursday, September 16, 2004, 4:51:51 PM, you wrote: a Hello PHP Users, a I have files (that protected from direct download) and I put it a outside public_html/ directory (outside web server directory). a and the people from outside could access the file by typing: a

Re: [PHP] Regular Expression: Markup Code

2004-09-13 Thread Tom Rogers
Hi, Tuesday, September 14, 2004, 6:04:44 AM, you wrote: r Hello, would someone please help me with my regular expressions? They are so r complex! r Here is what I need to do. I have a string with contents similar to the r following: r BLOCK NAME=TOP r(a bunch of markup code)

Re: [PHP] image size?

2004-09-10 Thread Tom Rogers
Hi, Friday, September 10, 2004, 8:59:30 AM, you wrote: EL Is there a way to get the size of an image created using the imagecreate EL function? EL The PHP manual section on image functions mentions getimagesize, but that EL only works on remote or local files. EL Thanks, EL Ed Something like

Re: [PHP] Re: Convert Smart Quotes to Sraight Quotes - Need Help!

2004-09-08 Thread Tom Rogers
Hi, Wednesday, September 8, 2004, 9:14:53 AM, you wrote: M Anyone! I'm out of online resources and answers. I guess this isn't possible M to do... Here is a function/hack I use to clean up text for my php-gtk editor, I still haven't found a clean solution yet but it may help. function

Re: [PHP] Need Help for Session

2004-08-23 Thread Tom Rogers
Hi, Make sure that ?php is on the first line and is the first thing on the line of your code page. That error can be caused by a space or a carriage return before php starts. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] regex to remove NL and CR

2004-08-17 Thread Tom Rogers
Hi, Wednesday, August 18, 2004, 9:09:02 AM, you wrote: KB I am extracting text from a text datatype field of a KB database. The target text is marked (beginning and KB end) by html comments that have a known--but not KB uniform--format. Unfortunately, the web-based KB interface used to maintain

Re: [PHP] Escaping quotes

2004-08-11 Thread Tom Rogers
Hi, Thursday, August 12, 2004, 10:03:32 AM, you wrote: AH Hi All, AH I have this expression; AH $query = INSERT INTO $table (%s) VALUES (%s); AH $query = sprintf($query, implode(,, $fld), implode(,, AH $val)); AH $result = mssql_query($query) or die($errmsg); AH

Re: [PHP] Global persistent variables

2004-08-10 Thread Tom Rogers
Hi, Wednesday, August 11, 2004, 1:36:45 AM, you wrote: JYJ Hi, JYJ Is there a way to have global persistent variable with PHP? I would like JYJ to reproduce the use of the ASP Application(name)= value JYJ possibility. The variable name will be available to every users... JYJ Thank-you in

Re: [PHP] pconnect...

2004-08-02 Thread Tom Rogers
Hi, Tuesday, August 3, 2004, 2:24:49 AM, you wrote: b hi... b since pconnect is not supported in php5, i'm wondering if the issue is that b mysql no longer supports the underlying functions to implement pconnect, or b if the decision to leave it out was based upon other factors. b also, is

Re: [PHP] Maintaining sessions across multiple sites

2004-07-30 Thread Tom Rogers
Hi, Friday, July 30, 2004, 11:31:07 PM, you wrote: RD I'm in the process of building an application that has an adminstration RD back-end shared by multiple sites. I need to maintain a persistent session RD across these sites to properly identify users. I'm using a db to store the RD session data

Re[2]: [PHP] Maintaining sessions across multiple sites

2004-07-30 Thread Tom Rogers
Hi, Saturday, July 31, 2004, 12:12:26 AM, you wrote: RD Does msession work with php5? RD ron I have no idea :-) -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] Maintaining sessions across multiple sites

2004-07-30 Thread Tom Rogers
Hi, Saturday, July 31, 2004, 7:34:08 AM, you wrote: RGG On Fri, 30 Jul 2004, Tom Rogers wrote: RGG how reliable msession is?. I'm interested on it too. RGG Regards. I have been using it for several years now as my default session handler and it has never once failed me, so I would say from my

Re: [PHP] How do I return the error

2004-07-28 Thread Tom Rogers
Hi, Wednesday, July 28, 2004, 11:56:16 PM, you wrote: MO Hi I have this function below - if it reurns false I want to MO also return the error so I can print it in my calling function. MO Can I do this? MO Cheers MO Matt MO function fileUpload($file) { MO if ($file['type'] == image/gif ||

Re[2]: [PHP] Re: PHP editor that doesn't require installation

2004-07-26 Thread Tom Rogers
Hi, Tuesday, July 27, 2004, 7:40:25 AM, you wrote: JP Edit locally and FTP manually. JP Or get some kind of mounted FTP filesystemdoesn't Windows XP have JP something like this built in? JP -- JP DB_DataObject_FormBuilder - The database at your fingertips JP

Re[4]: [PHP] Disk serial number

2004-07-25 Thread Tom Rogers
Hi, Sunday, July 25, 2004, 9:48:20 PM, you wrote: R This didn't work :( R Apache crashes after execution of script. Yes it does that ...you can download a working version here http://fred.kwikin.com/php_w32api.dll -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To

Re[2]: [PHP] Re: PHP editor that doesn't require installation

2004-07-24 Thread Tom Rogers
Hi, Sunday, July 25, 2004, 5:18:44 AM, you wrote: JWH Scite is perfect. You rock. A single 364KB file with PHP source code JWH highlighting, brace matching, (regex) search and replace and more. It's JWH so perfect I won't even make fun of you for mentioning TemplateTamer JWH again! ;) Thanks,

Re[2]: [PHP] Disk serial number

2004-07-23 Thread Tom Rogers
Hi, Friday, July 23, 2004, 8:08:22 PM, you wrote: R I receive an error: R Warning: dl(): Not supported in multithreaded Web servers - use extension R statements in your php.ini You need to add extension=php_w32api.dll to your php.ini and restart the web server -- regards, Tom -- PHP

Re: [PHP] Disk serial number

2004-07-22 Thread Tom Rogers
Hi, Friday, July 23, 2004, 8:26:56 AM, you wrote: R Hi, R Is there a way to get with PHP script ( maybe with some module) serial R number of the hard disk? R Thanks in advance! On windows you can use the win32api like this: ?php dl(php_w32api.dll); $api = new win32; $api-registerfunction(long

Re: [PHP] placing values in html teaxtarea

2004-07-12 Thread Tom Rogers
Hi, Tuesday, July 13, 2004, 1:09:25 AM, you wrote: HDD After doing calculations etc on my data I am wanting to HDD place it in a textarea form in html. I am having trouble getting HDD my data to show up in my texarea. For example, say after all my HDD calculations I my field called $test ends

Re: [PHP] Re: [Q] Why does my php file gets displayed instead of executed

2004-07-11 Thread Tom Rogers
Hi, Monday, July 12, 2004, 10:28:59 AM, you wrote: MTP Here is some additional info: MTP My other PHP scripts execute just fine, including the php script init.php MTP which uses header(...) to dispatch to the member_login.htm page. Recall that MTP the problem arises when

Re: [PHP] How to specify compiler options on Win32

2004-07-08 Thread Tom Rogers
Hi, Thursday, July 8, 2004, 6:56:17 PM, you wrote: RD Hi, RD Using the guide on the Zend site RD (http://www.zend.com/manual/install.windows.php#install.windows.build) RD I have successfully compiled and built the Win32 version of PHP using RD Visual C++. For now I am building the CLI version -

Re[3]: [PHP] How to specify compiler options on Win32

2004-07-08 Thread Tom Rogers
Hi, Thursday, July 8, 2004, 7:38:49 PM, you wrote: RD Hello Tom, RD I have to admit I did look in there, but couldn't see anything RD relating to it (or how to specify it). But if it doesn't work on RD Windows anyway then I guess it's not much use! :) RD Best regards, RD Richard Davey RD --

Re[2]: [PHP] call_user_func and call-time pass-by-reference

2004-07-07 Thread Tom Rogers
Hi, Thursday, July 8, 2004, 3:38:41 AM, you wrote: AN Hmm ... this still echos 0 and not 1. I am using 4.3.7 with all AN warnings on. AN Does anyone know how to use this function or anything similiar with AN passing by refernce. Since the call-time pass by reference is AN deprecated, this

Re: [PHP] PHP Web Mail

2004-07-05 Thread Tom Rogers
Hi, Monday, July 5, 2004, 8:14:44 PM, you wrote: IAG Hi everyone, IAG I use UebiMiau for our web mail service, but to be honest I haven't been IAG particularly happy with it. It's ok, but what I find frustrating is that if IAG our customers click the back button on their browser it always gives

Re: [PHP] Session tracking and multiple form updates

2004-07-04 Thread Tom Rogers
Hi, Monday, July 5, 2004, 1:27:12 PM, you wrote: MG Hello, MG I am working on a web site that is available only over HTTPS and am MG using session tracking. MG So far I am only saving the person's display name (different then MG login), site role and e-mail address in the $_SESSION data.

Re: [PHP] call_user_func and call-time pass-by-reference

2004-07-02 Thread Tom Rogers
Hi, Saturday, July 3, 2004, 2:02:42 AM, you wrote: AN How do you use the call_user_func function with call-time AN pass-by-reference deprecation? AN For example: AN function fun($arg) { AN$arg++; AN } AN $var = 0; AN call_user_func(fun, $var); AN echo $var; //echoes 0 instead of 1 AN Is

Re[2]: [PHP] call_user_func and call-time pass-by-reference

2004-07-02 Thread Tom Rogers
Hi, Saturday, July 3, 2004, 3:00:22 AM, you wrote: AN Tom Rogers wrote: With call_user_function() you need to do this: call_user_func(fun, $var); AN Tom, this won't work due to the Call-Time Pass-By-Reference deprecation. AN Does anyone know how to do this? AN The error message says

Re: [PHP] Regular Expressions Tester/designer

2004-06-20 Thread Tom Rogers
Hi, Sunday, June 20, 2004, 7:23:53 AM, you wrote: A Anyone know of a good regular expressions tester/designer for php coding A running windows. A I've looked at the Rad Software Regular Expressions Designer and it A looks pretty good except that it is intended for .net and it really A doesn't

Re[2]: [PHP] Regular Expressions Tester/designer

2004-06-20 Thread Tom Rogers
Hi, Sunday, June 20, 2004, 5:30:39 PM, you wrote: USK Tom Rogers sagde: This works with perl regular expressions http://weitz.de/files/regex-coach.exe USK Thanks! Great tool! I really needed something like that. USK It just seems like it can't handle $1, $2 ...$x in the replacement

Re: [PHP] Export data from word ducument

2004-06-10 Thread Tom Rogers
Hi, Thursday, June 10, 2004, 11:53:46 PM, you wrote: RD Someone,can you help me ? RD I need exported pictures that are inserted in word document to the jpg RD (gif,tiff,bmp) format. RD Is it possible and how ? RD Thanks you very much RD Roman use the Save as Web Page option in Ms word and it

Re: [PHP] PHP

2004-06-09 Thread Tom Rogers
Hi, Wednesday, June 9, 2004, 7:03:23 PM, you wrote: CPP Dear Sir/Madam, CPP I would like to make a page on which people may add records to a table and CPP view them (As my web server does not support MYSQL, I may have to do it on CPP text files). I would also like to sort them by descending

Re: [PHP] AccommodationNamelt;![CDATA[HOTEL AC MALAGA PALACIO]]gt;/AccommodationName

2004-06-09 Thread Tom Rogers
Hi, Thursday, June 10, 2004, 2:28:06 AM, you wrote: DC anyone know why my parser is not reading just the internal part of this tag? DC Is the cdata in the correct format? DC AccommodationNamelt;![CDATA[HOTEL AC MALAGA DC PALACIO]]gt;/AccommodationName DC -- DC Diana Castillo DC Global Reservas,

Re: [PHP] Dynamic Function Call

2004-06-07 Thread Tom Rogers
Hi, Monday, June 7, 2004, 11:47:00 AM, you wrote: Hello everyone! I'm trying to call a class method dynamically, but keep getting a SYNTAX ERROR. Can anyone shed some light on this? Is this impossible? ==The Code function modCall($_class){ $this-LoadClass($_class); //LoadClass

Re[2]: [PHP] Delete Multiple Records From Checkboxes

2004-05-27 Thread Tom Rogers
Hi, Thursday, May 27, 2004, 3:07:28 PM, you wrote: AP On May 26, 2004, at 7:55 PM, Tom Rogers wrote: Hi, Thursday, May 27, 2004, 11:34:03 AM, you wrote: AP I've checked the archives and several other sources, but still can't AP seem to make this work. AP I have a form with checkboxes

Re[2]: [PHP] Sessions simply do not work?

2004-05-26 Thread Tom Rogers
Hi, Wednesday, May 26, 2004, 2:28:58 AM, you wrote: MRW On Tue, May 25, 2004 at 07:37:47AM +0100, Peter Risdon wrote: Michael R. Wayne wrote: In my continuing efforts to actually get sessions to work, I upgraded to PHP 4.3.6 and apache 1.3.31. This did not make the slighest difference.

Re[3]: [PHP] Sessions simply do not work?

2004-05-26 Thread Tom Rogers
Hi, Wednesday, May 26, 2004, 10:21:57 PM, you wrote: TR if your not using cookies you have to pass the sessionid in your form TR as a hidden variable somewhere. Or maybe I missed it :) TR -- TR regards, TR Tom ok ignore me I found it btw you can drop the ; it is not needed ?= SID? --

Re: [PHP] Delete Multiple Records From Checkboxes

2004-05-26 Thread Tom Rogers
Hi, Thursday, May 27, 2004, 11:34:03 AM, you wrote: AP I've checked the archives and several other sources, but still can't AP seem to make this work. AP I have a form with checkboxes to designate records to be deleted from AP the mysql database. The pertinent form code is: AP input

Re: [PHP] eval() with CONSTANTS

2004-05-20 Thread Tom Rogers
Hi, Friday, May 21, 2004, 8:26:30 AM, you wrote: GD How can I eval() an HTML template to make a CONSTANT be evaluated GD properly? GD Previously I have been using regular $variables in my HTML templates. GD Today I decided to make one of the $variables a CONSTANT only to find it GD would not

Re: [PHP] Template Engine

2004-05-15 Thread Tom Rogers
Hi, Saturday, May 15, 2004, 6:13:25 AM, you wrote: GL I was just wondering if anyone had any good advice or tutorials on GL building a simple template engine system. I am woking on a small project GL that I would like to distribute, and I would of course like to separate GL logic from html. I

Re: [PHP] GET and POST variables name

2004-05-15 Thread Tom Rogers
Hi, Sunday, May 16, 2004, 1:47:44 AM, you wrote: DC i know it could be a stupid problem, but i need a help and i DC hope u could be generous with me :). DC this is my code, it writes the list of POST and GET variables. DC ? DC echo GET:BR; DC foreach($_GET as $parole) DC { DC echo Parola =

Re: [PHP] dinamic hashes

2004-05-13 Thread Tom Rogers
Hi, Thursday, May 13, 2004, 9:59:23 PM, you wrote: Y Hello everyone. Y I am having a stupid problem with a couple of arrays, tried a couple of Y things but I am feeling disconcerted. Y The thing is, I thought it was possible to create arrays in a dynamic Y fashion, as in: Y $newarray['newkey'] =

Re: [PHP] Socket looping challenge

2004-05-13 Thread Tom Rogers
Hi, Friday, May 14, 2004, 5:21:10 AM, you wrote: RF Hi all, RF Still encountering some challenges with my socket loop. Basically, I RF need this socket client to wait to read incoming data, but if nothing RF happens for more than three seconds, I want it to do something, then RF return to

Re: [PHP] references

2004-05-13 Thread Tom Rogers
Hi, Friday, May 14, 2004, 5:10:49 AM, you wrote: VS Hi! VS I found that when I try to call class method addchild from reference of VS object - php change not original object. New copy of object will created. VS Very strange VS Example: VS ? VS class pages { VS var $childs; VS var

Re[2]: [PHP] Socket looping challenge

2004-05-13 Thread Tom Rogers
Hi, Friday, May 14, 2004, 9:11:21 AM, you wrote: RF The script doesn't even get that first while condition line. It loops RF a few times (while receiving messages), then when no more messages are RF coming from the server, and it times-out, it breaks out of the while, RF then returns to the top

Re: [PHP] Breaking out of a loop...

2004-05-12 Thread Tom Rogers
Hi, Thursday, May 13, 2004, 6:57:14 AM, you wrote: RF Hi, RF I have this code (below) that waits for particular data to come over RF the socket (ENX), at which point it breaks out of the loop and does RF other things. Presently, it will loop forever, until it receives RF ENX—a good start—but I

Re: [PHP] strip comments from HTML?

2004-05-06 Thread Tom Rogers
Hi, Thursday, May 6, 2004, 3:02:16 PM, you wrote: JF Hi, JF This isn't working: JF $text = preg_replace('/!--(.*)--/','',$text); JF Can someone advise what characters I need to escape, or whatever to get JF it going? JF TIA JF --- JF Justin French JF http://indent.com.au you may need

Re: [PHP] Re: global vars inside includes inside functions?

2004-04-29 Thread Tom Rogers
Hi, Friday, April 30, 2004, 1:29:12 AM, you wrote: RW [...] ? function safeInclude($file) { RW [...] RW foreach ( $GLOBALS AS $k = $v ) { RW $$k = $v ; RW } RW [...] if(file_exists($file)) { include($file); } else { debug(file $file not

Re: [PHP] variable-length arguments passed by reference... how?

2004-04-29 Thread Tom Rogers
Hi, Friday, April 30, 2004, 1:40:26 AM, you wrote: AC I want to create a function similar to the MySqli extensions' AC mysqli_stmt_bind_param() function. I assume that this function takes AC its arguments passed by reference. Now, I know how to do variable AC length argument lists in a

Re[2]: [PHP] variable-length arguments passed by reference... how?

2004-04-29 Thread Tom Rogers
Hi, Friday, April 30, 2004, 3:51:19 AM, you wrote: JB I know I'm probably paranoid, but eval() always bugs me. I think for JB what you want to do you can use call_user_func_array() JB $args = func_get_args(); JB call_user_func_array('function_to_call', $args); JB

Re: [PHP] formatting a string

2004-04-24 Thread Tom Rogers
Hi, Sunday, April 25, 2004, 11:17:16 AM, you wrote: AB hi... AB i have a string i want to pull out of a database (mysql). the column name is AB Phone1 and it is a 10 digit phone number. the raw string coming out of the AB table column would look like this: 1234567890 AB what i want to do is

Re[2]: [PHP] formatting a string

2004-04-24 Thread Tom Rogers
Hi, Sunday, April 25, 2004, 3:15:25 PM, you wrote: AB ok sorry but since i never used preg_* before i dont quite get what some of AB this stuff means. i looked at the doc page for it but it doesnt make mention AB at all of what \d, \w, \s or any of those things mean... i only assume that AB \d

Re: [PHP] Counting number of characters without spaces between them?

2004-04-23 Thread Tom Rogers
Hi, Friday, April 23, 2004, 11:50:56 PM, you wrote: RD Hi all, RD It's a warm sunny day and I'm trying to wrap my head around the RD following: RD I want to be able to check to see if, in a string, the user has RD entered too many consecutive characters and not enough spaces. For RD example

Re[2]: [PHP] Counting number of characters without spaces between them?

2004-04-23 Thread Tom Rogers
Hi, Saturday, April 24, 2004, 12:42:57 AM, you wrote: TR Hi, TR Friday, April 23, 2004, 11:50:56 PM, you wrote: TR You could try something like this TR $string = hello world! how arrre you today?!!; TR

Re[2]: [PHP] OK SQL experts...

2004-04-23 Thread Tom Rogers
Hi, Saturday, April 24, 2004, 1:55:36 AM, you wrote: JB [snip] JB SELECT * FROM 'my_table' WHERE ('field_1' LIKE '%$keyword%' OR JB 'field_2' LIKE '%$keyword%' OR 'field_3' LIKE '%$keyword%') AND JB 'status' = 'active'; JB [/snip] JB *slaps forehead* JB SELECT * FROM my_table WHERE (field_1

Re[4]: [PHP] OK SQL experts...

2004-04-23 Thread Tom Rogers
Hi, Saturday, April 24, 2004, 2:03:36 AM, you wrote: JB [snip] JB They do if they are themselves inside double quotes :) JB echo '$var'; will get parsed ok JB [/snip] JB I know, but since I saw no double quotes I had to go for the obvious. :) Yes I would like to see the whole truth as well :)

Re: [PHP] Classes and their members

2004-04-22 Thread Tom Rogers
Hi, Friday, April 23, 2004, 1:00:34 PM, you wrote: DN I'm having a problem using classes. The problem stemed from DN using arrays to store a bunch of users and their usage times. DN I have an object with two members, $name and $onlineSecs. No DN matter how hard I try...$name always gets

Re[2]: [PHP] Program that'll parse HTML form with results and send HTML email?

2004-04-20 Thread Tom Rogers
Hi, Tuesday, April 20, 2004, 11:29:41 PM, you wrote: JWH From: Tom Rogers [EMAIL PROTECTED] JWH Does anyone know of a script that'll receive the results of a form, JWH parse the original form and substitute the user supplied data in for JWH the JWH form elements and then send an HTML email

Re[4]: [PHP] Program that'll parse HTML form with results and send HTML email?

2004-04-20 Thread Tom Rogers
Hi, Wednesday, April 21, 2004, 12:05:08 AM, you wrote: JWH I see what you're doing here, but it doesn't fit what I'm looking for JWH exactly. You just create a Key : Value list to include in the email. I want JWH the email to look exactly like the form, only substitute in the values JWH submitted

Re: [PHP] Program that'll parse HTML form with results and send HTML email?

2004-04-19 Thread Tom Rogers
Hi, Tuesday, April 20, 2004, 11:10:24 AM, you wrote: JWH Does anyone know of a script that'll receive the results of a form, JWH parse the original form and substitute the user supplied data in for the JWH form elements and then send an HTML email of the form? JWH For a static form, this

Re: [PHP] Moving a file

2004-04-19 Thread Tom Rogers
Hi, Tuesday, April 20, 2004, 7:41:18 AM, you wrote: LL Hello LL Is there a build-in function to move files in php ? LL or sholud i just open file A and copy it content to file B , then del file LL A. LL Thanks for help. rename() may do what you want -- regards, Tom -- PHP General Mailing

Re: [PHP] session var puzzle

2004-04-18 Thread Tom Rogers
Hi, Monday, April 19, 2004, 8:46:02 AM, you wrote: KB Dear list, KB I am sorry for the second posting, but this is going KB to drive me to drink something other than lattes! KB I have one page, index.php. when it calls mod_sub, a KB directory type of page is printed. Here I am trying KB to

Re: [PHP] Array Problem

2004-04-17 Thread Tom Rogers
Hi, Saturday, April 17, 2004, 7:00:49 AM, you wrote: FF Hi FF I have i Problem i got a variable a=2351 now i need to create an array out of this variable FF a[0]=1 FF a[1]=3 FF a[2]=5 FF a[3]=1 FF I have an idea to use the modulo function an do some Math but FF im sure there is a nicer way of

Re: [PHP] FPDF Help

2004-04-15 Thread Tom Rogers
Hi, Friday, April 16, 2004, 2:38:24 AM, you wrote: NM Anyone who is familiar with using FPDF to generate PDFs, I'd really NM appreciate some suggestions here: NM I am using the following code, virtually identical to that used in the NM FPDF tutorial examples. But I keep getting a parse error

Re[2]: [PHP] PHP editor

2004-04-15 Thread Tom Rogers
Hi, Friday, April 16, 2004, 2:48:03 AM, you wrote: CWP Arthur Radulescu mailto:[EMAIL PROTECTED] CWP on Thursday, April 15, 2004 4:48 AM said: Not exactly... I was not reffering to PHP files... The white spaces from a template file will make double the size of certain files when they are

Re[3]: [PHP] PHP editor

2004-04-15 Thread Tom Rogers
Hi, Friday, April 16, 2004, 3:06:09 AM, you wrote: TR Hi, TR Friday, April 16, 2004, 2:48:03 AM, you wrote: CWP Arthur Radulescu mailto:[EMAIL PROTECTED] CWP on Thursday, April 15, 2004 4:48 AM said: Not exactly... I was not reffering to PHP files... The white spaces from a template file

Re: [PHP] Single HTML form post affecting multiple HTML frames/PHP scripts

2004-04-14 Thread Tom Rogers
Hi, Wednesday, April 14, 2004, 6:57:53 PM, you wrote: RL I am writing a database front end in PHP for a record library. RL My interface is divided into several HTML frames the first of which contains RL an HTML select element listing all of the top-level records (CDs) and RL several buttons to

Re: [PHP] Never mind ... stupid me :-/ {was Re: [PHP] ereg-replace ... how to catch :'( [crying smiley] ???}

2004-04-14 Thread Tom Rogers
Hi, Thursday, April 15, 2004, 12:51:20 AM, you wrote: RB Never mind y'all ... me stupid ... RB obviously the ( has meaning, and needs to be escaped ... was starting to RB think it could only do 2 ereg's in 1 script *sigh* RB Sorry for wasting time and bandwidth ... the function now looks like

Re[2]: [PHP] Single HTML form post affecting multiple HTML frames/PHP scripts

2004-04-14 Thread Tom Rogers
Hi, Wednesday, April 14, 2004, 7:59:43 PM, you wrote: RL Tom Rogers wrote: Hi, Wednesday, April 14, 2004, 6:57:53 PM, you wrote: RL So is there a way of making a single form post affect two scripts in RL different HTML frames? Or a way of posting values from the second frame to RL

Re[2]: [PHP] Never mind ... stupid me :-/ {was Re: [PHP] ereg-replace ... how to catch :'( [crying smiley] ???}

2004-04-14 Thread Tom Rogers
Hi, Thursday, April 15, 2004, 8:56:05 AM, you wrote: RB At 15:02 14-04-2004, Tom Rogers wrote: Hi, Thursday, April 15, 2004, 12:51:20 AM, you wrote: RB Never mind y'all ... me stupid ... RB obviously the ( has meaning, and needs to be escaped ... was starting to RB think it could only do 2

Re[2]: [PHP] mysql connect function in my class

2004-04-14 Thread Tom Rogers
Hi, Thursday, April 15, 2004, 10:35:58 AM, you wrote: GD On Wednesday 14 April 2004 07:12 pm, Andy B wrote: GD Why reinvent the wheel? GD http://pear.php.net/packages.php?catpid=7catname=Database GD -- GD Greg Donald GD [EMAIL PROTECTED] How many versions of the wheel exist in the world

Re[4]: [PHP] mysql connect function in my class

2004-04-14 Thread Tom Rogers
Hi, Thursday, April 15, 2004, 2:57:48 PM, you wrote: How many versions of the wheel exist in the world today? ...not many hacked out of stone I bet :-) -- regards, Tom AB what does that mean?? is everybody saying i should give up on this idea AB then?? What I am saying is that it doesn't

Re: [PHP] PHP time zone

2004-04-13 Thread Tom Rogers
Hi, Tuesday, April 13, 2004, 9:29:19 PM, you wrote: n how can get a specific time zone, not the server time. n example: n if the server time is 13:15:46 I need to output that time +5hours n so 18:15:46 n because the hosting server time is not my local or other area time.. n thanks I have

Re[2]: [PHP] Serializing objects and storing them is sessions [fixed]

2004-04-09 Thread Tom Rogers
Hi, Saturday, April 10, 2004, 10:51:20 AM, you wrote: KH Apr 9 at 2:49pm, Jason Giangrande wrote: Kelly Hallman wrote: Try it without serializing, it works. After retesting, it seems you are correct. I guess the same bad __sleep() code that was causing the object not to unserialize at

Re: [PHP] Intermittent problem with Session Variable and IE6

2004-04-04 Thread Tom Rogers
Hi, Sunday, April 4, 2004, 9:11:08 PM, you wrote: b I have a php app that is in the final stages of testing and has been tested b by over 30 separate users. b One of the testers is having an intermittent problem which seems to be b caused by a session variable not being read properly in about 1

Re: [PHP] Sorting array of objects

2004-04-04 Thread Tom Rogers
Hi, Monday, April 5, 2004, 1:03:17 PM, you wrote: RH Hi there, RH Supposed I have an array of objects, like: $this[$i]-property1 $this[$i]-property2 RH is there any 'cheap' way to sort the array according to the values of RH property1? RH The only way I thought I would be able to accomplish

Re[2]: [PHP] Inserting string - need to trim comma

2004-04-01 Thread Tom Rogers
Hi, Friday, April 2, 2004, 5:10:29 AM, you wrote: MM snip MM function insert($table, $data) { MM $sql = INSERT INTO .$table. SET ; MM foreach ($data as $k=$v) { MM $sql.= $k. = '.$v.', ; MM } MM $sql.=;; MM $result = mysql_query($sql); MM } MM The only problem with the statement is the

Re: [PHP] Displaying a money datatype from mssql

2004-04-01 Thread Tom Rogers
Hi, Friday, April 2, 2004, 2:55:41 AM, you wrote: AH How do I correctly display a money datatype from a mssql db? AH I've looked through the archives and come up empty, and google doesn't seem AH to have anything worth mentioning. AH My query is; AH SELECT od.price, od.inventorycost,

Re: [PHP] array_search does not find the first element

2004-03-31 Thread Tom Rogers
Hi, Wednesday, March 31, 2004, 10:20:06 PM, you wrote: M Hi there, M I am trying to find values inside an array. This array always starts with 0. M unfortunatelly array_search start searching with the array element 1. M So the first element is always overlooked. M How could I shift this array

<    1   2   3   4   5   6   7   8   9   >