[PHP] Re: creating objects by reference?

2002-12-19 Thread Bastian Vogt
Hi, if you're interested in the future of object handling, I suppose you to look at this: http://www.zend.com/engine2/ZendEngine-2.0.pdf Regards, Bastian If you are looking to the future: I don't believe the ability to return objects by reference will be an option in Zend Engine 2. Matt

[PHP] problem with sending pages directly from browser

2002-12-19 Thread Kocnár Peter
I have problem with sending pages directly(by Send-Page by E-mail...) from browser(ie6) with Outlook 2002. It tells:The current document type can not be sent as mail.Would you like to send a Short cut instead?. The pages use php sessions and it is https with 128 bit encryption. I found that it is

[PHP] Re: repeat region

2002-12-19 Thread John Taylor-Johnston
Jeff or anyone, Ok, I'll bight. What are you doing with the % and %7 ? $idx=1; echo(TR) while(fetch_rows) { printf(TD%s/TD, ID); if($idx%7=0) {echo('/TRTR'} ++$idx; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: repeat region

2002-12-19 Thread Bastian Vogt
From the manual: example: $a % $b name: Modulus value: Remainder of $a divided by $b. Not from the manual: example2: 47 % 5 value2: 2 HTH, Bastian Jeff or anyone, Ok, I'll bight. What are you doing with the % and %7 ? $idx=1; echo(TR) while(fetch_rows) {

[PHP] speet testing (was URL parsing)

2002-12-19 Thread Sean Burlington
1LT John W. Holmes wrote: Assuming $url is what you have above: $tilde = strpos($url,~); $slash = strpos($url,/,$tilde); $length = $slash - $tilde; $username = substr($url,$tilde,$length); Or you can use a regular expression, but the above is probably faster.

[PHP] display edited field in table

2002-12-19 Thread Lightfirst
I am using Php/MySql and I am trying to display a table and have one of the fields (answer) editable. What I would like is to have the user edit the field and then click update. The result-display the table along with the updated field. What am I doing wrong? He is my code: ?php include

[PHP] delete() and unlink()

2002-12-19 Thread @ Nilaab
Hello Everyone, I'm using a test server on Windows XP. I have the following function (which I got from the comment notes on php.net) that works wonders when deleting directories that are not empty on a Windows system. But, I'm a bit confused. I searched for the delete() function on php.net and it

[PHP] display edited field in table

2002-12-19 Thread Lightfirst
I am using Php/MySql and I am trying to display a table and have one of the fields (answer) editable. What I would like is to have the user edit the field and then click update. The result- display the table along with the updated field. What am I doing wrong? He is my code: ?php include

[PHP] AddType application/x-httpd-source .phps

2002-12-19 Thread Freaky
Hey there, I'm trying to get .phps served in full color but it doesn't seem to work.. I added AddType application/x-httpd-php-source .phps right under the line for the application/x-httpd-php .php and I know the server sees it because when I browse to myserver/myphpscript.phps netscape says

Re: [PHP] delete() and unlink()

2002-12-19 Thread Jason Wong
On Thursday 19 December 2002 17:39, [EMAIL PROTECTED] wrote: Hello Everyone, I'm using a test server on Windows XP. I have the following function (which I got from the comment notes on php.net) that works wonders when deleting directories that are not empty on a Windows system. Good. But,

Re: [PHP] display edited field in table

2002-12-19 Thread Jason Wong
On Thursday 19 December 2002 17:44, Lightfirst wrote: I am using Php/MySql and I am trying to display a table and have one of the fields (answer) editable. What I would like is to have the user edit the field and then click update. The result- display the table along with the updated field.

[PHP] Displaying first 20 characters of a comment

2002-12-19 Thread Kevin Meredith
Hi. I am trying to find out what the best way is to display only the first 20 or so characters of a comment. The comments which are entered separately by users are stored in a MySql database. I am displaying a list of the last 5 entries on the home page and then linking them to the relevant

[PHP] sending AND recieving XML

