[PHP] mail() function dying half way through.

2006-06-09 Thread Dave M G
PHP List, I have a database of about 120 users. Each weak I send out a newsletter. So far as I know, it's been working fine for the last couple of years. Then recently some users emailed me to let me know that they haven't been receiving all the messages. I added extra output to my script to

Re: [PHP] Update table to get consecutive Primary keys

2006-06-09 Thread Larry Garfield
On Thursday 08 June 2006 23:58, Antonio Bassinger wrote: Hi All! I've a MySQL table: table (id INT NOT NULL AUTO_INCREMENT, flag TINYINT NOT NULL, msgID VARCHAR(30) NOT NULL, msgName

Re: [PHP] mail() function dying half way through.

2006-06-09 Thread Chris
Dave M G wrote: PHP List, I have a database of about 120 users. Each weak I send out a newsletter. So far as I know, it's been working fine for the last couple of years. Then recently some users emailed me to let me know that they haven't been receiving all the messages. I added extra

[PHP] substring with numric values

2006-06-09 Thread Jonas Rosling
Is there any easy way to trim or pick out the none decimal values in a numric value? Like: 1,333 = 1 5,667 = 5 12,145 = 12 15,997 = 15 Thanks // Jonas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] substring with numric values

2006-06-09 Thread David Tulloh
Jonas Rosling wrote: Is there any easy way to trim or pick out the none decimal values in a [numeric] value? Like: 1,333 = 1 5,667 = 5 12,145 = 12 15,997 = 15 $variable = 1,333; $trimmed = (int)$variable; # = 1 David -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

[PHP] xml validation

2006-06-09 Thread weetat
Hi all , Thanks to everbody in this group , really help me a lot. I have a raw xml file from our clients. My question is how to validate the xml file if the file is xml compliance ? Thanks - weetat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] Re: order of elements in $_POST super global

2006-06-09 Thread Ford, Mike
On 08 June 2006 16:20, Ben Liu wrote: I probably should add some more details to my question: The names of the form checkboxes could be changed from ie: bool_careers, bool_speaking, bool_internship, etc. to a single array bool_questions[], for instance. The problem with that is that I am

[PHP] PHP Job offers in Munich, Germany

2006-06-09 Thread Karl Pitrich
Hi, We're a small company (~ 70 ppl) co-located on the Siemens AG campus in Munich, Germany. We're into Digital Forms, Digital Pen Paper and Web2Print Solutions, In particular we are mostly dealing with solution business for large scale customers. Our existing platform is PHP based, running

[PHP] Multidimension Array

