[PHP] My mail have a problem!!

2002-10-31 Thread joskey
My mail have a problem, I can receive this mail list, 
but can send to it, who can tell me a better free mail which support pop3 and smtp?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] My mail have a problem!!

2002-10-31 Thread John Nichel
U

*wonders if he should point out the obvious*

joskey wrote:
 My mail have a problem, I can receive this mail list, 
 but can send to it, who can tell me a better free mail which support pop3 and smtp?
 
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Re: File Upload Problem

2002-10-31 Thread David Robley
In article 01c2805a$8a2a11a0$4b0a0a0a@skink, 
[EMAIL PROTECTED] says...
 
 G'day David
 
My problem is that files uploaded through a form are 
increasing in size.
 
   Doesn't that look like the EOL characters are being 
   translated after the fashion of ftp ascii transfers?
 
   Maybe have a look at the two versions in a 
   hex viewer and see if that is the case? 
 
 Yes, I'd considered that.  That was what I'd gone looking for in config
 files etc.  I'd hoped to find a switch for ftp transfer mode.  Didn't
 find one though.
 
 However, partly because of your email and partly because I noted that
 the file size increase was the same every time (27 bytes) I decided to
 load it into a hex editor.
 
 What I found was that at the top of the file, the following had been
 added:
 
 -8-
 Content-Type: image/gif
 
 -8-
 
 I also found that if I remove these two lines the image will display
 perfectly.
 
 So, my next question is, why does my linux box add this to an uploaded
 image and my windows box not do so?  Can someone make a suggestion on
 where I should be looking?  Is the addition of this information a server
 (Apache) thing?  Or is it a php thing?
 
 CYA, Dave

That's, er, odd?? Dunno whether you might find anything useful from 

http://www.google.com/search?q=upload+file+content+type+form+multipart+ima
ge+phpsourceid=operanum=0ie=utf-8oe=utf-8

(unwrap that). As I understand it, upload by form has nothing to do with 
ftp - it's part of http - and I assume that it is intended to do an 
'exact' copy? Perhaps a code snippet, just in case anyone can pick 
something odd about it.

Cheers
-- 
David Robley
Temporary Kiwi!

Quod subigo farinam

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] SAP documentation

2002-10-31 Thread Gerald Roehrbein/Pctdmn

Hello,

you can access SAP tables direct via the native database interface for 
example via the Oracle interface.
All you have to know is what is inside the different tables and you have to 
get the password or a read only account to SAP tables from your DBA. ;-)

For example the creditor tables are bsik (open bill) and bsak (paid bill, 
when I remember correct)  and debitor tables are bsid and bsad and parts of 
adresses are stored in table kna1 and so on.

Good luck. I've done a lot of coding with direct access to SAP. It works, 
it's fast and it's not proprietary and you do not have to spend tons of 
money for SAP ABAP lessions.

best regards
Gerald




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] parse error

2002-10-31 Thread Marek Kilimajer
line 60 and 61 should read:

echo 'temp/'.$userfile_name[$i-1];
$fp=fopen('temp/'.$userfile_name[$i-1],w+);


Andres, Cyrille wrote:


here is my code :

// for each file to upload :
$j=0;
echo $hotelNr[$j] et $j;
while($hotelNr[$j] != )
{
	//display the caracteristics of each file to download
	echobrHOotelNr[$j]=$hotelNr[$j]br;?
	table border=1
	trtd?php printf(bName/b :/tdtd
%s,$userfile_name[$hotelNr[$j]-1]);//
$HTTP_POST_FILES[userfile][name]);?/td/tr
	trtd?printf(bTemporary Name :/b/td  td%s,
$userfile[$hotelNr[$j]-1]
);//$HTTP_POST_FILES[userfile][tmp_name]);?/td/tr
	trtd?printf(bSize :/b/tdtd%s,
$userfile_size[$hotelNr[$j]-1]
);//$HTTP_POST_FILES[userfile][size]);?/td/tr
	trtd?printf(bType :/b/tdtd%s,
$userfile_type[$hotelNr[$j]-1]);//$HTTP_POST_FILES[userfile][type]);?/
td/tr


	trtd
	?
	
	//copy the file on the server
	$i=$hotelNr[$j];
	echo temp/$userfile_name[$i-1];
	$fp=fopen(temp/$userfile_name[0],w+);
	
	if (copy
($HTTP_POST_FILES[userfile][tmp_name][$hotelNr[$j]-1],temp/.$HTTP_POST
_FILES[userfile][name][$hotelNr[$j]-1]))
		printf(h4File successfully copied !/h4);
	else
		printf(h4Error: failed to copy file !/h4);	
	
	$j++;
	echo /td/tr
	/tablebr;
}
?

-Original Message-
From: Stuart Dallas [mailto:stuart;stut.net]
Sent: Wednesday, October 30, 2002 11:29 AM
To: Andres, Cyrille
Cc: Jonathan Sharp; PHP List; php
Subject: Re: [PHP] parse error


On Wednesday, Oct 30, 2002, at 19:21 Europe/London, Andres, Cyrille 
wrote:
 

thx, but I still have the same error
I think I have a poltergheist in my computer !!!
   


Show us a couple of lines before this.

 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Plus sign changing to space in html form

2002-10-31 Thread Phoebe Bright
I am battling with the same problem on both IE and Netscape on Mac OS 
10.2.  Is this a Mac thing?

I ammended your code in the hope that something was being passed that 
only looked like a space..

?php
echo $_POST['test'].'br';
 for($n=1;$n=strlen($_POST['test']);$n++) {
	echo var_dump(hexdec(substr($_POST['test'],$n-1,1)));
}
php?
form actiom='test.php' method=POST
input type=text value='' name=test
input type=submit value='submit'
/form


If I enter a+b it returns:
a b
int(10) int(0) int(11)

I can't ask users to enter aPLUSb or some such code, there must be a 
solution.   I don't belive this is going to defeat the collective brains 
of the PHP list!

Phoebe.

Stan wrote:
When i post a string containing plus sign with htmp form to a php scritp,
the '+' is changed to space.
e.g: i enter 'as+df' to a text input but $_POST[] returns 'as df' instead.
It must be in php or apache configuration bcause i have this problem only on
sytem with FreeBSD. On windows it works as expected.

Know someone how could i make the '+' left intact? Please help.


?
echo $_POST['test'];
?
form actiom='test.php' method=POST
input type=text value='' name=test
input type=submit value='submit'
/form





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] infinate loops

2002-10-31 Thread Marek Kilimajer
where is $row['BillPeriod'] set? and what is its value?



Chris Knipe wrote:


Lo,

Quite desperate now... Or at least, I'm starting to get there... Can anyone
perhaps see why this loop is not exiting???

$quit=$now;
$glet=getdate($row['RenewDate']);

// debug
echo howlong:  . $howlong;

while($quit$howlong) {

 // debug
 echo quit:  . $quit . br;

 $quit=mktime(0, 0, 0, $glet['mon']+$row['BillPeriod'], $glet['mday'],
$glet['year']);
 $retl+=$row['Cost'];
 $glet=getdate($quit);
}


The values,

$now = 1036360800 (mktime())
$row['RenewDate'] = 1035928800 (MySQL DB - VARCHAR(12))
$row['Cost'] = xx.xx (MySQL DB - DOUBLE(6,2))

$howlong is defined further up
$howlong=mktime(0, 0, 0, $_POST['month'], 1, $_POST['year'])
where...
 0  $_POST['month']  12
 2001  $_POST['year']  2005


From the debug (Browser output)...

howlong: 1133388000 - now: 1036023598 (RenewDate: 1036360800)
quit: 1036023598
quit: 1036360800
quit: 1036360800
quit: 1036360800

Thus, $quit is never incremented I'm *STUMPED* why not, or how to fix
this? :((  Each time, PHP times out (Script execution time exceeded), and it
*always* gives a line number for the timeout, that is inside the above while
loop.  Hence, to my understanding, the loop never exits

The loop, comes from cbms from voxel.net, stats.php

Thanks for the help!

--
me


 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] paper size print problem

2002-10-31 Thread Marek Kilimajer
ask at a windows-user list

R B wrote:


I want to set up a specific size of paper to print a report.
I made this with a PDF document and in screen looks like the size that 
i need, but when i print it, the printer doesn't respect the size and 
always print with the letter or default acrobat size.
I check the printer properties and doesn't have a customs size option.

What can i do?

Thanks,

RB

_
MSN. Más Útil Cada Día http://www.msn.es/intmap/




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] problem with global vars

2002-10-31 Thread Marek Kilimajer
globals don't don't persist between requests

Tomas Kubis wrote:


Hello,
I have big problem. I upgraded PHP from 4.1.2 to 4.2.3 and my scripts with
doesnt work. Please help me!
in php.info register globals=On

For example I have one script:
first.php
?
global $a;
$a=150;
Header(Location: second.php);
?

second.php

?
echo $a;
echo $GLOBALS['a'];
echo END;
?

Where I have a bug?

Thank you very much

Tomas Kubis



 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] This is a test mail for my mail list!

2002-10-31 Thread jianking
TEST



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: can OCIBindByName bind an in/out placeholder of plsql

2002-10-31 Thread DIGINEXT
I discovered recently that it was impossible to bind an output
placeholder plsql (an input work only).

Configuration 1 : Suse + Oracle 8i17 + oci (oracle) + PHP4.2.3
Configuration 2 : HPUX11 + Oracle 8i17 + oci(oracle) + PHP4.2.3
Configuration 3 : HPUX11 + Oracle 8i17 + oci(oracle) + PHP4.2.2

With script :
inoutdemo.sql
CREATE OR REPLACE PROCEDURE inoutdemo (par_in IN VARCHAR2,  par_in_out IN
OUT VARCHAR2,   par_out OUT VARCHAR2)   IS  BEGIN   par_out:=par_in;   
 
par_in_out:=par_in||' '||par_in_out;END;

$db=OCILogon(usr_adm,adm_inv);  
$stmt=OCIParse($db,BEGIN inoutdemo(:in,:inout,:out);END;);
OCIBindByName($stmt,:in,$in,32);
OCIBindByName($stmt,:inout,$inout,32);
OCIBindByName($stmt,:out,$out,32);
$in=Hello ;   
$inout=World!;
OCIExecute($stmt);  
echo $in.\n.$inout.\n.$out.\n;


//Result
Warning: OCIStmtExecute: ORA-06550: line 1, column 17: PLS-00553:
character set name is not recognized ORA-06550: line 0, column 0:
PL/SQL: Compilation unit analysis terminated in
/opt/apache/htdocs/fab.php4 on line 58
Hello 
World! 

I tested this script with the 3 configuration but it's the same error

I changed $in, inout , out into $in, $out, $inout but it's the same
error

Please help me !!!