2002-12-19 Thread K.C.P. van Zijl
Hello, I'm building this web application that has to communicate with some other web servers. This communication is done by sending and receiving XML. I discovered I don't have curl support compiled in PHP and was wondering if there are other ways to send and receive XML? 1. Perhaps I can

[PHP] JavaScript or browser detection

2002-12-19 Thread Steve Vernon
Hiya, I know it is probably out there somewhere, but I cannot find out a script to detect the browser. I have seen it, and I sorta remember how to do it, but I just can't find it! I have a script that adds nice features to my webpage, but if JavaScript is off the site still can be used.

RE: [PHP] Displaying first 20 characters of a comment

2002-12-19 Thread Quentin Bennett
The information contained in this email is privileged and confidential and intended for the addressee only. If you are not the intended recipient, you are asked to respect that confidentiality and not disclose, copy or make use of its contents. If received in error you are asked to destroy

Re: [PHP] *Premature end of script headers

2002-12-19 Thread Alexey Lysenkov
I've found it! It's session thing. Why? It stops at session_start, and moreover, I overslept this morning. Two minutes ago it had to be ready, shit!.. I'm sorry. At the other machine it runs as .exe not as mod, the guy said, version 4.0.5. I can use only $HTTP_SESSION_VARS array, but I don't know

RE: [PHP] sending AND recieving XML

2002-12-19 Thread Quentin Bennett
Hi, We are doing the exact same thing using a simple HTTP Post - the receiving PHP receives the XML, processes it, and sends back an XML answer. Works great. Hope this helps. Quentin -Original Message- From: K.C.P. van Zijl [mailto:[EMAIL PROTECTED]] Sent: Thursday, 19 December 2002

[PHP] sending and recieving XML

2002-12-19 Thread K.C.P. van Zijl
Hello, I'm building this web application that has to communicate with some other web servers. This communication is done by sending and receiving XML. I discovered I don't have curl support compiled in PHP and was wondering if there are other ways to send and receive XML? 1. Perhaps I can

RE: [PHP] Displaying first 20 characters of a comment

2002-12-19 Thread Jon Haworth
Hi Kevin, I am trying to find out what the best way is to display only the first 20 or so characters of a comment. [...] I am not sure if it is best to do it with the select statement or format it with the PHP. Either way I am not sure how. If you only want the first 20 characters, and

[PHP] Check Uploaded File

2002-12-19 Thread shaun
Hi, Is it possible to ensure that a user is uploading a jpeg file from a form and nothing else? Thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] PHP and MySQL queries

2002-12-19 Thread Rich Gray
Does it work if you put quotes around the array keys as follows... echo $line['idn']; echo $line['total']; echo $line['idp']; echo $line['position']; echo $line['points']; Rich -Original Message- From: Beauford.2002 [mailto:[EMAIL PROTECTED]] Sent: 18 December 2002 20:28 To: PHP General

[PHP] Re: JavaScript or browser detection

2002-12-19 Thread fragmonster
Hope it helps you: http://developer.netscape.com/docs/examples/javascript/browser_type_oo.html Steve Vernon wrote: Hiya, I know it is probably out there somewhere, but I cannot find out a script to detect the browser. I have seen it, and I sorta remember how to do it, but I just can't find

RE: [PHP] Check Uploaded File

2002-12-19 Thread Rich Gray
Shaun Run getimagesize() on the uploaded file - if a valid jpeg the returned array[2] will be set to 2... http://www.php.net/manual/en/function.getimagesize.php HTH Rich -Original Message- From: shaun [mailto:[EMAIL PROTECTED]] Sent: 19 December 2002 02:24 To: [EMAIL PROTECTED]

[PHP] Looping needs to re-open parm file

2002-12-19 Thread Jacob van Zanen
Hi All, I'm reading a paramter file and a text file. Per line of the text file I want to check if there is a word in there from the parameter file. However I need to open and read the parameter file for each line in the text file. How can I change this? Followin is the code I have. ? if

Re: [PHP] Looping needs to re-open parm file