2006-06-09 Thread weetat
Hi all , I have the arrays as shown below : How to get the array value in the [TBA04490054] and [JAE070406RT] ? For example , [0] = 'SAD04520AZD' ,[1]= 'SAL04430RE9' and so on. Anybody have any ideas or suggestions how to do it ? Thanks - weetat Array ( [TBA04490054] = Array

Re: [PHP] Multidimension Array

2006-06-09 Thread Rabin Vincent
On 6/9/06, weetat [EMAIL PROTECTED] wrote: How to get the array value in the [TBA04490054] and [JAE070406RT] ? For example , [0] = 'SAD04520AZD' ,[1]= 'SAL04430RE9' and so on. Anybody have any ideas or suggestions how to do it ? Thanks - weetat Array ( [TBA04490054] = Array

RE: [PHP] binary zero evaluates as true!?

2006-06-09 Thread Ford, Mike
On 09 June 2006 04:11, D. Dante Lorenso wrote: Jon wrote: The second thing that needs to be said here is simply a re-statement of the original, this time more verbosely. The list of things in php that evaluate as false is as follows: * the boolean FALSE itself * the integer 0

[PHP] Re: XPath avg(), min(), max() functions not found

2006-06-09 Thread Alex
Rob Richards wrote: min(), max() and avg() don't exist in XPath 1.0 which is the version implemented in libxml2. You need to calculate these yourself. For example: Thanks for your help. Alex -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Restrict uploaded scripts

2006-06-09 Thread tedd
Mathias: So what's wrong with either naming each file with a unique name or placing each file in a unique folder? If it's unique, then how can they overwrite it? I must not be understanding what you want. tedd At 7:24 AM +0200 6/9/06, Mathias Bundgaard Svesson wrote: Wouldn't they still

RE: [PHP] xml validation

2006-06-09 Thread Jay Blanchard
[snip] Thanks to everbody in this group , really help me a lot. I have a raw xml file from our clients. My question is how to validate the xml file if the file is xml compliance ? [/snip] http://www.php.net/xml -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] xml validation

2006-06-09 Thread Brad Bonkoski
This article has some good information about PHP/XML including validation: http://www.zend.com/php5/articles/php5-xmlphp.php -Brad weetat wrote: Hi all , Thanks to everbody in this group , really help me a lot. I have a raw xml file from our clients. My question is how to validate the

[PHP] Differentiating between POST from an application or browser

2006-06-09 Thread Manoj
Hello, In our product, we use PHP for webservices that is inbuilt in the app. Basically, the tool calls the PHP over which is hosted over internet and communicates using XML. We send the data as raw post and in the PHP we get it as: $xmlrcvd = file_get_contents(“php://”); Now if the user

Re: [PHP] Re: order of elements in $_POST super global

2006-06-09 Thread Ben Liu
Hi Mike, Thanks for pointing that out. I hadn't thought of it but you are right. But I still don't think this addresses the issue of ordering. The basic problem is that the way a $_POST variable gets processed is in the order it is in on the original form. If you want to present the fields in

RE: [PHP] Restrict uploaded scripts

2006-06-09 Thread Jim Moseby
Wouldn't they still be able to overwrite each other? I don't think I expressed myself clearly. The point of the protection is to keep the scripts from overwriting each other on purpose. It was a protection that would make it posible to upload scripts, even if you were not completly sure

[PHP] parsing out quoted text

2006-06-09 Thread sam
$str='bass electric organ bagpipes'; $parser($str); $query=SELECT * FROM table WHERE tb_instr = bass AND tb_instr = electric organ //quoted phrase AND tb_instr = bagpipes; Anybody know where I can just copy code that will do the above? thanks -- PHP General Mailing List

[PHP] Re: order of elements in $_POST super global

2006-06-09 Thread Mindaugas L
Hello, The basic problem is that the way a $_POST variable gets processed is in the order it is in on the original form. I think it's very natural behaviour. But be careful with associative arrays, I think before version 5.12.there was a bug, if you want that PHP makes an associative array of

[PHP] Re: order of elements in $_POST super global

2006-06-09 Thread Ben Liu
Hi Mindaugas, I wasn't trying to imply that there was something wrong or illogical about the way the $_POST variable is processed. It is logical that it processes in the order listed in html. Perhaps I should have said, my problem rather than the problem. I'll be sure to read about the

RE: [PHP] parsing out quoted text

2006-06-09 Thread Jef Sullivan
Set your string to an array and use the elements in your query. Jef -Original Message- From: sam [mailto:[EMAIL PROTECTED] Sent: Friday, June 09, 2006 6:53 AM To: PHP Subject: [PHP] parsing out quoted text $str='bass electric organ bagpipes'; $parser($str); $query=SELECT * FROM

Re: [PHP] parsing out quoted text

2006-06-09 Thread Dave Goodchild
$str='bass electric organ bagpipes'; $parser($str); $query=SELECT * FROM table WHERE tb_instr = bass AND tb_instr = electric organ //quoted phrase AND tb_instr = bagpipes; Anybody know where I can just copy code that will do the above? thanks Why will there be a quoted

[PHP] Set PDO to ALWAYS return fetched rows with PDO::FETCH_ASSOC?

2006-06-09 Thread Rick Harding
I am trying to go through the PDO documentation to set up PDO to always use PDO::FETCH_ASSOC instead of being forced to include this attribute on each and every fetch call. Can anyone tell me if there is a setAttribute value I can set when I create the db connection handler that I reuse

Re: [PHP] parsing out quoted text

2006-06-09 Thread nicolas figaro
sam a écrit : $str='bass electric organ bagpipes'; $parser($str); $query=SELECT * FROM table WHERE tb_instr = bass AND tb_instr = electric organ //quoted phrase AND tb_instr = bagpipes; Anybody know where I can just copy code that will do the above? you wish to split $str and

Re: [PHP] parsing out quoted text

2006-06-09 Thread Stut
sam wrote: $str='bass electric organ bagpipes'; $parser($str); $query=SELECT * FROM table WHERE tb_instr = bass AND tb_instr = electric organ //quoted phrase AND tb_instr = bagpipes; Anybody know where I can just copy code that will do the above? The following was just pushed out

[PHP] arrays

2006-06-09 Thread Jesús Alain Rodríguez Santos
if I have two arrays, example: $a = array (one, two, three, four, two); $b = array (seven, one, three, six, five); How can I get in another variable a new array with the same elements into $a and $b. -- Este mensaje ha sido analizado por MailScanner en busca de virus y otros contenidos

RE: [PHP] arrays

2006-06-09 Thread Jay Blanchard
[snip] if I have two arrays, example: $a = array (one, two, three, four, two); $b = array (seven, one, three, six, five); How can I get in another variable a new array with the same elements into $a and $b. [/snip] http://www.php.net/array_merge -- PHP General Mailing List

Re: [PHP] arrays

2006-06-09 Thread Dave Goodchild
Hola Jesus. Hablo un pocitio espanol, pero en ingles no estoy seguro que quieres decir. Si te ayudara, envia el mensaje otra vez en espanol y tratare comprender. On 09/06/06, Jesús Alain Rodríguez Santos [EMAIL PROTECTED] wrote: if I have two arrays, example: $a = array (one, two, three,

Re: [PHP] arrays

2006-06-09 Thread Rabin Vincent
On 6/9/06, Jesús Alain Rodríguez Santos [EMAIL PROTECTED] wrote: if I have two arrays, example: $a = array (one, two, three, four, two); $b = array (seven, one, three, six, five); How can I get in another variable a new array with the same elements into $a and $b. php.net/array_intersect

[PHP] Skip first 4 array values

2006-06-09 Thread Jonas Rosling
Is there any way you can skip for example the first 4 array values/posisions in an array no matter how many values it contains? Thanks // Jonas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Skip first 4 array values

2006-06-09 Thread Jef Sullivan
Why? Jef -Original Message- From: Jonas Rosling [mailto:[EMAIL PROTECTED] Sent: Friday, June 09, 2006 7:48 AM To: PHP List Subject: [PHP] Skip first 4 array values Is there any way you can skip for example the first 4 array values/posisions in an array no matter how many values it

Re: [PHP] Skip first 4 array values

2006-06-09 Thread Dave Goodchild
On 09/06/06, Jonas Rosling [EMAIL PROTECTED] wrote: Is there any way you can skip for example the first 4 array values/posisions in an array no matter how many values it contains? Thanks // Jonas Skip $array[0], $array[1], $array[2], $array[3] if you are talking about integer-indexed arrays.

Re: [PHP] Skip first 4 array values

2006-06-09 Thread Brad Bonkoski
if numerically indexed: $max = count($array); for($i=0; $i$max;$i++) { if( $i = 3 ) continue; else { //do what you will } } for associative... $count = 0; foreach($arr as $k = $v ) { if($count = 3 ) conitnue; else { //do stuff } $count++; } -Brad

Re: [PHP] Skip first 4 array values

2006-06-09 Thread Rabin Vincent
On 6/9/06, Jonas Rosling [EMAIL PROTECTED] wrote: Is there any way you can skip for example the first 4 array values/posisions in an array no matter how many values it contains? php.net/array_slice if you want to cut them off. Rabin -- PHP General Mailing List (http://www.php.net/) To

RE: [PHP] Restrict uploaded scripts

2006-06-09 Thread Mathias Bundgaard Svesson
Wouldn't it even be posible, if the script couldn't be run directly, but had to be run through require or something like that? fre, 09 06 2006 kl. 08:38 -0400, skrev Jim Moseby: Wouldn't they still be able to overwrite each other? I don't think I expressed myself clearly. The point of the

[PHP] RE: order of elements in $_POST super global

2006-06-09 Thread Ford, Mike
On 09 June 2006 13:55, Mindaugas L wrote: Hello, The basic problem is that the way a $_POST variable gets processed is in the order it is in on the original form. I think it's very natural behaviour. But be careful with associative arrays, I think before version 5.12.there was a bug,

Re: [PHP] Skip first 4 array values

2006-06-09 Thread Eric Butera
On 6/9/06, Brad Bonkoski [EMAIL PROTECTED] wrote: if numerically indexed: $max = count($array); for($i=0; $i$max;$i++) { if( $i = 3 ) continue; else { //do what you will } } Why not start $i at 3 and skip the if else? -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] Skip first 4 array values

2006-06-09 Thread Brad Bonkoski
Eric Butera wrote: On 6/9/06, Brad Bonkoski [EMAIL PROTECTED] wrote: if numerically indexed: $max = count($array); for($i=0; $i$max;$i++) { if( $i = 3 ) continue; else { //do what you will } } Why not start $i at 3 and skip the if else? you could, just a simple

RE: [PHP] Restrict uploaded scripts

2006-06-09 Thread Jim Moseby
Wouldn't it even be posible, if the script couldn't be run directly, but had to be run through require or something like that? Require just includes the code inline. It still runs on the webserver as the server user as if it were one big script. I think you would have to sanitize the

Re: [PHP] arrays

2006-06-09 Thread Mariano Guadagnini
Jess Alain Rodrguez Santos wrote: if I have two arrays, example: $a = array ("one", "two", "three", "four", "two"); $b = array ("seven", "one", "three", "six", "five"); How can I get in another variable a new array with the same elements into $a and $b. $new_array =

Re: [PHP] Skip first 4 array values

2006-06-09 Thread Robert Cummings
On Fri, 2006-06-09 at 10:28, Brad Bonkoski wrote: Eric Butera wrote: On 6/9/06, Brad Bonkoski [EMAIL PROTECTED] wrote: if numerically indexed: $max = count($array); for($i=0; $i$max;$i++) { if( $i = 3 ) continue; else { //do what you will } }

[PHP] Tables vs. databases

2006-06-09 Thread Antonio Bassinger
Hi gang, Situation: I've a HTTP server. I intend to run a file upload service. There could be up to 1 subscribers. Each saving files up to 10 MB. I made a proof-of-concept service using PHP MySQL, where there is a single database, but many tables - a unique table for each subscriber. But

Re: [PHP] Tables vs. databases

2006-06-09 Thread Dave Goodchild
On 09/06/06, Antonio Bassinger [EMAIL PROTECTED] wrote: Hi gang, Situation: I've a HTTP server. I intend to run a file upload service. There could be up to 1 subscribers. Each saving files up to 10 MB. I made a proof-of-concept service using PHP MySQL, where there is a single database,

[PHP] Session puzzle... / why no new session?

2006-06-09 Thread Ryan A
Hi, I am working on a very simple script, basically adding features to an older script, I'll write down the main parts: ?php ini_set('session.name', 'COSTREAM_SESSION'); session_start(); ## authenticate user code comes here ## log the user

Re: [PHP] Tables vs. databases

2006-06-09 Thread Jochem Maas
Antonio Bassinger wrote: Hi gang, Situation: I've a HTTP server. I intend to run a file upload service. There could be up to 1 subscribers. Each saving files up to 10 MB. I made a proof-of-concept service using PHP MySQL, where there is a single database, but many tables - a

Re: [PHP] Skip first 4 array values

2006-06-09 Thread Martin Alterisio
2006/6/9, Jonas Rosling [EMAIL PROTECTED]: Is there any way you can skip for example the first 4 array values/posisions in an array no matter how many values it contains? Thanks // Jonas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Tables vs. databases

2006-06-09 Thread Richard Lynch
On Fri, June 9, 2006 12:10 pm, Antonio Bassinger wrote: I've a HTTP server. I intend to run a file upload service. There could be up to 1 subscribers. Each saving files up to 10 MB. I made a proof-of-concept service using PHP MySQL, where there is a single database, but many tables -

Re: [PHP] Skip first 4 array values

2006-06-09 Thread Richard Lynch
Jonas Rosling wrote: Is there any way you can skip for example the first 4 array values/posisions in an array no matter how many values it contains? http://php.net/array_slice -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] substring with numric values

2006-06-09 Thread Richard Lynch
$int = (int) $value; On Fri, June 9, 2006 2:51 am, Jonas Rosling wrote: Is there any easy way to trim or pick out the none decimal values in a numric value? Like: 1,333 = 1 5,667 = 5 12,145 = 12 15,997 = 15 Thanks // Jonas -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] mail() function dying half way through.

2006-06-09 Thread Richard Lynch
On Fri, June 9, 2006 12:59 am, Dave M G wrote: I have a database of about 120 users. Each weak I send out a newsletter. So far as I know, it's been working fine for the last couple of years. Then recently some users emailed me to let me know that they haven't been receiving all the messages.

Re: [PHP] transfer file

2006-06-09 Thread Richard Lynch
On Thu, June 8, 2006 10:16 pm, kristianto adi widiatmoko wrote: can php do transfer file betwen 2 server without using ftp function socket that use ftp port If you want to re-write all the FTP stuff in PHP, with http://php.net/fsockopen and fgets and fputs, sure, you could do that... Kinda

Re: [PHP] remove last comma in string

2006-06-09 Thread Richard Lynch
You're missing an = for the city. substr() should have worked. rtrim() won't work, as ',' is not whitespace. On Thu, June 8, 2006 7:58 pm, weetat wrote: Hi all, I am using php 4.3.2 and mysql , linux. I have a sql statement below : UPDATE tbl_chassis_temp SET country =

Re: [PHP] order of elements in $_POST super global

2006-06-09 Thread Richard Lynch
On Thu, June 8, 2006 9:59 am, Ben Liu wrote: I'm using a form (method=POST) to collect 30 boolean values from the end user using a series of checkboxes in the form. The form is arranged in a table so that the 30 check boxes are not a long list but rather three columns (with related items

Re: [PHP] remove last comma in string

2006-06-09 Thread Paul Novitski
weetat wrote: I have a sql statement below : UPDATE tbl_chassis_temp SET country = 'Singapore', city 'SINGAPORE', building = 'Tampines Central 6', other = 'Level 03-40', I need to remove the last comma from sql text above. I have tried using substr and rtrim , without any success ?

Re: [PHP] Re: order of elements in $_POST super global

2006-06-09 Thread Richard Lynch
On Fri, June 9, 2006 7:34 am, Ben Liu wrote: The basic problem is that the way a $_POST variable gets processed is in the order it is in on the original form. This is an undocumented behaviour, almost for sure. Your script shouldn't rely on it, even if a skillion other scripts do. :-) --

Re: [PHP] remove last comma in string

2006-06-09 Thread Richard Lynch
On Fri, June 9, 2006 5:17 pm, Paul Novitski wrote: rtrim() won't work, as ',' is not whitespace. Richard, you're wrong -- read the manual. All three functions trim(), ltrim(), and rtrim() allow you to append an optional list of characters to be trimmed: http://php.net/trim

Re: [PHP] Re: order of elements in $_POST super global

2006-06-09 Thread Richard Lynch
name=bool[0][careers] might do what you want... it's really quite difficult to say without a concrete example... On Thu, June 8, 2006 10:20 am, Ben Liu wrote: I probably should add some more details to my question: The names of the form checkboxes could be changed from ie: bool_careers,

Re: [PHP] server sending notifications to clients

2006-06-09 Thread Richard Lynch
On Thu, June 8, 2006 9:24 am, kartikay malhotra wrote: Is there a way for the server to notify the client about an event, provided the client was online in the past X minutes? To elaborate: A client comes online. A script PHP executes (serves the client), and terminates. Now if a new event

Re: [PHP] running php method in the background

2006-06-09 Thread Richard Lynch
On Thu, June 8, 2006 9:10 am, Nic Appleby wrote: I have a php web script which communicates with a server using sockets. There is a method in which the client listens for messages from the server, and this blocks the client. I need a way to 'fork' a process or to get this method to run in the

[PHP] Using php4 to manage Apache 1.3 access database

2006-06-09 Thread Doug Carter
I'm trying to make a web page to maintain my Apache authorization file with instead of dbmmanage. Since I have to have php loaded for other reasons I started there. Problem seems to be that the OpenBSD package and port systems only seem to gdbm for php-4 and gdbm is not supported by Apache 1.3

Re: [PHP] Session puzzle... / why no new session?

2006-06-09 Thread chris smith
On 6/10/06, Ryan A [EMAIL PROTECTED] wrote: Hi, I am working on a very simple script, basically adding features to an older script, I'll write down the main parts: ?php ini_set('session.name', 'COSTREAM_SESSION'); session_start(); ## authenticate user code comes here ## log the user

Re: [PHP] Tables vs. databases

2006-06-09 Thread chris smith
On 6/10/06, Antonio Bassinger [EMAIL PROTECTED] wrote: Hi gang, Situation: I've a HTTP server. I intend to run a file upload service. There could be up to 1 subscribers. Each saving files up to 10 MB. I made a proof-of-concept service using PHP MySQL, where there is a single database,

[PHP] How to tell if a socket is connected

2006-06-09 Thread Michael W.
Hello, Can any of you tell me how to tell whether a socket (from fsockopen()) is connected or not? Specifically, whether the remote server has closed the connection? Stream_get_meta_data() does not do it; in my tests, its output does not change even when the server closes the stream. Thank you,

[PHP] Mail sending program (beginner)

2006-06-09 Thread aci india
Dear group, Description: Following is the code which I tried for learning propuses. It is a mail sending program which checks weather the user enters a correct mail id If he enters the correct mail ID then user name and e-mail will get stored in the mysql data base table. After getting stored