Fabien JOSEPH

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: can OCIBindByName bind an in/out placeholder of plsql

2002-10-31 Thread DIGINEXT
I discovered recently that it was impossible to bind an output
placeholder plsql (an input work only).

Configuration 1 : Suse + Oracle 8i17 + oci (oracle) + PHP4.2.3
Configuration 2 : HPUX11 + Oracle 8i17 + oci(oracle) + PHP4.2.3
Configuration 3 : HPUX11 + Oracle 8i17 + oci(oracle) + PHP4.2.2

With script :
inoutdemo.sql
CREATE OR REPLACE PROCEDURE inoutdemo (par_in IN VARCHAR2,  par_in_out IN
OUT VARCHAR2,   par_out OUT VARCHAR2)   IS  BEGIN   par_out:=par_in;   
 
par_in_out:=par_in||' '||par_in_out;END;

$db=OCILogon(usr_adm,adm_inv);  
$stmt=OCIParse($db,BEGIN inoutdemo(:in,:inout,:out);END;);
OCIBindByName($stmt,:in,$in,32);
OCIBindByName($stmt,:inout,$inout,32);
OCIBindByName($stmt,:out,$out,32);
$in=Hello ;   
$inout=World!;
OCIExecute($stmt);  
echo $in.\n.$inout.\n.$out.\n;


//Result
Warning: OCIStmtExecute: ORA-06550: line 1, column 17: PLS-00553:
character set name is not recognized ORA-06550: line 0, column 0:
PL/SQL: Compilation unit analysis terminated in
/opt/apache/htdocs/fab.php4 on line 58
Hello 
World! 

I tested this script with the 3 configuration but it's the same error

I changed $in, inout , out into $in, $out, $inout but it's the same
error

Please help me !!!


Fabien JOSEPH

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: can OCIBindByName bind an in/out placeholder of plsql

2002-10-31 Thread DIGINEXT
I discovered recently that it was impossible to bind an output
placeholder plsql (an input work only).

Configuration 1 : Suse + Oracle 8i17 + oci (oracle) + PHP4.2.3
Configuration 2 : HPUX11 + Oracle 8i17 + oci(oracle) + PHP4.2.3
Configuration 3 : HPUX11 + Oracle 8i17 + oci(oracle) + PHP4.2.2

With script :
inoutdemo.sql
CREATE OR REPLACE PROCEDURE inoutdemo (par_in IN VARCHAR2,  par_in_out IN
OUT VARCHAR2,   par_out OUT VARCHAR2)   IS  BEGIN   par_out:=par_in;   
 
par_in_out:=par_in||' '||par_in_out;END;

$db=OCILogon(usr_adm,adm_inv);  
$stmt=OCIParse($db,BEGIN inoutdemo(:in,:inout,:out);END;);
OCIBindByName($stmt,:in,$in,32);
OCIBindByName($stmt,:inout,$inout,32);
OCIBindByName($stmt,:out,$out,32);
$in=Hello ;   
$inout=World!;
OCIExecute($stmt);  
echo $in.\n.$inout.\n.$out.\n;


//Result
Warning: OCIStmtExecute: ORA-06550: line 1, column 17: PLS-00553:
character set name is not recognized ORA-06550: line 0, column 0:
PL/SQL: Compilation unit analysis terminated in
/opt/apache/htdocs/fab.php4 on line 58
Hello 
World! 

I tested this script with the 3 configuration but it's the same error

I changed $in, inout , out into $in, $out, $inout but it's the same
error

Please help me !!!


Fabien JOSEPH

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] mixed

2002-10-31 Thread Marek Kilimajer

Shaun wrote:


Hi,

In asp there is a session timeout function that allows the session to
end after the session is INACTIVE for x seconds/minutes ! How do i do this
in php ?
 

session_cache_expire(value_in_minutes);
documentation is not very clear about it, but I guess it needs to be set 
before session_start()
can be set also in php.ini using session.cache_expire directive

Is there a way to open a php page in internet expl. without having a
url/adress bar
or a back and forward button , if so how do i go to work?
 

this is javascript
new_win = open(' url ', 'new_win_name', window_features)
you need to set right window features, check out developer.netscape.com 
- client side javascript,
object window, method open

I asked this before, but say for instance - the user is busy on a secure
page , but without logging out he enters another url in the address bar.The
session
of my page , does it end or does the session carry to the next page ? If so
how can
i stop it ?


session are per domain, or if you set path using 
session_set_cookie_params(), even per path. If the
user comes back within time limit, the session is still active


thanks , shaun!



 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] At last an error message!

2002-10-31 Thread Marek Kilimajer
The function needs more or less parameters than supplied, in this case 
either 2 or 3, check
the manual

Steve Jackson wrote:

function get_order_id_receipt($orderid, $shipping)
{
  //Get order ID from DB to pass to receipt.
$conn = db_connect();
$datequery = select date from receipts where customerid = '10';
$query = select orderid from receipts where customerid = '10';
$shippingquery = select shipping from receipts where customerid =
'10';
$date_result = mysql_query($datequery);
$date = mysql_result($date_result);
$orderid_result = mysql_query($query);
$orderid = mysql_result($orderid_result);
$shipping_result = mysql_query($shippingquery);
$shipping = mysql_result($shipping_result);
return $orderid;
return $shipping;
}

I get these errors echoed from mysql_error()
Warning: Wrong parameter count for mysql_result() in order_fns.php on
line 127

Warning: Wrong parameter count for mysql_result() in order_fns.php on
line 129

Warning: Wrong parameter count for mysql_result() in order_fns.php on
line 131

What does that mean?

Steve Jackson
Web Developer
Viola Systems Ltd.
http://www.violasystems.com http://www.violasystems.com/ 
[EMAIL PROTECTED]
Mobile +358 50 343 5159





 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Capitalizing names etc. part II - found a solution

2002-10-31 Thread Ford, Mike [LSS]
 -Original Message-
 From: -[ Rene Brehmer ]- [mailto:metalbunny;metalbunny.net]
 Sent: 30 October 2002 19:54

[snip, snip, snip...]

 My structure also ensure that 
 if someone's
 called something like Mackenzie for first name, it will not 
 be incorrectly
 cap'ed, as it only does the scotch-check on the last names...

And what if someone's last name *is* Mackenzie?  Or Macdonald?  Or any one
of several others I can think of that exist in both forms?

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] mixed

2002-10-31 Thread John W. Holmes
 In asp there is a session timeout function that allows the session to
 end after the session is INACTIVE for x seconds/minutes ! How do i do
this
 in php ?

You can set the lifetime of the session in php.ini.
session.gc_maxlifetime is the time after which, inactive sessions will
be deleted. session.gc_probability controls the percentage chance that
the garbage collection (session deletion) will be triggered with each
session_start(). You can also set some of the cookie parameters. All the
details are in the manual, give it a try.
http://www.php.net/manual/en/ref.session.php
 
 Is there a way to open a php page in internet expl. without having a
 url/adress bar
 or a back and forward button , if so how do i go to work?

No, use javascript. 

 I asked this before, but say for instance - the user is busy on a
secure
 page , but without logging out he enters another url in the address
 bar.The
 session
 of my page , does it end or does the session carry to the next page ?
If
 so
 how can
 i stop it ?

The session cookie will remain on his computer. It's only good for your
site though. If they return, the session will still be active, unless
it's been they wait over X minutes and the session file on the server is
deleted by the garbage collection.

Remember how HTTP works. All your web server does is process requests.
You can't tell between requests if the user went somewhere else or not. 

---John Holmes...



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Php web hosting

2002-10-31 Thread -[ Rene Brehmer ]-
Hi Steve Jackson,

On Wed, 30 Oct 2002 20:36:50 +0200, you wrote about [PHP] Php web
hosting something that looked like this:

Anyone like to recommend a good host with good uptime for a high traffic
site?
The host would need excellent technical support as well as be feature rich
(Multiple MySQL database support/listserver/SSL support etc.)

I use e-navn.dk. They've got an international branch called dotserv.com.
They've got blindingly fast support ... I've had them reply to support
requests by e-mail in a matter of hours ... on a saturday...

The Danish one is among Scandinavias cheapest and most respected/used
webhosts.

You can get whatever you want there. Their solutions are all mix-and-match
based. CGI, and PHP, and mail comes with free with all webhotels, ASP with
some (it depends on size what get included). Anything else is extra for a
small fee...or you can buy bigger and get it for free.

They offer Personal CGI (make/use your own), Perl, Perlscript, SSI, PHP,
ASP, JSP, Frontpage support, MySQL, Access, Postgres, SSL, besides what
comes with the hotels.

You can run Real video, and they offer modules for e-shopping sites.
Guaranteed 99% uptime, 24/7 support, free traffic, 155 Mbit line...

Just contact them about your needs, and they'll give a fixed price per
month ... you just pay as much in advance as you want ...

Enough commercials:
For the Danish host (e-navn.dk), go here:
http://www.enavn.dk/cgi-bin/index.cgi?ref_id=hPaB5xsMCT7GwywY8R5ZN5fbAdGMraP3

For the international host (dotserv.com), go here:
http://www.dotserv.com


-- 
Rene Brehmer
System developer in the making...

This message was written on 100% recycled spam.

Come see! My brand new site is now online!
http://www.metalbunny.net

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Plus sign changing to space in html form

2002-10-31 Thread Phoebe Bright
Here is a fudge that uses Javascript to convert the + into {PLUS} then 
PHP converts it back again.  The only problem is Javascript is only 
converting the first +, so a+b+c becomes a+b c.


?php
$testVal=str_replace({PLUS},+,$_POST['test']);
echo $testVal;
php?
script
function SaveHiddenChars() {
document.form1.test.value=document.form1.test.value.replace(+,{PLUS});
}
/script
form name=form1 actiom='test.php' method=POST 
onSubmit=SaveHiddenChars();
input type=text value='' name=test
input type=submit value='submit'
/form




Stan wrote:
When i post a string containing plus sign with htmp form to a php scritp,
the '+' is changed to space.
e.g: i enter 'as+df' to a text input but $_POST[] returns 'as df' instead.
It must be in php or apache configuration bcause i have this problem only on
sytem with FreeBSD. On windows it works as expected.

Know someone how could i make the '+' left intact? Please help.


?
echo $_POST['test'];
?
form actiom='test.php' method=POST
input type=text value='' name=test
input type=submit value='submit'
/form





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] RE: Php web hosting

2002-10-31 Thread Richard Archer
I use phpwebhosting and I've always found them to be very quick with
their support response. They're also very friendly and helpful, and
happy to go that little bit further for you. Need a feature that isn't
listed? No harm in asking them and they'll generally do whatever they
can to provide it for you.