2002-12-19 Thread Wico de Leeuw
Did you look at: http://www.php.net/manual/en/function.file.php Puts all lines in an array Gr, At 12:00 19-12-02 +0100, Jacob van Zanen wrote: Hi All, I'm reading a paramter file and a text file. Per line of the text file I want to check if there is a word in there from the parameter file.

Re: [PHP] JavaScript or browser detection

2002-12-19 Thread Chris Hewitt
Steve Vernon wrote: I know it is probably out there somewhere, but I cannot find out a script to detect the browser. I have seen it, and I sorta remember how to do it, but I just can't find it! From memory, a full script was posted to this list in the last few days. HTH Chris -- PHP General

Re: [PHP] FW: checking bounce email

2002-12-19 Thread Chris Hewitt
See kok Boon wrote: Can someone kindly teach me how to check for bounced emails when I use mail() to send emails? Its the Return-To smtp field that has the address that bounces are to be notified to. Using mail() I think this can be set with the last parameter. I'm being a bit vague here as

Re: [PHP] display edited field in table

2002-12-19 Thread Chris Hewitt
Lightfirst wrote: I am using Php/MySql and I am trying to display a table and have one of the fields (answer) editable. What I would like is to have the user edit the field and then click update. The result-display the table along with the updated field. What am I doing wrong? He is my code: I

Re: [PHP] Looping needs to re-open parm file