They're also the only hosts I've found that don't have a strict
bandwidth/transfer limit, and so won't go charging you per Mb. This is
especially surprising at their price point ($9.95). I've found slightly
cheaper hosting in the UK (which is actually where I'm based) but I just
prefer the We won't set limits if you won't abuse it attitude of
phpwebhosting, even though I don't have a remotely high traffic site!
I've never found the thousand-odd miles of water between us to affect
communication in any way.

Regards,
Rich


-Original Message-
From: Steve Jackson [mailto:steve;webpage.co.uk] 
Sent: 30 October 2002 6:37 pm
To: Php-General
Subject: Php web hosting


Anyone like to recommend a good host with good uptime for a high traffic
site? The host would need excellent technical support as well as be
feature rich (Multiple MySQL database support/listserver/SSL support
etc.)

I have been trying out phpwebhosting.com and they seem very good but I
am not happy with their technical support which is very slow response
time. We are based in Europe and they are in the US which might lead to
problems as they haven't answered any of our queries. Saying that they
have a good automated process in place which is easy to use.

Anyone out there have high volume sites with a feature rich hosting
solution?

Any examples of Phpwebhosting welcomed as well.

regards
steve.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: can OCIBindByName bind an in/out placeholder of plsql

2002-10-31 Thread Fabien JOSEPH
I discovered recently that it was impossible to bind an output
placeholder plsql (an input work only).

Configuration 1 : Suse + Oracle 8i17 + oci (oracle) + PHP4.2.3
Configuration 2 : HPUX11 + Oracle 8i17 + oci(oracle) + PHP4.2.3
Configuration 3 : HPUX11 + Oracle 8i17 + oci(oracle) + PHP4.2.2

With script :
inoutdemo.sql
CREATE OR REPLACE PROCEDURE inoutdemo (par_in IN VARCHAR2, 
par_in_out IN
OUT VARCHAR2,   par_out OUT VARCHAR2)   IS  BEGIN  
par_out:=par_in;
par_in_out:=par_in||' '||par_in_out;END;

$db=OCILogon(usr_adm,adm_inv);  
$stmt=OCIParse($db,BEGIN inoutdemo(:in,:inout,:out);END;);
OCIBindByName($stmt,:in,$in,32);
OCIBindByName($stmt,:inout,$inout,32);
OCIBindByName($stmt,:out,$out,32);
$in=Hello ;   
$inout=World!;
OCIExecute($stmt);  
echo $in.\n.$inout.\n.$out.\n;


//Result
Warning: OCIStmtExecute: ORA-06550: line 1, column 17: PLS-00553:
character set name is not recognized ORA-06550: line 0, column 0:
PL/SQL: Compilation unit analysis terminated in
/opt/apache/htdocs/fab.php4 on line 58
Hello 
World! 

I tested this script with the 3 configuration but it's the same error

I changed $in, inout , out into $in, $out, $inout but it's the same
error

Please help me !!!


Fabien JOSEPH

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Multiple Addresses Mailer

2002-10-31 Thread -[ Rene Brehmer ]-
Hi Manuel Lemos,

On Thu, 31 Oct 2002 02:28:31 -0300, you wrote about Re: [PHP] Multiple
Addresses Mailer something that looked like this:

You are contradicting yourself. Most mailing list programs put all 
recipients in Bcc: and queue only on message, so it is the same thing 
that you are recommending against and for it.

But most listservers generate a new message for each receiver. Most
mailservers, my own included, do not accept more than 5 recipients in the
bcc field...50 total for to and cc combined (some allow more).

The limit's there to prevent spam. Also it would be abuse of the intent to
use bcc for the entire list of receivers. Also you cannot have a bcc
without a to field anyway ... 

Spam filters that discard messages which the recipients are in Bcc: are 
wrong, just like everybody that filters messages with general criteria 
like that. Anyway, it is their problem if they discard messages arbitrarily.

If the bcc field is the only field with a receiver, then the message is
malformed and should be rejected. The To:, Subject:, and Date: fields are
required to fullfill RFC 822. If you only get Bcc: and no To:, then the
message should be bounced, that's how alot of spam used to be addressed,
and some still is.

You need to check with the ISP if sending to many recipients respects 
the acceptable use policy. If they don't accept bulk mailing, it doesn't 
matter the method you use.

I've never met an ISP that would refuse bulk mailing, as long as you can
proove that you've got concent from the receivers for the messages. My
mail server handles all the concent things itself, and sofar my ISPs have
not complained about the up to 3 digit amounts of message that go out each
day, with up to 4 digits coming in...


-- 
Rene Brehmer
System developer in the making...

This message was written on 100% recycled spam.

Come see! My brand new site is now online!
http://www.metalbunny.net

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: Multiple Addresses Mailer

2002-10-31 Thread -[ Rene Brehmer ]-
Hi Manuel Lemos,

On Wed, 30 Oct 2002 18:03:13 -0300, you wrote about [PHP] Re: Multiple
Addresses Mailer something that looked like this:

 I want to be able to send mail so that each recipient thinks that this 
 mail was ONLY sent to him/her.

Put all recipients in the Bcc: instead of To: header.

You'll still need something in the To: field ... something valid too that
is...


-- 
Rene Brehmer
System developer in the making...

This message was written on 100% recycled spam.

Come see! My brand new site is now online!
http://www.metalbunny.net

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] My mail have a problem!!

2002-10-31 Thread -[ Rene Brehmer ]-
Hi joskey,

Your mail came through fine ... but if you want to run a mail-server, and
have got either windows or novell netware, take a peak at Mercury, it's
free, has POP and SMTP, and inludes a listerver and advanced filtering:

www.pmail.com

It's extremely stable, only license quirk is that you may not send mail to
more than 50 people without having their concent first (spam protection).

Rene

On Thu, 31 Oct 2002 16:5:50 +0800, you wrote about [PHP] My mail have a
problem!! something that looked like this:

My mail have a problem, I can receive this mail list, 
but can send to it, who can tell me a better free mail which support pop3 and smtp?

-- 
Rene Brehmer
System developer in the making...

This message was written on 100% recycled spam.

Come see! My brand new site is now online!
http://www.metalbunny.net

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] RE: Capitalizing names etc. part II - found a solution

2002-10-31 Thread Richard Archer
Hi Rene,

You should consider the fact that, even as surnames, names like
Mackintosh and Mackenzie (and as someone else suggested here 'Macon')
generally should NOT have a capital letter. Mackintosh is an English
name, not Scottish, and people who spell it with a capital K have gotten
their ancestry mixed up somewhere!

Anyway, perhaps a way around this would be to have a known exceptions
list? You could just stick all your Mc/Mac code inside:
if (in_array($lastname, $mcExceptions)) {
...
}

At the end of the day, it's really up to the person how they capitalise
their own name, but I guess mind reading is (currently) a bit beyond
PHP.

Regards,
Rich


-Original Message-
From: -[ Rene Brehmer ]- [mailto:metalbunny;metalbunny.net] 
Sent: 30 October 2002 7:54 pm
To: [EMAIL PROTECTED]
Subject: Capitalizing names etc. part II - found a solution


Hi y'all

A while back I requested help for properly capitalizing names out of
passed string values, as ucwords() and tokenizing didn't do the trick.

Some kind soul gave me this scripple to work with:

 $text = What?No delimiters,shit happens here.this solves all 
 problems.; preg_match_all(/(\w+[,. ?])+/U, $text, $words); 
 foreach($words[0] as $part) $uwords[] = ucfirst($part); $text = 
 implode(, $uwords); echo $text;

Which didn't work at all (even changing the variables to match my own),
but only got me several errors for each line...

My task was to make it take a string like
firstname_middlename_firstlastname-lastlastname and properly
capitalize it. Also wanted it to do it correctly with names like
O'Connor, MacEnroe, McCarthy and such... The scribble above would be
able to do it with the O'Connors and name-name formats, but useless with
Mac/Mc names ... plus the above script part didn't work at all on my
system (PHP 4.2.3 on Apache 2.0.40 on WinXP Pro).

OK ... so I wanted a compact structure that could do this easily, and
correctly, on ANY name I threw at it...so I've spent a couple of hours
finding useful functions in PHP that would do the trickery easiest ...
and ended up with this:

$name = $HTTP_GET_VARS['name'];

// pull real name out of $name
$realname = ;
// okay, let's get the names cap'ed correctly...
$startat = 0; // these vars are used for substring pulling $stoplen = 0;
// parse 1, find funny chars and cap after them for ($i = 0; $i 
strlen($name); $i++) {
   $ltr = substr($name, $i, 1); // pull out letter i of name
   $stoplen = $i - $startat;  // set the stop point for substring
   // if current letter is a marker
   if ($ltr == _ | $ltr == - | $ltr == ') {  
  // add substring
  $realname .= ucfirst(substr($name, $startat, $stoplen));  
  $startat = $i + 1;  // set new start point for substring
   }
   if ($ltr == _) {  // if space, add space
  $realname .=  ;
   }
   elseif ($ltr == -) { // if dash, add dash
  $realname .= -;
   }
   elseif ($ltr == ') {
  $realname .= ';
   }
}
// the last name won't be added in parse 1,
// this piece adds the last name AFTER checking and capping for Mac/Mc
// so this is essentially pass 2 $lastname = substr($name, $startat,
$stoplen + 1); // find Mac/Mc $maclen = 0; // we set this to zero to
make it easier to check for found if (strstr($lastname, mc) != false)
{  // if Mc is found...
   $maclen = 2;
}
elseif (strstr($lastname, mac) != false) {  // if Mac is found
   $maclen = 3;
}
if ($maclen  0) {  // add the MacSomething with proper capitalization
   $realname .= ucfirst(substr($lastname, 0, $maclen));
   $realname .= ucfirst(substr($lastname, $maclen, strlen($lastname)));
} else { // if we can't find Mac/Mc, just add the last name...
   $realname .= ucfirst($lastname);
}
// end namegame

The curious thing is that this actually runs faster than the strtok() +
ucwords() combo I had before, plus it does the trick correctly,
everytime. If anyone can see a more efficient way of doing this, I'm all
for it.

Do note that I've intentionally made it so that the last word of all
names won't be added to the $realname, until it's determined whether or
not it starts with Mac/Mc. The point to this is simple: It's a lot more
complicated to scan for the Mac/Mc after the full name is assembled,
than it is while it's being built. My structure also ensure that if
someone's called something like Mackenzie for first name, it will not be
incorrectly cap'ed, as it only does the scotch-check on the last
names...

If you can do this simpler, or have any comments for this way of doing
it, please let me know. You may freely copy and dsitribute this as you
wish.

Rene
-- 
Rene Brehmer
System developer in the making...

This message was written on 100% recycled spam.

Come see! My brand new site is now online! http://www.metalbunny.net


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] storing inc.php outside doc root

2002-10-31 Thread rolf vreijdenberger
hi,
I want to include a file that is one directory above my web document root on
the server.
eg. www.mydom.com/file.php wants to include a file that is one dir higher,
so that file is not accesible via the web.
how can I access this file, if I specify a include(../inc.php); it doesn't
work.
I also want to use this for downloading files only via php scripts!
thanks

--
Rolf Vreijdenberger
De Pannekoek en De Kale
Maystraat 6
2593 VW Den Haag
T: 06-24245719
E: [EMAIL PROTECTED]
W: www.depannekoekendekale.nl



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] storing inc.php outside doc root

2002-10-31 Thread Marek Kilimajer
What error do you get, this should generaly work

rolf vreijdenberger wrote:


hi,
I want to include a file that is one directory above my web document root on
the server.
eg. www.mydom.com/file.php wants to include a file that is one dir higher,
so that file is not accesible via the web.
how can I access this file, if I specify a include(../inc.php); it doesn't
work.
I also want to use this for downloading files only via php scripts!
thanks

--
Rolf Vreijdenberger
De Pannekoek en De Kale
Maystraat 6
2593 VW Den Haag
T: 06-24245719
E: [EMAIL PROTECTED]
W: www.depannekoekendekale.nl



 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] How to prevent failure email from being sent?

2002-10-31 Thread Richard Archer
Noah,

If you delete the webmaster email key you might find that it makes up
some non-existent e-mail address based on your server name.

You could try adding an 'Errors-To: [EMAIL PROTECTED]' header in the
e-mail which is supposed to tell the receiving server to send any errors
to a specific address. It's never used by anyone so chances are there
are servers out there that will ignore it, but it's worth a go. Then,
depending on what e-mail client you have, you could have a rule that did
some clever jiggery-pokery and removed the offending address from the
list without even bothering you.

Regards,
Rich


On Monday 28 October 2002 01:24, Noah Spitzer-Williams wrote:
Hey guys,
My service sends out emails every few days to members who wish to 
have stats sent to them. The problem is once an email becomes 
inactive, I the webmaster gets a failure email sent to me. This is 
starting to add up and I can get upwards of 20 of these a day. It just 
seems likea  waste of space and bandwidth... is there anyway I can 
prevent this?
If i delete the webmaster email key in php.ini will my emails not 
have a reply address?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Re: File Upload Problem

2002-10-31 Thread Richard Archer
I've had 2 thoughts on this one. They're fairly uneducated an just
meandering speculation, but it's my tuppence-worth so...

My initial thought was this: I believe the Content-Type: MIME header is
added by your browser. HTTP standards say that anything sending a file
over HTTP is supposed to tell the recipient what type of file it's
sending. It does this by adding the Content-Type: header at the start of
the stream. Normally, PHP will read this header and put it in the
$_FILES['userfile']['type'] variable. Perhaps your Linux browser adds
the header in such a way that PHP cannot extract it properly, and simply
thinks it's part of the file? You could try checking the
$_FILES['userfile']['type'] variable to see if it contains the correct
MIME type.

It then dawned on me that I know either Apache or PHP (can't remember
which, possibly both, but most likely Apache) can so some clever stuff
where it fills in missing MIME type headers by analysing the file being
transferred. It's possible that your Linux browser is not sending a
Content-Type: header and so Apache tries to fill one in and it's APACHE
that is adding the iffy header that PHP doesn't recognise.
Alternatively, it's possible that your browser IS adding the header, but
Apache doesn't recognise it, so adds another one. PHP happily extracts
the first one, but doesn't spot the second one so it creeps through.

Of course, all that could be wrong as I'm not an expert on file uploads,
but it might be a place to start looking.

Regards,
Rich


-Original Message-
From: David Freeman [mailto:dfreeman;outbackqld.net.au] 
Sent: 30 October 2002 9:23 pm
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Re: File Upload Problem



G'day David

   My problem is that files uploaded through a form are 
   increasing in size.

  Doesn't that look like the EOL characters are being 
  translated after the fashion of ftp ascii transfers?

  Maybe have a look at the two versions in a 
  hex viewer and see if that is the case? 

Yes, I'd considered that.  That was what I'd gone looking for in config
files etc.  I'd hoped to find a switch for ftp transfer mode.  Didn't
find one though.

However, partly because of your email and partly because I noted that
the file size increase was the same every time (27 bytes) I decided to
load it into a hex editor.

What I found was that at the top of the file, the following had been
added:

-8-
Content-Type: image/gif

-8-

I also found that if I remove these two lines the image will display
perfectly.

So, my next question is, why does my linux box add this to an uploaded
image and my windows box not do so?  Can someone make a suggestion on
where I should be looking?  Is the addition of this information a server
(Apache) thing?  Or is it a php thing?

CYA, Dave





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Free compiler for Win

2002-10-31 Thread Richard Archer
http://www.ioncube.com/encoder/online_encoder.php

It's not free, but it's a LOT cheaper than the Zend Encoder.

Regards,
Rich


-Original Message-
From: R B [mailto:rbphp;hotmail.com] 
Sent: 31 October 2002 12:57 am
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Free compiler for Win


I want a php code compiler.
I wrote above visual studio 6.0 because i read in the mailking list
archieve 
that it was posible with that software, but i want a good free compiler 
because i don't want to distribute my php code.

Thanks

RB


From: Stuart [EMAIL PROTECTED]
To: R B [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: [PHP] Free compiler for Win Date: Thu, 31 Oct 2002 
00:40:05
+

On Wednesday, Oct 30, 2002, at 23:02 Europe/London, R B wrote:
I need to know how to compile php code with ms visual studio 6.0.

Do you want to compile PHP or PHP code? If you want to compile PHP 
itself
full instructions are included in the source distribution. If you want
to 
compile PHP code then I believe there are a couple about - Google
should be 
able to find them for you - but I'm pretty sure none of them work
within 
Visual Studio. If you are looking for a speed increase for a web site
your 
best bet is the Zend accelerator: 
http://www.zend.com/store/products/zend-accelerator.php

I hope that helps.

--
Stuart


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


_
MSN Fotos: la forma más fácil de compartir e imprimir fotos. 
http://photos.msn.es/support/worldwide.aspx



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] How do you select?

2002-10-31 Thread Steve Jackson
I want to the select the very last record from my MySQL DB. How do I do
it?
 

Steve Jackson
Web Developer
Viola Systems Ltd.
http://www.violasystems.com http://www.violasystems.com/ 
[EMAIL PROTECTED]
Mobile +358 50 343 5159



 



RE: [PHP] Re: CSS pulls me back in

2002-10-31 Thread Liam . Gibbs
is Constants.inc in the same directory as Stylesheet.php?

It's in the same directory. Maybe I have to make things global? Lemme check
on that.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] How do you select?

2002-10-31 Thread Jon Haworth
Hi Steve,

 I want to the select the very last record from 
 my MySQL DB. How do I do it?

Depends what you mean by last. You can either do a select with an order
and a limit:
  SELECT foo FROM bar ORDER BY timestamp DESC LIMIT 1

Or you can get the last primary key with PHP's mysql_insert_id() function.

Cheers
Jon



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: How do you select?

2002-10-31 Thread Erwin
Steve Jackson wrote:
 I want to the select the very last record from my MySQL DB. How do I
 do it?

If the table has an id, use
select * from table order by id desc limit 0,1

Grtz Erwin

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] At last an error message!

2002-10-31 Thread Pekka Saarinen
At 10/31/2002, you wrote:

function get_order_id_receipt($orderid, $shipping)
 {
   //Get order ID from DB to pass to receipt.
 $conn = db_connect();
 $datequery = select date from receipts where customerid = '10';
 $query = select orderid from receipts where customerid = '10';
 $shippingquery = select shipping from receipts where customerid =
'10';
 $date_result = mysql_query($datequery);
 $date = mysql_result($date_result);
 $orderid_result = mysql_query($query);
 $orderid = mysql_result($orderid_result);
 $shipping_result = mysql_query($shippingquery);
 $shipping = mysql_result($shipping_result);
 return $orderid;
 return $shipping;
 }

I get these errors echoed from mysql_error()
Warning: Wrong parameter count for mysql_result() in order_fns.php on
line 127

Warning: Wrong parameter count for mysql_result() in order_fns.php on
line 129

Warning: Wrong parameter count for mysql_result() in order_fns.php on
line 131

What does that mean?



Try

function get_order_id_receipt($orderid, $shipping)
 {
   //Get order ID from DB to pass to receipt.
 $conn = db_connect();
 $datequery = select date from receipts where customerid = '10';
 $query = select orderid from receipts where customerid = '10';
 $shippingquery = select shipping from receipts where customerid =
'10';
 $date_result = mysql_query($datequery);
 $date = mysql_result($date_result,0);
 $orderid_result = mysql_query($query);
 $orderid = mysql_result($orderid_result,0);
 $shipping_result = mysql_query($shippingquery);
 $shipping = mysql_result($shipping_result,0);
 return $orderid;
 return $shipping;
 }

See http://fi2.php.net/manual/fi/function.mysql-result.php

But with mysql_result you'll get see one CELL only. Maybe you need to use 
something like

$dates = array();
while ($row = mysql_fetch_array( $date_result)) {
array_push($dates, $row[date]);
}
return $dates;



-
Pekka Saarinen
http://photography-on-the.net
-



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] search tricks of the trade

2002-10-31 Thread Edward Peloke
Ok, I have my php/mysql site almost finished, are there any special tricks
to making the site rise to the top of the list in search engines?  I added
all the info in the 'meta' part of the site.

Thanks,
Eddie


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Php web hosting

2002-10-31 Thread Adam Voigt
I've recently had a very good experience with a hosting company,
there website is at: http://www.spenix.com/

Great feature set, superior support, and so-far perfect
uptime/performance in hardware, software, and bandwidth. I definetly
recommend them to anyone looking for quality hosting.

Adam Voigt
[EMAIL PROTECTED]

On Wed, 2002-10-30 at 13:36, Steve Jackson wrote:
 Anyone like to recommend a good host with good uptime for a high traffic
 site?
 The host would need excellent technical support as well as be feature rich
 (Multiple MySQL database support/listserver/SSL support etc.)
 
 I have been trying out phpwebhosting.com and they seem very good but I am
 not happy with their technical support which is very slow response time. We
 are based in Europe and they are in the US which might lead to problems as
 they haven't answered any of our queries. Saying that they have a good
 automated process in place which is easy to use.
 
 Anyone out there have high volume sites with a feature rich hosting
 solution?
 
 Any examples of Phpwebhosting welcomed as well.
 
 regards
 steve.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Php web hosting

2002-10-31 Thread Clint Tredway
I am using www.imhosted.com for my clients at the moment. I have had
some small issues but they are quick to lend a helping hand.

Clint