2002-12-19 Thread Wico de Leeuw
Hiya something like this ? if ($FileContent = file(d:\MyPhp\\test.ora) AND $IniContent = file(d:\MyPhp\initORA.ini)) { foreach($FileContent AS $line) { if (in_array($line, $iniContent)) { echo $LineBR\n;

[PHP] RegExpres Prob

2002-12-19 Thread John Wards
I have a regexp problem I want to go through some HTML and where img src=path/to/image.jpg I want to change it to this img src=http://www.domain.com/path/to/image.jpg; BUT if the image tag is like this img src=http://www.domain.com/path/to/image.jpg; already I don't want anything to

Re: [PHP] RegExpres Prob

2002-12-19 Thread Wico de Leeuw
At 11:18 19-12-02 +, John Wards wrote: I have a regexp problem I want to go through some HTML and where img src=path/to/image.jpg I want to change it to this img src=http://www.domain.com/path/to/image.jpg; BUT if the image tag is like this img src=http://www.domain.com/path/to/image.jpg;

Re: [PHP] RegExpres Prob

2002-12-19 Thread John Wards
On Thursday 19 Dec 2002 11:25 am, Wico de Leeuw wrote: Preg_Replace('~src=(?!http://)~iS', 'src=http://www.domain.com/', $string); Ha! Ta I am all for quick fixes but I am new to RegExpresions...so could someone explain what its all doing for me. Cheers John -- PHP General

[PHP] Inserting tab delimited textfiles into mysql

2002-12-19 Thread Thomas Goeminne
I got a tab delimited file which looks like this: let us call it items.txt TypeCatalog NumberItem DescriptionSide BProducer 12 AAA502 Afu Ra-DD Soundclash Mic Stance, Premeir,Curt Cazall 12 AC725 Roc Raida/Wayne-O - Gong Show Burn That Ass Roc Raida I

RE: [PHP] *OK, more eval for today

2002-12-19 Thread Ford, Mike [LSS]
-Original Message- From: Alexey Lysenkov [mailto:[EMAIL PROTECTED]] Sent: 18 December 2002 19:08 I am trying to do this: $tempVar1 = '\$HTTP_POST_VARS[\q4_'.$i.']'; eval(\$tempVar1=\$tempVar1\;); Well, you have the answer right there in front of you -- why not just take

RE: [PHP] flush output error

2002-12-19 Thread Ford, Mike [LSS]
-Original Message- From: electroteque [mailto:[EMAIL PROTECTED]] Sent: 19 December 2002 07:52 sorry about the false alarm , if you go here u will see a working example http://galleries.dyndns.org:1023/progress.php i had to add both flush functions together to work ,

Re: [PHP] RegExpres Prob

2002-12-19 Thread Wico de Leeuw
At 11:27 19-12-02 +, John Wards wrote: On Thursday 19 Dec 2002 11:25 am, Wico de Leeuw wrote: Preg_Replace('~src=(?!http://)~iS', 'src=http://www.domain.com/', $string); 1. find src= 2. look forward if next chars are http:// i=not case sensitive S=optimize pattern because we going to use

php-general Digest 19 Dec 2002 13:01:52 -0000 Issue 1772

2002-12-19 Thread php-general-digest-help
php-general Digest 19 Dec 2002 13:01:52 - Issue 1772 Topics (messages 128790 through 128849): Re: *OK, more eval for today 128790 by: Martin Towell 128847 by: Ford, Mike [LSS] Re: $_SERVER['DOCUMENT_ROOT'] on localhost 128791 by: DL Neil Re:

[PHP] mail()

2002-12-19 Thread Edward Peloke
Hello all, I am using the following code but when I view the sent e-mail (in my yahoo account) the link info is all plain text. I see the a tag and everything. How do I create it as a link? I know I can send them because I have done it before in my yahoo e-mail, just never through php and

[PHP] Re: mail()

2002-12-19 Thread Bastian Vogt
Hi, just add Content-Type: text/html to the header information of the mail: mail($email,'Thanks',$mailcontent,From:aircharterunited.com\nContent-Type: text/html); HTH, Bastian Hello all, I am using the following code but when I view the sent e-mail (in my yahoo account) the link info is

[PHP] Re: mail()

2002-12-19 Thread Mike Mannakee
You need to set the correct header type: Content-type: text/html otherwise it defaults to: Content-type: text/plain Mike Edward Peloke [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello all, I am using the following code but when I view the sent e-mail

Re: [PHP] RegExpres Prob

2002-12-19 Thread 1LT John W. Holmes
Why use a regular expression? $new_string = str_replace('img src=','img src=http://www.domain.com/',$old_string); ---John Holmes... - Original Message - From: John Wards [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, December 19, 2002 6:18 AM Subject: [PHP] RegExpres Prob I

Re: [PHP] speet testing (was URL parsing)

2002-12-19 Thread 1LT John W. Holmes
Assuming $url is what you have above: $tilde = strpos($url,~); $slash = strpos($url,/,$tilde); $length = $slash - $tilde; $username = substr($url,$tilde,$length); Or you can use a regular expression, but the above is probably faster. preg_match(!(~[^/]*)/!,$url,$match); or

Re: [PHP] Inserting tab delimited textfiles into mysql

2002-12-19 Thread Jason Wong
On Thursday 19 December 2002 19:31, Thomas Goeminne wrote: I got a tab delimited file which looks like this: let us call it items.txt TypeCatalog NumberItem DescriptionSide BProducer 12 AAA502 Afu Ra-DD Soundclash Mic Stance, Premeir,Curt Cazall 12 AC725 Roc

RE: [PHP] Re: mail()

2002-12-19 Thread Edward Peloke
Thanks all! I will give this a shot! -Original Message- From: Mike Mannakee [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 19, 2002 8:51 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: mail() You need to set the correct header type: Content-type: text/html otherwise it defaults to:

[PHP] pfpro configuration on win2000

2002-12-19 Thread Daniel Masson
Hello list !!! Id like to know if theres a way to enable pfpro extension on windows 2000 ... Im currently usong 4.2.3 and i havnt seen any dll for this extension in the distro Thanks for your help .. Regards. Daniel. -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

[PHP] date part

2002-12-19 Thread Diana Castillo
How can I get a string containing the month part of a date the user types in? e.g. if they type in 06/07/200 I want to get 06 thanks, diana -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] date part[Scanned]

2002-12-19 Thread Michael Egan
You could use the explode function to break the string down into its different elements with '/' as the delimiter. Problem is if you're allowing users to input the date into a text box you can't be sure how they'll enter the data. The better option is probably to constrain what they can enter

[PHP] Image resizing

2002-12-19 Thread shaun
Hi, My webserver doesn't have the GD library installed, please can someone tell me how I can resize uploaded images for thumbnails? Thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] date part

2002-12-19 Thread Edward Peloke
I used a javascript I found online in my php page. Click on the boxes next to the date fields: http://www.aircharterunited.com/pages/submit_bid.php This way, I know the format of the date when it is entered and I can pull out any part needed. Eddie -Original Message- From: Diana

[PHP] Re: Inserting tab delimited textfiles into mysql

2002-12-19 Thread David Eisenhart
I recommend that you check out phpMyAdmin http://www.phpmyadmin.net/ David Thomas Goeminne [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I got a tab delimited file which looks like this: let us call it items.txt TypeCatalog NumberItem Description

RE: [PHP] date part

2002-12-19 Thread Adam Voigt
I just tried that script, for me under Linux with Mozilla and Netscape, I had to try 5 times before I could move the mouse from the button to the menu fast enough, every other time it would just disappear when I tried to move the mouse from the button to it. On Thu, 2002-12-19 at 09:59,

RE: [PHP] date part

2002-12-19 Thread Edward Peloke
Thanks Allan! That is good to know. It is just a script that I downloaded from the internet. Not sure how to make it work better for linux but I will look into it. I appreciate the info! Eddie -Original Message- From: Adam Voigt [mailto:[EMAIL PROTECTED]] Sent: Thursday,

[PHP] Random include???

2002-12-19 Thread Benjamin Trépanier
Hi, I'm a newbie in php so sorry for that question! I have a table in a html dcc and I want toinclude a file in a cell, but that file must be random so people load a different page each time they refresh... The basic syntax I use for the include is below now, I want to know how to generate

RE: [PHP] Random include???

2002-12-19 Thread Edward Peloke
Won't this work? $random=rand(1,5); print TD WIDTH=77 HEIGHT=435 ROWSPAN=2 align='left'; include(folio_$random.php); -Original Message- From: Benjamin Trépanier [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 19, 2002 9:46 AM To: [EMAIL PROTECTED] Subject: [PHP] Random

RE: [PHP] date part

2002-12-19 Thread Edward Peloke
Sorry ADAM, didn't mean to call you Allan, I apologize! -Original Message- From: Edward Peloke [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 19, 2002 10:11 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] date part Thanks Allan! That is good to know. It is just a script that I

[PHP] validate date

2002-12-19 Thread Diana Castillo
If a user inputs a date into a form, what function can I use to validate that he put in a valid date? I want to use checkdate but that needs the date split up into day, month year. Anyone have an easy way of doing this? Thanks, Diana -- PHP General Mailing List (http://www.php.net/) To

RE: [PHP] date part

2002-12-19 Thread Adam Voigt
I do the same thing all the time, when you respond on mailing lists it's hard to keep track. =) On Thu, 2002-12-19 at 10:22, Edward Peloke wrote: Sorry ADAM, didn't mean to call you Allan, I apologize! -Original Message- From: Edward Peloke

RE: [PHP] validate date

2002-12-19 Thread Jon Haworth
Hi Diana, If a user inputs a date into a form, what function can I use to validate that he put in a valid date? You can't. Here are two dates in two different formats. Only one is valid. - 13/04/01 - 13/04/01 Can you spot which is which? I want to use checkdate but that needs the date

[PHP] display all results

2002-12-19 Thread Simon
Hi, I have 6 records in mysql. How can i display all of them, but not using while. Do i have to use 6 queries. Results need to be hard formated, so that s the reason why i cant use while. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] offline application

2002-12-19 Thread Alexander Kuznetsov
Hi All! I have a database. And now I need to create something like offline site with that database: ii means php pages, html and images. After this I will burn all it to CD. And that CD should be working om every machine (I suppose win32 as OS and php will be installed if needed). Question: can

Re: [PHP] display all results

2002-12-19 Thread Jason Wong
On Thursday 19 December 2002 23:11, Simon wrote: Hi, I have 6 records in mysql. How can i display all of them, but not using while. Do i have to use 6 queries. Results need to be hard formated, so that s the reason why i cant use while. Not really sure what you need here but I guess you

[PHP] Error installing

2002-12-19 Thread Mako Shark
Anybody have any bright ideas? Trying to install my own PHP on my own server. I'm getting the error Redirection limit for this URL exceeded. Unable to load the requested page. I'm using Apache 2 and php 4.2.3 and haven't loaded any extensions in PHP (yet).

[PHP] Re: offline application

2002-12-19 Thread Philippe Saladin
I have a database. And now I need to create something like offline site with that database: ii means php pages, html and images. After this I will burn all it to CD. And that CD should be working om every machine (I suppose win32 as OS and php will be installed if needed). You would have a

RE: [PHP] Re: offline application

2002-12-19 Thread Edward Peloke
Would it be possible to use something like this to create a page that the user can open up on their machine that would transfer data from an access file on their machine to a mysql db on my server? Thanks, Edie -Original Message- From: Philippe Saladin [mailto:[EMAIL PROTECTED]] Sent:

[PHP] Getting the username

2002-12-19 Thread Manuel Ochoa
I'm developing an Intranet at my company and was wondering if there is any way to get the username from someone who is already logged into a Windows network?

Re: [PHP] Getting the username

2002-12-19 Thread 1LT John W. Holmes
I'm developing an Intranet at my company and was wondering if there is any way to get the username from someone who is already logged into a Windows network? I think $_SERVER['LOGON_USER'] or maybe $_ENV['LOGON_USER'] or something similar. I think you have to use NT permissions on the directory

[PHP] Re: Image resizing

2002-12-19 Thread Bogdan Stancescu
What platform are you running PHP on? Shaun wrote: Hi, My webserver doesn't have the GD library installed, please can someone tell me how I can resize uploaded images for thumbnails? Thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] One php returning several htmls

2002-12-19 Thread John Hinton
I'll go into index.php and return a portion of the html code, upon clicking a link, I'll return another portion of the html code. My question is what seems to be the best/cleanest/fastest method for doing this? I've done this with forms and the PHP_SELF action method... Wondering about simple

Re: [PHP] Re: offline application

2002-12-19 Thread Philippe Saladin
Would it be possible to use something like this to create a page that the user can open up on their machine that would transfer data from an access file on their machine to a mysql db on my server? If I understand well, you want to transfer data from Access to MySql ? 1) Could we imagine a

Re: [PHP] validate date

2002-12-19 Thread Manuel Ochoa
Here is a funtion that I use. A user can enter a date in any of the following ways: 01 01 03 01-01-03 1-1-03 01-1-2003 1-01/03 1/1 03 you get the idea... This function will standardize the date and make sure it's valid. If invalid it returns ERROR function fixdate($data){ $aux[0]=; $aux[1]=;

[PHP] Regex Help

2002-12-19 Thread Jim
Could someone show me how to use preg_replace to change this: test OPTION VALUE=testtest/OPTION test into: anotherword OPTION VALUE=\test\test/OPTION anotherword basically, I want to change a value only if it is not in an option tag. I also want to account for situations like : test,

RE: [PHP] Re: offline application

2002-12-19 Thread Edward Peloke
This is pretty much what I want with as little work to the user as possible. -Original Message- From: Philippe Saladin [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 19, 2002 12:16 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: offline application Would it be possible to use

[PHP] Creating access DB in PHP ..

2002-12-19 Thread Chad Day
Not sure if this is possible, and I haven't turned up what I'm looking for in my searches yet.. I am running PHP on a FreeBSD box .. I need to create an Access database, fill it in with some data, and have a client download it (as the software the client is using only imports mdb files). Is this

Re: [PHP] Regex Help

2002-12-19 Thread Rick Emery
addslashes() - Original Message - From: Jim [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, December 19, 2002 11:26 AM Subject: [PHP] Regex Help Could someone show me how to use preg_replace to change this: test OPTION VALUE=testtest/OPTION test into: anotherword OPTION

Re: [PHP] Regex Help

2002-12-19 Thread Jim
I'm sorry, I accidentally left the slashes on my second example. My original message should read: Could someone show me how to use preg_replace to change this: test OPTION VALUE=testtest/OPTION test into: anotherword OPTION VALUE=testtest/OPTION anotherword Note that what I want to accomplish

RE: [PHP] Looping needs to re-open parm file

2002-12-19 Thread John W. Holmes
I'm reading a paramter file and a text file. Per line of the text file I want to check if there is a word in there from the parameter file. However I need to open and read the parameter file for each line in the text file. How can I change this? Can't you read the param file first into an

RE: [PHP] date part

2002-12-19 Thread John W. Holmes
How can I get a string containing the month part of a date the user types in? e.g. if they type in 06/07/200 I want to get 06 If you know that's the format they're going to use, the you can just use substr() to grab the first two characters. ---John W. Holmes... PHP Architect - A monthly

RE: [PHP] validate date

2002-12-19 Thread John W. Holmes
If a user inputs a date into a form, what function can I use to validate that he put in a valid date? I want to use checkdate but that needs the date split up into day, month year. Anyone have an easy way of doing this? You have to specify a date format to your users, or at least assume a

Re: [PHP] Regex Help

2002-12-19 Thread Rick Emery
?php $q = test OPTION VALUE=\test\test/OPTION test; ereg((.*)(OPTION.*OPTION)(.*),$q,$ar); $t = anotherword.$ar[2].anotherword; print $t; ? outputs: anotherwordOPTION VALUE=testtest/OPTIONanotherword - Original Message - From: Jim [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday,

Re: [PHP] date part

2002-12-19 Thread Rick Emery
Following on to the L T: $ar = explode(/,$thestring); thenL $ar[0] = 06 $ar[1] = 07 $ar[2] = 200 - Original Message - From: John W. Holmes [EMAIL PROTECTED] To: 'Diana Castillo' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, December 19, 2002 11:56 AM Subject: RE: [PHP] date part

[PHP] case statement?

2002-12-19 Thread Max Clark
Hi- I was wondering if php had a case function? Instead of building a large if/elseif/else block I would like to do a case $page in (list). Thanks in advance, Max -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Fw: [PHP] case statement?

2002-12-19 Thread Rick Emery
switch() { case a: case b: case c: default: } RTFM - Original Message - From: Max Clark [EMAIL PROTECTED] To: Sent: Thursday, December 19, 2002 12:19 PM Subject: [PHP] case statement? Hi- I was wondering if php had a case function? Instead of building a large if/elseif/else

Re: [PHP] case statement?

2002-12-19 Thread Chris Wesley
On Thu, 19 Dec 2002, Max Clark wrote: I was wondering if php had a case function? Instead of building a large if/elseif/else block I would like to do a case $page in (list). switch function ... http://www.php.net/manual/en/control-structures.switch.php ~Chris -- PHP General

RE: [PHP] case statement?

2002-12-19 Thread Ford, Mike [LSS]
-Original Message- From: Max Clark [mailto:[EMAIL PROTECTED]] Sent: 19 December 2002 18:19 I was wondering if php had a case function? Instead of building a large if/elseif/else block I would like to do a case $page in (list). http://www.php.net/control-structures.switch

Re: [PHP] Regex Help

2002-12-19 Thread Jim
Thanks for helping. Unfortunately, that doesn't quite accomplish the task either. The other example for my first post would be mangled with that. - Original Message - From: Rick Emery [EMAIL PROTECTED] To: Jim [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, December 19, 2002 1:09 PM

RE: [PHP] Re: offline application

2002-12-19 Thread Edward Peloke
using php, can I extract data from an access file? -Original Message- From: Philippe Saladin [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 19, 2002 12:16 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: offline application Would it be possible to use something like this to create

Re: [PHP] Regex Help

2002-12-19 Thread Jim
Whoops, sorry post aborted prematurely. What I was going say say was that: test, something OPTION VALUE=testtest/OPTION test! should become: anotherword, something OPTION VALUE=testtest/OPTION anotherword! Thanks again for helping! - Original Message - From: Jim [EMAIL PROTECTED]

Re: [PHP] Regex Help

2002-12-19 Thread Rick Emery
gawd, Jim, you are s oicky GRIN ?php $q = test, something OPTION VALUE=\test\test/OPTION test; ereg((.*)(OPTION.*OPTION)(.*),$q,$ar); $w1 = ereg_replace(test,anotherword,$ar[1]); $w2 = ereg_replace(test,anotherword,$ar[3]); $t = $w1.$ar[2].$w2; print $t; ? outputs: anotherword, something

RE: [PHP] Regex Help

2002-12-19 Thread John W. Holmes
There may be better ways, but this little example works. You basically match everything around the option tag and run a replace on what's outside of it, and then put it all back together. This example should run as is. Adapt to your needs. ? header(Content-type: text/plain); $word = test;

Re: [PHP] case statement?

2002-12-19 Thread Manuel Ochoa
Yes, It's called SWITCH Just go to www.php.net and lookup switch in the function list Max Clark [EMAIL PROTECTED] wrote:Hi- I was wondering if php had a case function? Instead of building a large if/elseif/else block I would like to do a case $page in (list). Thanks in advance, Max --

Re: [PHP] case statement?

2002-12-19 Thread Mark Charette
On Thu, 19 Dec 2002, Max Clark wrote: Hi- I was wondering if php had a case function? Instead of building a large if/elseif/else block I would like to do a case $page in (list). The documentation and search capabilities at http://www.php.net are your frientd. It would behhove you to at

Re: [PHP] speet testing (was URL parsing)

2002-12-19 Thread Sean Burlington
1LT John W. Holmes wrote: I wonder if you could pass on some pointers for speed testing. thanks Nothing fancy. Just using the getmicrotime() function defined on the microtime() manual page to get the time before the bit I'm testing and after and subtract to get the difference.

[PHP] Sound with PHP

2002-12-19 Thread Alfonso Ballesteros
Hello... I'm a newcomer and wish to know if it is possible to play sound files (mp3 or wav) using PHP. For example, if I have 2 sound files, how to play one after the other. Thanks Alfonso -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] delete() and unlink()

2002-12-19 Thread @ Nilaab
Thanks Jason, That makes much more sense now. I forgot about recursive functions, as I don't use them often. I should look into it further. It seems to be very helpful in some cases. Thanks again for your help. - Nilaab -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]]

Re: [PHP] Sound with PHP

2002-12-19 Thread Andrew Brampton
If you are trying to play the sounds on the client's PC, then you can't do this with PHP PHP is a server side language, so if you tried playing soudns with it, it would only be heard by the people standing next to your server :).. You might want to take a look at some HTML or JScript, or Flash,

RE: [PHP] Sound with PHP

2002-12-19 Thread James E Hicks III
The only way this would work with PHP on the webserver would be to embed the sound file in the webpage or some other HTML to do it. I even think there is a way to queue files like you are asking about, but this would be an HTML thing and not PHP. James -Original Message- From: Alfonso

[PHP] Re: One php returning several htmls

2002-12-19 Thread Jeff
A HREF=index.php?PageID=1Go to page 1/A John Hinton [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I'll go into index.php and return a portion of the html code, upon clicking a link, I'll return another portion of the html code. My question is what seems to be

[PHP] odbc

2002-12-19 Thread Edward Peloke
Ok, I am lost now, I am just trying to read the documentation on odbc...here is what I have so far. This seems to work...or at least not give any errors. How do I know get to the result set in the select statement to move this data somewhere else? I just want to get the entire result set so I can

[PHP] Question about the exit() command

2002-12-19 Thread Beauford.2002
Hi, Could someone clarify this for me. I want to be able to exit out of a PHP webpage and return to the calling page if certain conditions are not met. It appears using exit() will do this, but I am unclear exactly how to use it. any info is appreciated. TIA -- PHP General Mailing List

Re: [PHP] Question about the exit() command

2002-12-19 Thread Philip Olson
How about: if (!$conn = mysql_connect($host, $user, $pass)) { include 'static_html.inc'; exit; } print Welcome, yes the database is connected; exit ends the script, nothing after its use is executed. Regards, Philip Olson On Thu, 19 Dec 2002, Beauford.2002 wrote: Hi,

  1   2   >