-Original Message-
From: Adam Voigt [mailto:adam;cryptocomm.com] 
Sent: Thursday, October 31, 2002 7:47 AM
To: Steve Jackson
Cc: Php-General
Subject: Re: [PHP] Php web hosting


I've recently had a very good experience with a hosting company, there
website is at: http://www.spenix.com/

Great feature set, superior support, and so-far perfect
uptime/performance in hardware, software, and bandwidth. I definetly
recommend them to anyone looking for quality hosting.

Adam Voigt
[EMAIL PROTECTED]

On Wed, 2002-10-30 at 13:36, Steve Jackson wrote:
 Anyone like to recommend a good host with good uptime for a high 
 traffic site? The host would need excellent technical support as well 
 as be feature rich (Multiple MySQL database support/listserver/SSL 
 support etc.)
 
 I have been trying out phpwebhosting.com and they seem very good but I

 am not happy with their technical support which is very slow response 
 time. We are based in Europe and they are in the US which might lead 
 to problems as they haven't answered any of our queries. Saying that 
 they have a good automated process in place which is easy to use.
 
 Anyone out there have high volume sites with a feature rich hosting 
 solution?
 
 Any examples of Phpwebhosting welcomed as well.
 
 regards
 steve.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] search tricks of the trade

2002-10-31 Thread PHP List
Too many to list in an email. This site has allot of information.

http://searchenginewatch.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Missing

2002-10-31 Thread Adam Voigt
Ok, what am I missing? The file sdlksd doesn't exist, and the
program's not dying, any ideas?

#!/usr/local/php_4.2.3/bin/php -q
?php

if(!file_exists(sdlksd))
die(DOH!);

?

Adam Voigt
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Who can tell me where I can get the cracked Zend Encoder3.0 ?

2002-10-31 Thread jianking
Who can tell me where I can get the cracked Zend Encoder 3.0 ?




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Need help...

2002-10-31 Thread BAROILLER Pierre-Emmanuel
Received fro Yves le duaron :
Try this for example ;

'.$pattern.([^]*)?(\/)?(?(2)|(.*)?\/.$pattern.)'siU

Please notice the U (ungreedy) to enhance the speed.
This also match empty tags ...

Sorry I have no login to send this to the mailing list, do this for me
please !


Baroiller Pierre-Emmanuel [EMAIL PROTECTED] a écrit dans le message
de news: [EMAIL PROTECTED]
 Hi everyone...

 I've got a little problem :

 I've got an html template, with javasript functions and stylesheets in
many
 places...
 This html template is made via a big big template handler i've done...
 All seems to work... But, now, I would like to clean this html page to
 procude a 'readable' page
 If got a page like this :
 html
 head
 /head
 body
 xyxyxyxyxyx
 script
 function nb1() {}
 /script
 y
 yy
 style
 .outter {}
 /style
 /body
 /html

 And.. I would like to produce a page like this :

 html
 head
 style
 .outter {}
 /style
 script
 function nb1() {}
 /script
 /head
 body
 xyxyxyxyxyx
 y
 yy
 /body
 html


 Anyone have and idea ?
 I've tried with some preg_match_all() but... The only that work for me is
 '/head[^]*(.*)\/head[^]*/si' witch returns the head content...
(where
 I'll add style  script contents)..
 I've tried to change 'head' with 'script' or 'style' but.. It doesn't
 work...
 Like I'm not a regex guru ...I'm looking for help..


 Regards,
 P.E. Baroiller






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Who can tell me where I can get the cracked Zend Encoder3.0 ?

2002-10-31 Thread 1LT John W. Holmes
Go away...

- Original Message -
From: jianking [EMAIL PROTECTED]
To: PHP Mail List [EMAIL PROTECTED]
Sent: Thursday, October 31, 2002 10:00 AM
Subject: [PHP] Who can tell me where I can get the cracked Zend Encoder3.0 ?


 Who can tell me where I can get the cracked Zend Encoder 3.0 ?




 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Who can tell me where I can get the cracked Zend Encoder3.0 ?

2002-10-31 Thread John Wards
On Thursday 31 Oct 2002 3:00 pm, jianking wrote:
 Who can tell me where I can get the cracked Zend Encoder 3.0 ?
Are you a muppet?

This list is run by the people who make Zend Encoder!

FOOL

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Who can tell me where I can get the cracked ZendEncoder3.0 ?

2002-10-31 Thread Cory Hicks
Be gone already!


On Thu, 2002-10-31 at 09:00, jianking wrote:
 Who can tell me where I can get the cracked Zend Encoder 3.0 ?
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] wow

2002-10-31 Thread Evan Nemerson
http://www.auschron.com/issues/dispatch/2000-08-11/xtra_feature2.html



-- 
If there is no higher reason--and there is none--then my own reason must be 
the supreme judge of my life.

-Leo Nikolaevich Tolstoy


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Multiple Addresses Mailer

2002-10-31 Thread olinux
 I've never met an ISP that would refuse bulk
 mailing, as long as you can
 proove that you've got concent from the receivers
 for the messages. My
 mail server handles all the concent things itself,
 and sofar my ISPs have
 not complained about the up to 3 digit amounts of
 message that go out each
 day, with up to 4 digits coming in...
 

I have a site hosted on a shared server and if I try
to generate an email with more than 75 BCC addresses
it will not be sent. I was instructed to use the
listserve software that they provide to do mailings
like this. They don't disapprove high volume mailing,
but they do have a problem if you use BCC. I guess
that it's either harder on the server or because its
most likely spam. 

On my dedicated servers (another company) we can do
whatever we please, but I do think that a large number
of filters are tipped off by a high volume of BCC's
... 

olinux

__
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] RE:[Not even in the topic ballpark] [PHP] wow

2002-10-31 Thread Jay Blanchard


-Original Message-
From: Evan Nemerson [mailto:evan;coeus-group.com]
Sent: Thursday, October 31, 2002 9:52 AM
To: [EMAIL PROTECTED]
Subject: [PHP] wow


http://www.auschron.com/issues/dispatch/2000-08-11/xtra_feature2.html



--
If there is no higher reason--and there is none--then my own reason must be
the supreme judge of my life.

-Leo Nikolaevich Tolstoy


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] date validation problem!

2002-10-31 Thread ppf

Hi all:
I am having some problem with date validation 
I am trying to validate the date in a form Field
I had provided a text field for date, so have to
expect all the different possible entry, 
When i tried with checkdate() method it needs the
parametes in (int month,int date, int year). It make
the code more complex , What i am looking is some
thing similar to is_int(), like the one we have in VB
isdate()
  thanks in advance 
   Prad

__
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] wow

2002-10-31 Thread Evan Nemerson
Ladies and Gentlemen,

I would like to apologize for an eMail I just sent (Message-ID: 
[EMAIL PROTECTED]) to the php-general mailing list. 
The content of this eMail contained a link to a news article which detailed 
an absurd Texas law. I tried to send it to a friend (currently living in 
Texas) who I knew would find it amusing. Unfortunately, I clicked the wrong 
address, and it was sent to [EMAIL PROTECTED]

The content of this article, while not, IMHO, too offensive, were nonetheless 
completely inappropriate for posting to php-general. I would therefore like 
to formally apologize to any who recieved my eMail in error. It was an honest 
mistake. Sorry.


Sincerly,
Evan Nemerson




On Thursday 31 October 2002 07:51 am, Evan Nemerson wrote:
 http://www.auschron.com/issues/dispatch/2000-08-11/xtra_feature2.html

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] date validation problem!

2002-10-31 Thread Jon Haworth
Hi,

 I had provided a text field for date, so have to
 expect all the different possible entry, 

This is generally a *very* bad idea. If a visitor to your site enters
4/3/01, do they mean the 4th March or the 3rd April?

I find the best thing to do is provide three drop-downs: one contains
numbers from 1-31, one contains the names of months, and one contains
numbers from 2000 onwards. Using this, it's impossible to enter a date that
could be interpreted in more than one way (although you still can do things
like 31st Feb, so you still need checkdate).

If you absolutely must do this you can always break the date up into
components (split on the delimiter) and pass the components to checkdate().

 When i tried with checkdate() method it needs the
 parametes in (int month,int date, int year). It make
 the code more complex 

Generally it's better to have complex code that works than simple code that
doesn't.

Cheers
Jon

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Is there an ISP that supports GD Library 2.0?

2002-10-31 Thread René Fournier
I'm going to need it for a site I'm working on
Any suggestions are much appreciated.


---
René Fournier,
[EMAIL PROTECTED]

Toll-free +1.888.886.2754
Tel +1.403.291.3601
Fax +1.403.250.5228
www.smartslitters.com

SmartSlitters International
#33, 1339 - 40th Ave NE
Calgary AB  T2E 8N6
Canada


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] String to Ascii

2002-10-31 Thread Ben Chivers
Hi,

I'm wanting to change a character string from text into ascii code.

I tried using the function:

ebcdic2ascii()

only to find out that it isn't supported with the latest versions of php,
only version 3.

I would appreciate any help from anyone with this topic.

--

Many Regards,
Ben Chivers
Super Sites Pro

Get reliable and affordable web hosting from only $2.91pm at Super Hosts
Pro - www.superhostspro.com




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Missing

2002-10-31 Thread Chris Hewitt
Adam Voigt wrote:


#!/usr/local/php_4.2.3/bin/php -q
?php

if(!file_exists(sdlksd))
   die(DOH!);

?


I think it works. I get DOH! printed when I try this. What do you get? 
I'm doing this from a web browser rather than command line though, so I 
don't use your #!/usr... line.
HTH
Chris


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Missing

2002-10-31 Thread Adam Voigt
For some reason, if I didn't change it to:

die(DOH!\n);

it wouldn't work, I guess in console mode, you
have to shunt an extra newline character (\n) before
it will work.

Adam Voigt
[EMAIL PROTECTED]

On Thu, 2002-10-31 at 11:28, Chris Hewitt wrote:
 Adam Voigt wrote:
 
 #!/usr/local/php_4.2.3/bin/php -q
 ?php
 
 if(!file_exists(sdlksd))
 die(DOH!);
 
 ?
 
 I think it works. I get DOH! printed when I try this. What do you get? 
 I'm doing this from a web browser rather than command line though, so I 
 don't use your #!/usr... line.
 HTH
 Chris
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Who can tell me where I can get the cracked Zend Encoder3.0 ?

2002-10-31 Thread Brian V Bonini
My, my. We have a rocket scientist amongst us

 -Original Message-
 From: jianking [mailto:liaus;10mail.net]
 Sent: Thursday, October 31, 2002 10:00 AM
 To: PHP Mail List
 Subject: [PHP] Who can tell me where I can get the cracked Zend 
 Encoder3.0 ?
 
 
 Who can tell me where I can get the cracked Zend Encoder 3.0 ?
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Variable over url

2002-10-31 Thread Sascha Cunz
Ops, of course.
Sascha

Am Donnerstag, 31. Oktober 2002 04:07 schrieb Chris Shiflett:
 I think you mean turn on register_globals. :-)

 Sascha Cunz wrote:
 try
 ?php
   echo $_GET['tmp'];
 ?
 
 or turn off register_globals in your php.ini file.
 
 Am Mittwoch, 30. Oktober 2002 20:49 schrieb Manuel Jenne:
 My Script:
 Test.php
 
 ?
 echo $tmp;
 ?
 
 My URL:
 www.some.domain/test.php?tmp=5
 
 My result:
 
 NOTHING !!!


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Stop At Return

2002-10-31 Thread Adam Voigt
I'm running PHP in console mode, on a script which uses:

$f = fopen(php://stdin,r);
$data = fread($f,12);
fclose($f);

To get an IP address (a max of 12 characters), so the question
is, how do I stop taking input when they hit return (ie, if
there IP is less then the max 12 it will keep waiting for 12
characters of input) any ideas? (Other then to loop through
taking what character at a time checking to see if it's the
return key.)?

Adam Voigt
[EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] strtotime bug? end of the month.

2002-10-31 Thread Jeff Bearer
date(Y-m-d,strtotime(+1 month))

returns December 1st!  This happens when you add 1 month to any day that
doesn't exist in the next month.  Quite annoying that you have to handle
it like this:

date(Y-m-d,strtotime(+1 month,strtotime(date(Y-m-1


-- 
Jeff Bearer, RCHE
Webmaster, PittsburghLIVE.com
Winner 2002 Eppy Award, Best U.S. Newspaper Website


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] strtotime bug? end of the month.

2002-10-31 Thread Adam Voigt
Not a very good solution, but +4 weeks works.

Adam Voigt
[EMAIL PROTECTED]

On Thu, 2002-10-31 at 11:33, Jeff Bearer wrote:
 date(Y-m-d,strtotime(+1 month))
 
 returns December 1st!  This happens when you add 1 month to any day that
 doesn't exist in the next month.  Quite annoying that you have to handle
 it like this:
 
 date(Y-m-d,strtotime(+1 month,strtotime(date(Y-m-1
 
 
 -- 
 Jeff Bearer, RCHE
 Webmaster, PittsburghLIVE.com
 Winner 2002 Eppy Award, Best U.S. Newspaper Website
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Is there an ISP that supports GD Library 2.0?

2002-10-31 Thread Evan Nemerson
Hurrican Electric does... here's a php -m from them:

Running PHP 4.1.2
Zend Engine v1.1.1, Copyright (c) 1998-2001 Zend Technologies

[PHP Modules]
xml
standard
session
posix
pcre
mysql
imap
gd
ftp
db
zlib

[Zend Modules]
Not Implemented


I had to use pdflib once, and after talking to them for a bit they configured 
it so i could use dl()... They have no problems with security audits (as long 
as you give them a heads-up), servers are quick and dependable, they 
implemented privsep in OpenSSH in just a few hours back when there was that 
remote-root hole (chrooted jail w/ privsep)... Basically, I highly reccomend.




On Thursday 31 October 2002 08:10 am, René Fournier wrote:
 I'm going to need it for a site I'm working on
 Any suggestions are much appreciated.


 ---
 René Fournier,
 [EMAIL PROTECTED]

 Toll-free +1.888.886.2754
 Tel +1.403.291.3601
 Fax +1.403.250.5228
 www.smartslitters.com

 SmartSlitters International
 #33, 1339 - 40th Ave NE
 Calgary AB  T2E 8N6
 Canada


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] String to Ascii

2002-10-31 Thread Evan Nemerson
ebcdic2ascii() is an Apache-specific function which is available only on 
EBCDIC based operating systems (OS/390, BS2000). -php.net/ebcdic

What kind of text??? Usually, the text is in ASCII? Do you want to convert to 
the actual numerical representation (ie A == 0x41)? If so, you can try 
bin2hex(). if you want it in decimal, prolly hexdec() in a foreach on a 
explode(\r\n, chunk_split($whatever, 2))'d bin2hex() string... I say that 
because I think bindec will convert the whole string at once, not char by 
char...



On Thursday 31 October 2002 04:26 pm, Ben Chivers wrote:
 Hi,

 I'm wanting to change a character string from text into ascii code.

 I tried using the function:

 ebcdic2ascii()

 only to find out that it isn't supported with the latest versions of php,
 only version 3.

 I would appreciate any help from anyone with this topic.

-- 
Often a non-Christian knows something about the earth, the heavens, and the 
other parts of the world, about the motions and orbits of the stars and even 
their sizes and distances,... and this knowledge he holds with certainty from 
reason and experience. It is thus offensive and disgraceful for an unbeliever 
to hear a Christian talk nonsense about such things, claiming that what he is 
saying is based in Scripture. We should do all that we can to avoid such an 
embarrassing situation, which people see as ignorance in the Christian and 
laugh to scorn.

-Saint Augustine


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Stop At Return

2002-10-31 Thread Evan Nemerson
Try fgets()... fread() is binary safe, so it doesn't terminate at \x0d\x0a. 
fges, on the other hand, does.



On Thursday 31 October 2002 08:41 am, Adam Voigt wrote:
 I'm running PHP in console mode, on a script which uses:

 $f = fopen(php://stdin,r);
 $data = fread($f,12);
 fclose($f);

 To get an IP address (a max of 12 characters), so the question
 is, how do I stop taking input when they hit return (ie, if
 there IP is less then the max 12 it will keep waiting for 12
 characters of input) any ideas? (Other then to loop through
 taking what character at a time checking to see if it's the
 return key.)?

 Adam Voigt
 [EMAIL PROTECTED]

-- 
The world holds two classes of men -- intelligent men without religion, and 
religious men without intelligence.

-Abu'l-Ala-Al-Ma'arri


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Is there an ISP that supports GD Library 2.0?

2002-10-31 Thread evan
Sorry... hurricane electric- www.he.net

On Thursday 31 October 2002 08:37 am, Evan Nemerson wrote:
 Hurrican Electric does... here's a php -m from them:

 Running PHP 4.1.2
 Zend Engine v1.1.1, Copyright (c) 1998-2001 Zend Technologies

 [PHP Modules]
 xml
 standard
 session
 posix
 pcre
 mysql
 imap
 gd
 ftp
 db
 zlib

 [Zend Modules]
 Not Implemented


 I had to use pdflib once, and after talking to them for a bit they
 configured it so i could use dl()... They have no problems with security
 audits (as long as you give them a heads-up), servers are quick and
 dependable, they implemented privsep in OpenSSH in just a few hours back
 when there was that remote-root hole (chrooted jail w/ privsep)...
 Basically, I highly reccomend.

 On Thursday 31 October 2002 08:10 am, René Fournier wrote:
  I'm going to need it for a site I'm working on
  Any suggestions are much appreciated.
 
 
  ---
  René Fournier,
  [EMAIL PROTECTED]
 
  Toll-free +1.888.886.2754
  Tel +1.403.291.3601
  Fax +1.403.250.5228
  www.smartslitters.com
 
  SmartSlitters International
  #33, 1339 - 40th Ave NE
  Calgary AB  T2E 8N6
  Canada

-- 


-


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] strtotime bug? end of the month.

2002-10-31 Thread 1LT John W. Holmes
 date(Y-m-d,strtotime(+1 month))
 
 returns December 1st!  This happens when you add 1 month to any day that
 doesn't exist in the next month.  Quite annoying that you have to handle
 it like this:
 
 date(Y-m-d,strtotime(+1 month,strtotime(date(Y-m-1

How about

echo date('y-m-d',strtotime('next month last day'));

---John Holmes...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] date validation problem!

2002-10-31 Thread 1LT John W. Holmes
 I am having some problem with date validation
 I am trying to validate the date in a form Field
 I had provided a text field for date, so have to
 expect all the different possible entry,
 When i tried with checkdate() method it needs the
 parametes in (int month,int date, int year). It make
 the code more complex , What i am looking is some
 thing similar to is_int(), like the one we have in VB
 isdate()
   thanks in advance

There's nothing like that, you have to create it yourself. I personally hate
the three drop down method that someone else suggested, but that's just me.

I prefer to have a text box like you, but tell the user what the accepted
format is. You can then write a simple function to parse their answer and
make sure it's correct. You can also use that function to convert it to a
Unix timestamp or MySQL timestamp.

I prefer to accept my dates in the military format of DDMMM or DDMMMYY
(17NOV75 or 17NOV1975).

I use this function to validate the input:

//check that date matches 17nov75 or 17nov1975 format.
//if it does, returned as mysql format date mmdd
function date($input,$label,$format)
{
$retval = false;

//defaults
$month_array =
array(jan=01,feb=02,mar=03,apr=04,may=05,jun=06
,jul=07,aug=08,sep=09,oct=10,nov=11,dec=12);
$days_in_month = array(31,28,31,30,31,30,31,31,30,31,30,31);

//verify date matches 17nov75 or 17nov1975 format

if(eregi(^([0-9]{1,2})-?(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)-?
((19|20)?[0-9]{2})$,$input,$regs))
{
//convert month to number
$regs[2] = strtolower($regs[2]);
$month = $month_array[$regs[2]];

//make days two digits if it's not already
$day = $regs[1];
if($day  10  strlen($day) == 1) { $day = 0 . $day; }
if($regs[3]  100)
{
//account for 2 digit year
// 30 = 20xx
// 30 = 19xx
if($regs[3]  30) { $year = 20 . $regs[3]; }
else { $year = 19 . $regs[3]; }
}
else { $year = $regs[3]; }

//verify day does not exceed days in month
if(($day = $days_in_month[$month-1]  $day  0) || ($day==29
 $month==2  $year%4==0))
{
$retval = $year.$month.$day;
}
else
{
$this-error[] = $label . : date has invalid day;
}
}
else
{
$this-error[] = $label . : date does not match format of
17NOV75 or 17NOV1975;
}

return $retval;
}


---John Holmes...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Changing the key

2002-10-31 Thread John Meyer
How do I change the key in an array without having a duplicate key=$value?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Changing the key

2002-10-31 Thread 1LT John W. Holmes
 How do I change the key in an array without having a duplicate
key=$value?

You could maybe use array_flip, change the value, then array_flip again.

Or create your new key=value and unset() the old one.

$array[$new_key] = $array[$old_key];
unset($array[$old_key]);

---John Holmes...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] strtotime bug? end of the month.

2002-10-31 Thread Michael Hazelden
How about - and a little more complex ...

$mydate = date(d)!=1  date(d,strtotime(+1 month))==1 ?
date(Y-m-d,strtotime(+1 month)-86400) : date(Y-m-d,strtotime(+1
month));

to summarise - if you perform your +1 month and it creates a day of 1, but
the current day isn't 1 - do the same calculation, but a day less ...
otherwise - do the month more. I haven't tested it - but it should give the
results you want.

-Original Message-
From: 1LT John W. Holmes [mailto:holmes072000;charter.net]
Sent: 31 October 2002 17:10
To: Jeff Bearer; [EMAIL PROTECTED]
Subject: Re: [PHP] strtotime bug? end of the month.


 date(Y-m-d,strtotime(+1 month))
 
 returns December 1st!  This happens when you add 1 month to any day that
 doesn't exist in the next month.  Quite annoying that you have to handle
 it like this:
 
 date(Y-m-d,strtotime(+1 month,strtotime(date(Y-m-1

How about

echo date('y-m-d',strtotime('next month last day'));

---John Holmes...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


_
This message has been checked for all known viruses by the 
MessageLabs Virus Control Centre.

This message has been checked for all known viruses by the MessageLabs Virus Control 
Centre.


*

Notice:  This email is confidential and may contain copyright material of Ocado 
Limited (the Company). Opinions and views expressed in this message may not 
necessarily reflect the opinions and views of the Company.
If you are not the intended recipient, please notify us immediately and delete all 
copies of this message. Please note that it is your responsibility to scan this 
message for viruses.

Company reg. no. 3875000.  Swallowdale Lane, Hemel Hempstead HP2 7PY

*

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] How to set paper size for PDF?

2002-10-31 Thread Drew Kime
I can set the page size with pdf_begin_page(), but if I set it to legal 
size I still have to change the printer setting to select the correct 
paper.  Otherwise it just scales the page down to fit letter paper.

Someone has insisted they've seen PDFs that automatically select the 
proper paper, but I can't find an option for it.

Drew


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] unlink function

2002-10-31 Thread Andres, Cyrille
Hello everyone,

I upload some files on my server. If the number of lines of a file exceeds
159, I want to erase the file.

Actually the unlink() function doesn't work, I have this error : Warning:
Unlink failed (Permission denied) in D:\Data\WebSSL\tm\RFP\upload2.php on
line 78.

My code is : 

$num = 0;
$fp = fopen (temp/$i,r);
while ($data = fgetcsv ($fp, 1000, ,)) 
$num++;

echo number of lines : $num;

if ($num150){
echo you have too many hotels;
unlink(temp/$i);

}
fclose ($fp);


Do you have a clue ??

Cyrille.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] unlink function

2002-10-31 Thread Adam Voigt
Unlink function isn't broken, you just don't have the correct
rights set on the files, so PHP can't erase them, fix the permissions
and that will take care of that error.

Adam Voigt
[EMAIL PROTECTED]

On Thu, 2002-10-31 at 12:46, Andres, Cyrille wrote:
 Hello everyone,
 
 I upload some files on my server. If the number of lines of a file exceeds
 159, I want to erase the file.
 
 Actually the unlink() function doesn't work, I have this error : Warning:
 Unlink failed (Permission denied) in D:\Data\WebSSL\tm\RFP\upload2.php on
 line 78.
 
 My code is : 
 
   $num = 0;
   $fp = fopen (temp/$i,r);
   while ($data = fgetcsv ($fp, 1000, ,)) 
   $num++;
 
   echo number of lines : $num;
   
   if ($num150){
   echo you have too many hotels;
   unlink(temp/$i);
   
   }
   fclose ($fp);
 
 
 Do you have a clue ??
 
 Cyrille.
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] stipslashes

2002-10-31 Thread ed

Is 

stripslashes($_POST);

the same as 

stripslashes($_POST['var1']);
stripslashes($_POST['var2']);
stripslashes($_POST['var3']);


Thanks,

Ed



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] ^M at the end of each line when I use php to write file

2002-10-31 Thread Brandon Orther
Hello,
 
Does anyone know a way around all the ^M at the end of each line that my
php file writes to on a linux box?
 

 

Brandon Orther 

WebIntellects Design/Development Manager

 mailto:brandon;webintellects.com [EMAIL PROTECTED]
800-994-6364

 http://www.webintellects.com/ www.webintellects.com



 



Re: [PHP] unlink function

2002-10-31 Thread Evan Nemerson
It probably isn't supported in windows. Unlink is (in C) in the unistd.h file. 
It provides a way to remove a file based on the unlink syscall (which i 
sincerly doubt is available from Win32). Looking at php.net/unlink... yep 
fourth comment: unlink() function dosen't work with windows98, but it dose 
work on NT with apache server.

If memory serves, there is an $OS variable... if not, check phpinfo(). You can 
do something like...

if ( stristr($OS, Win) )
exec(echo 'y' | del $file);
else
unlink($file);



On Thursday 31 October 2002 09:46 am, Andres, Cyrille wrote:
 Hello everyone,

 I upload some files on my server. If the number of lines of a file exceeds
 159, I want to erase the file.

 Actually the unlink() function doesn't work, I have this error : Warning:
 Unlink failed (Permission denied) in D:\Data\WebSSL\tm\RFP\upload2.php on
 line 78.

 My code is :

   $num = 0;
   $fp = fopen (temp/$i,r);
   while ($data = fgetcsv ($fp, 1000, ,))
   $num++;

   echo number of lines : $num;

   if ($num150){
   echo you have too many hotels;
   unlink(temp/$i);

   }
   fclose ($fp);


 Do you have a clue ??

 Cyrille.

-- 
I pledge allegiance to the flag, of the United States of America, and to the 
republic for which it stands, one nation indivisible, with liberty, and 
justice for all.

-Pledge of Allegiance


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] command to determine the end of a page?

2002-10-31 Thread Jeff Bluemel
is there a php command that could determine if the end of a page has been
reached according to their print driver?  I'm need to print out a report
that could be multiple pages.  I need to be able to put column headings 
page numbers.

thanks,

Jeff



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] ^M at the end of each line when I use php to write file

2002-10-31 Thread Evan Nemerson
a what does your code look like??? What happens when you

$fp = fopen(temp, a+);
for ( $x=0 ; $x10 ; $x++ )
fputs($fp, $x\n);
fclose($fp);

???



On Thursday 31 October 2002 09:44 am, Brandon Orther wrote:
 Hello,

 Does anyone know a way around all the ^M at the end of each line that my
 php file writes to on a linux box?


 

 Brandon Orther

 WebIntellects Design/Development Manager

  mailto:brandon;webintellects.com [EMAIL PROTECTED]
 800-994-6364

  http://www.webintellects.com/ www.webintellects.com

 

-- 
I contend that we are both atheists. I just believe in one fewer god than you 
do. When you understand why you dismiss all the other possible gods, you will 
understand why I dismiss yours.

-Stephen Roberts


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] command to determine the end of a page?

2002-10-31 Thread Adam Voigt
I tried to do what your talking about, never found a way, other then
guessing where it would end with a lot of test runs. We ended up
switching to writing out PDF's which is much more scientific where you
can just check X,Y coordinates to see where you are on the page.

Adam Voigt
[EMAIL PROTECTED]

On Thu, 2002-10-31 at 13:08, Jeff Bluemel wrote:
 is there a php command that could determine if the end of a page has been
 reached according to their print driver?  I'm need to print out a report
 that could be multiple pages.  I need to be able to put column headings 
 page numbers.
 
 thanks,
 
 Jeff
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] strtotime bug? end of the month.

2002-10-31 Thread Jeff Bearer
Actually I only needed date(Y-m) so my solution works fine, and I
didn't consider the problems with hard coding 1 into it.  But thanks for
the replies.





On Thu, 2002-10-31 at 11:33, Jeff Bearer wrote:
 date(Y-m-d,strtotime(+1 month))
 
 returns December 1st!  This happens when you add 1 month to any day that
 doesn't exist in the next month.  Quite annoying that you have to handle
 it like this:
 
 date(Y-m-d,strtotime(+1 month,strtotime(date(Y-m-1
 
 
 -- 
 Jeff Bearer, RCHE
 Webmaster, PittsburghLIVE.com
 Winner 2002 Eppy Award, Best U.S. Newspaper Website
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
-- 
Jeff Bearer, RCHE
Webmaster, PittsburghLIVE.com
Winner 2002 Eppy Award, Best U.S. Newspaper Website


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] command to determine the end of a page?

2002-10-31 Thread Evan Nemerson
Might not be the best solution, but you _could_ create PDFs of your data, then 
print those...? Really clunky, but you could do nice formatting type stuff...


On Thursday 31 October 2002 10:08 am, Jeff Bluemel wrote:
 is there a php command that could determine if the end of a page has been
 reached according to their print driver?  I'm need to print out a report
 that could be multiple pages.  I need to be able to put column headings 
 page numbers.

 thanks,

 Jeff

-- 
Prisons are built with stones of Law, Brothels with bricks of Religion.

-William Blake


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] command to determine the end of a page?

2002-10-31 Thread Jay Blanchard
[snip]
Might not be the best solution, but you _could_ create PDFs of your data,
then
print those...? Really clunky, but you could do nice formatting type
stuff...
[/snip]

You may want to try the FPDF class ... http://www.fpdf.org

HTH!

Jay



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] required field

2002-10-31 Thread Edward Peloke
I know you can do it with javascript but is there a way in php or straight
html to make a field in a form required?  I would like to validate it on
submit.

Thanks,
Eddie


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] ^M at the end of each line when I use php to write file

2002-10-31 Thread Brandon Orther
The lines that are having a ^M are pulling from a TEXT field of a mysql
database.  The \n I am saving come out great.  So I guess I found that
my issue is that text fields I am pulling.  Is there a way to make the
new line in a text field the same as a \n when pulling from a database?

 
Brandon Orther 
WebIntellects Design/Development Manager
[EMAIL PROTECTED] 800-994-6364
www.webintellects.com




-Original Message-
From: Evan Nemerson [mailto:evan;coeus-group.com] 
Sent: Thursday, October 31, 2002 10:08 AM
To: Brandon Orther; [EMAIL PROTECTED]
Subject: Re: [PHP] ^M at the end of each line when I use php to write
file


a what does your code look like??? What happens when you

$fp = fopen(temp, a+);
for ( $x=0 ; $x10 ; $x++ )
fputs($fp, $x\n);
fclose($fp);

???



On Thursday 31 October 2002 09:44 am, Brandon Orther wrote:
 Hello,

 Does anyone know a way around all the ^M at the end of each line that 
 my php file writes to on a linux box?


 

 Brandon Orther

 WebIntellects Design/Development Manager

  mailto:brandon;webintellects.com [EMAIL PROTECTED] 
 800-994-6364

  http://www.webintellects.com/ www.webintellects.com

 

-- 
I contend that we are both atheists. I just believe in one fewer god
than you 
do. When you understand why you dismiss all the other possible gods, you
will 
understand why I dismiss yours.

-Stephen Roberts


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] required field

2002-10-31 Thread Jay Blanchard
[snip]
I know you can do it with javascript but is there a way in php or straight
html to make a field in a form required?  I would like to validate it on
submit.
[/snip]

If server side validation works for you then you can check to see if the
proper variable isset() and if not it can return to the page to require the
information. If you need client side validation you will have to use
JavaScript

HTH!

Jay



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] command to determine the end of a page?

2002-10-31 Thread Carl Brandenburg
I am very unfamiliar with printing from PHP, but could you just guess how
many lines per page you want to print and after that many lines issue a page
break then print your header for the next page? Once you have it working you
can tweak the line per page to where they fill a whole sheet of paper. It's
a quick and dirty way of printing reports that I use in our DOS based
accounting system.

Carl

On Thursday 31 October 2002 10:08 am, Jeff Bluemel wrote:
 is there a php command that could determine if the end of a page has been
 reached according to their print driver?  I'm need to print out a report
 that could be multiple pages.  I need to be able to put column headings 
 page numbers.

 thanks,

 Jeff

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] command to determine the end of a page?

2002-10-31 Thread Jeff Bluemel
only problem with that is I believe it is going to change depending on what
printer the user has.  what looks good on mine may not be quite right for
the next person.


Carl Brandenburg [EMAIL PROTECTED] wrote in message
news:ADEKJJAMOOACODPFNFAPAECLCDAA.tongo;bossig.com...
 I am very unfamiliar with printing from PHP, but could you just guess how
 many lines per page you want to print and after that many lines issue a
page
 break then print your header for the next page? Once you have it working
you
 can tweak the line per page to where they fill a whole sheet of paper.
It's
 a quick and dirty way of printing reports that I use in our DOS based
 accounting system.

 Carl

 On Thursday 31 October 2002 10:08 am, Jeff Bluemel wrote:
  is there a php command that could determine if the end of a page has
been
  reached according to their print driver?  I'm need to print out a report
  that could be multiple pages.  I need to be able to put column headings

  page numbers.
 
  thanks,
 
  Jeff

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] command to determine the end of a page?

2002-10-31 Thread Jeff Bluemel
actually Jay - I think inadvertently you answered my question better then I
was really looking for.  I originally wanted to do this with PDF, but the
costs for pdflib were just too high, and I wouldn't find an open source/free
solution.  I will have to take a look at fpdf, and see if I can use it.

if not then I guess I'll turn to java script which would be acceptable too.

Jay Blanchard [EMAIL PROTECTED] wrote in message
news:003d01c28109$9ff641c0$8102a8c0;000347D72515...
 [snip]
 Might not be the best solution, but you _could_ create PDFs of your data,
 then
 print those...? Really clunky, but you could do nice formatting type
 stuff...
 [/snip]

 You may want to try the FPDF class ... http://www.fpdf.org

 @HTH!

 Jay





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] mail()

2002-10-31 Thread Edward Peloke

I am attempting to use the mail function.  I have set the smtp in the
php.ini file to my smtp server but when I run the script, I get the error
Warning: Failed to Connect in c:\program files\apache
group\apache\htdocs\lg\nuser2.php on line 50 where line 50 is where the mail
function is called.  Why is it still pointing to my localhost?  I am running
it through apache and Win98.

Thanks,
Eddie


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] command to determine the end of a page?

2002-10-31 Thread Jay Blanchard
[snip]
only problem with that is I believe it is going to change depending on what
printer the user has.  what looks good on mine may not be quite right for
the next person.
[/snip]

The FPDF class (http://www.fpdf.org) has a SetAutoPageBreak() function which
sets the page break at a certain distance from the bottom of the page which
may work for you.

HTH

Jay



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] command to determine the end of a page?

2002-10-31 Thread R B
When you use, FPDF class (i think others pdf class too), you can setup the 
paper size in the document (pdf), but the printer don't care this paper size 
configuration and prints with the default paper size, and my printer don't 
have a custom size setup.

Do you know who to print with custom size?

Thanks,

RB


From: Jay Blanchard [EMAIL PROTECTED]
To: 'Evan Nemerson' [EMAIL PROTECTED],   'Jeff Bluemel' 
[EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: RE: [PHP] command to determine the end of a page?
Date: Thu, 31 Oct 2002 12:16:24 -0600

[snip]
Might not be the best solution, but you _could_ create PDFs of your data,
then
print those...? Really clunky, but you could do nice formatting type
stuff...
[/snip]

You may want to try the FPDF class ... http://www.fpdf.org

@HTH!

Jay



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


_
Charla con tus amigos en línea mediante MSN Messenger: 
http://messenger.microsoft.com/es


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] required field

2002-10-31 Thread 1LT John W. Holmes
 I know you can do it with javascript but is there a way in php or straight
 html to make a field in a form required?  I would like to validate it on
 submit.

No, you just have to write some PHP code to verify that something was
entered for the input and validate it based on whatever you think the data
should be.

---John Holmes...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] ^M at the end of each line when I use php to write file

2002-10-31 Thread 1LT John W. Holmes
You're probably writing \r\n instead of just \n. 

---John Holmes...

- Original Message - 
From: Brandon Orther [EMAIL PROTECTED]
To: PHP User Group [EMAIL PROTECTED]
Sent: Thursday, October 31, 2002 12:44 PM
Subject: [PHP] ^M at the end of each line when I use php to write file


 Hello,
  
 Does anyone know a way around all the ^M at the end of each line that my
 php file writes to on a linux box?
  
 
  
 
 Brandon Orther 
 
 WebIntellects Design/Development Manager
 
  mailto:brandon;webintellects.com [EMAIL PROTECTED]
 800-994-6364
 
  http://www.webintellects.com/ www.webintellects.com
 
 
 
  
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] stipslashes

2002-10-31 Thread 1LT John W. Holmes
 Is 
 
 stripslashes($_POST);
 
 the same as 
 
 stripslashes($_POST['var1']);
 stripslashes($_POST['var2']);
 stripslashes($_POST['var3']);

Nope. 

---John Holmes...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] stipslashes

2002-10-31 Thread Marco Tabini
But you could do this:

function f($value, $key)
{
$value = stripslashes ($value);
}

array_walk($_POST, 'f');

On Thu, 2002-10-31 at 13:41, 1LT John W. Holmes wrote:
  Is 
  
  stripslashes($_POST);
  
  the same as 
  
  stripslashes($_POST['var1']);
  stripslashes($_POST['var2']);
  stripslashes($_POST['var3']);
 
 Nope. 
 
 ---John Holmes...
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] ^M at the end of each line when I use php to write file

2002-10-31 Thread Marek Kilimajer
Don't put it into the databese ;)


Brandon Orther wrote:


The lines that are having a ^M are pulling from a TEXT field of a mysql
database.  The \n I am saving come out great.  So I guess I found that
my issue is that text fields I am pulling.  Is there a way to make the
new line in a text field the same as a \n when pulling from a database?

 
Brandon Orther 
WebIntellects Design/Development Manager
[EMAIL PROTECTED] 800-994-6364
www.webintellects.com




-Original Message-
From: Evan Nemerson [mailto:evan;coeus-group.com] 
Sent: Thursday, October 31, 2002 10:08 AM
To: Brandon Orther; [EMAIL PROTECTED]
Subject: Re: [PHP] ^M at the end of each line when I use php to write
file


a what does your code look like??? What happens when you

$fp = fopen(temp, a+);
for ( $x=0 ; $x10 ; $x++ )
	fputs($fp, $x\n);
fclose($fp);

???



On Thursday 31 October 2002 09:44 am, Brandon Orther wrote:
 

Hello,

Does anyone know a way around all the ^M at the end of each line that 
my php file writes to on a linux box?




Brandon Orther

WebIntellects Design/Development Manager

mailto:brandon;webintellects.com [EMAIL PROTECTED] 
800-994-6364

http://www.webintellects.com/ www.webintellects.com


   


 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Form Question

2002-10-31 Thread PHP List
Hi,
I am hopeing someone can help me with this.
This is more of a javascript problem I suppose.
I have a bunch of check boxes on a from that I have given a name of rgItems[] so I can 
access them as an array in php.
But I can't find a way to clear all the checkboxes on the form at once. a reset button 
only resets the form to the original values, but I need to be able to clear all the 
check boxes.

SCRIPT LANGUAGE=JavaScript
!--
function ClearLevelListForm()
{
 for (var i=0;idocument.LevelListForm.elements.length;i++)
 {
  if (document.LevelListForm.elements[i].checked == true)
  {   
alert(document.LevelListForm.elements[i].value);
document.LevelListForm.elements[i].checked = false;  
  }
 }
}
//--
/script
I do get the correct alerts from the above script corresponding to the number of 
checked boxes, however, the second line does not seem to be unchecking the boxes. I am 
not sure if this has something to do with the fact that all the boxes have the same 
name rgItems[] and the browser doesn't know which one to uncheck.
Has anybody else come accross this?
Thanks,
And I apologize for asking this question on the PHP List, but I am hoping someone here 
may have had the same problem when name mutliple form elements using the array style:  
 blah[]


[PHP] number_format question

2002-10-31 Thread ed

I using number_format where I need to turn a number say 123456789 into
123,456,789 and it works just fine. I also need it to strip the decimal
out if someone enters it. I.E 123456.00 would become 123,456

the command I'm using right now is:

number_format($number, ,);

If I enter 123456.00 it comes out as 123. Did I miss something?

Thanks,

Ed



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] number_format question

2002-10-31 Thread Jay Blanchard
[snip]
I using number_format where I need to turn a number say 123456789 into
123,456,789 and it works just fine. I also need it to strip the decimal
out if someone enters it. I.E 123456.00 would become 123,456

the command I'm using right now is:

number_format($number, ,);

If I enter 123456.00 it comes out as 123. Did I miss something?
[/snip]

You're missing an attribute, try

number_format($number, '', ',');

HTH!

Jay



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] number_format question

2002-10-31 Thread ed

 If I try that I get a wrong parameter count error.


Ed


On Thu, 31 Oct 2002, Jay Blanchard wrote:

 [snip]
 I using number_format where I need to turn a number say 123456789 into
 123,456,789 and it works just fine. I also need it to strip the decimal
 out if someone enters it. I.E 123456.00 would become 123,456
 
 the command I'm using right now is:
 
 number_format($number, ,);
 
 If I enter 123456.00 it comes out as 123. Did I miss something?
 [/snip]
 
 You're missing an attribute, try
 
 number_format($number, '', ',');
 
 HTH!
 
 Jay
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] number_format question

2002-10-31 Thread Jay Blanchard
[snip]
 If I try that I get a wrong parameter count error.

[/snip]

number_format ( float number [, int decimals [, string dec_point [, string
thousands_sep]]])

number_format($number, 0, '', ',');

Try that ...

Jay



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




  1   2   >