[PHP] PHP support for Intersystems Cache database

2004-03-05 Thread Vincent DUPONT
Hi,
 
do you know if PHP supports the Intersystems 'Caché' database system?
The PHP manual does not cite classes and I found no information at the intersystems 
web site.
 
Thank you ,
Vincent


[PHP] Advanced PHP Mailing List?

2004-03-05 Thread Galen
Hi,

Don't mind if I ask this, but are there any other large PHP mailing 
lists out there that target the mid to high range of PHP development?

This list is great, and incredible for beginners, but a large portion 
of it is stuff like what's broken with this code (simple typo) and 
how do I write SQL and discussing plain weird problems, often due to 
pretty simple user error. Really, this is very important to the 
community for this kind of zero-prerequisite list to exist. But I'm 
wondering if there are more complex lists where I might at least start 
just listening and see what's going on. I would like to hear about very 
complex, high-end PHP coding and techniques and perhaps interact a 
little too.

Anyone got suggestions? Anyone else have the same interest?

Feel free to reply off-list if you don't think this is on-topic.

-Galen

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


Re: [PHP] Advanced PHP Mailing List?

2004-03-05 Thread Tristan . Pretty
I use 12All from Active campaign...
Great site, GREAT support... and the code was not beyond me in most 
places...




Galen [EMAIL PROTECTED] 
05/03/2004 08:58

To
[EMAIL PROTECTED]
cc

Subject
[PHP] Advanced PHP Mailing List?






Hi,

Don't mind if I ask this, but are there any other large PHP mailing 
lists out there that target the mid to high range of PHP development?

This list is great, and incredible for beginners, but a large portion 
of it is stuff like what's broken with this code (simple typo) and 
how do I write SQL and discussing plain weird problems, often due to 
pretty simple user error. Really, this is very important to the 
community for this kind of zero-prerequisite list to exist. But I'm 
wondering if there are more complex lists where I might at least start 
just listening and see what's going on. I would like to hear about very 
complex, high-end PHP coding and techniques and perhaps interact a 
little too.

Anyone got suggestions? Anyone else have the same interest?

Feel free to reply off-list if you don't think this is on-topic.

-Galen

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





*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

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



[PHP] Forms, or multiple headers?

2004-03-05 Thread Tristan . Pretty
I'm talking to a MySQL database that contains info on all downloads from 
our site.
I list all these entries, on a PHP page.
The table structure etc, are static, but the fields retrieved, are 
dynamic, based on the users search criteria.
Within each result, I've added a small form, that posts that data, to an 
external site (salesforce.com).
Each field looks like this:
http://www.risk.sungard.com/del.gif
But one can have entries on a page..

At present, a user can submit a field to salesforce one at a time, no 
probs, and I'll probably wanna keep it that way.
However..

TO enable multiple deletions, I must place the whole table in another 
form.
What happens is that no matter how many deletions I select, it only picks 
up the one at the top of the page, or none, if the top one isn't selected.

I'm using the following PHP...

if ($submit == 'DELETE SELECTED') {

foreach($_POST[select] as $del) {
$res = mysql_query(DELETE FROM $table_name WHERE 
id='$del');

}
}

But I presume that the embedded forms that talk to sales force, are 
disrupting it...

So I need to either:

1. find out how to let the page detect what's selected anotehr way.. OR
2. enable multiple post to salesforce.com, WITHOUT opening potentially 
dozens of new windows (one for each submision)

Any takers on a unique way to acheive this?

Tris..

(P.S. Glad you asked ;-)  )


*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

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



[PHP] remote stop/start the applications

2004-03-05 Thread CurlyBraces Technologies \( Pvt \) Ltd



hi ,

My OS = Red Hat Linux 8
webserver = apache
In that machine , there is some perl , and php 
scrpts r running.
This perl script is the application that i have to 
run over the web. This will effect for the whole process.
Some times i want to stop/run that perl script from 
the other machine over the web.
So can i do that over the web , because it is 
running on the intranet.
can somebody help me to do this php scripting 
...plz

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

RE: [PHP] PHP Sessions - Cookies Not Saving

2004-03-05 Thread Ford, Mike [LSS]
On 05 March 2004 03:33, Paul Higgins wrote:

 When I do:  print_r($_COOKIE); I get the following:
 Array ( [PHPSESSID] = 11781ce29c68ca7ef563110f37e43f38 )
 
 Does that mean its setting the Cookie?

Yes.

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] looking for php talent...

2004-03-05 Thread Dave Restall - System Administrator,,,
Hi,

 we're looking for some PHP development talent. however, we don't want to
 post here if this is not the right group/list. please let us know if it
 is/isn't appropriate to post our requirements. if it is, we'll go ahead and
 post what we're looking for.

There seem to be a few lists available that cater for PHP jobs, has
anybody any experience of them ?  Is there a need for another one ?
If so, how should it be run ?

Let me know (preferably off list to cut down the OT stuff).

Regards,


Dave
mail/php/2004-03-05.tx php-general
++
| Dave Restall,   IIRC Limited, PO Box 46, Skelton, Cleveland, TS12 2GT. |
| Tel. +44 (0) 1287 639309 Mob. +44 (0) 7973 831245 Fax. +44 (0) 1287 635955 |
| email : [EMAIL PROTECTED]   [EMAIL PROTECTED] Web : http://www.iirc.net |
++
| PENGUINICITY!! |
++

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



[PHP] RE: [PHP-WIN] Sending arguments to a SP in PHP

2004-03-05 Thread Svensson, B.A.T. (HKG)
All morons who answer on this, make sure you send your bloody reply
to either the guy who asked the question in the first place or to
the PHP list - and NOT to me


//Anders - sick tired of all private help.


On Fri, 2004-03-05 at 09:48, Svensson, B.A.T. (HKG) wrote:
 Very is your problem located?
 
 Is the string not properly built by php?
 or is an error genereated when you try to execute the query?
 
 
 -Original Message-
 From: Harpreet K. Singh
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: 2004-03-04 21:55
 Subject: [PHP-WIN] Sending arguments to a SP in PHP
 
 I am using PHP and sql server 2000.
 
 I have a stored procedure which takes 3 arguments. The first argument is
 a
 string and the rest 2 are integers.
 
 For some reasons the call to the stored procedure is being trimmed.
 
 My call is as follows
 $oldquery=select var1,var2,var3,var4. from table order by var1;
 
 $query=exec limitselect '. $oldquery .',. $limit .,. $offset;
 
 i try to print the sql command
 echo br.$query;
 
 It prints out a trimmed string
 
 exec limitselect 'select origin
 
 is theri a limit to what one can send to a sp call
 
 Please help i am totally confused.
 
 Thanks
 
 -- 
 PHP Windows 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] Re: [PHP-WIN] Sending arguments to a SP in PHP

2004-03-05 Thread Jakes
is it you result set that is getting trimmed or the actual query?


B.A.T. Svensson [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Very is your problem located?

 Is the string not properly built by php?
 or is an error genereated when you try to execute the query?


 -Original Message-
 From: Harpreet K. Singh
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: 2004-03-04 21:55
 Subject: [PHP-WIN] Sending arguments to a SP in PHP

 I am using PHP and sql server 2000.

 I have a stored procedure which takes 3 arguments. The first argument is
 a
 string and the rest 2 are integers.

 For some reasons the call to the stored procedure is being trimmed.

 My call is as follows
 $oldquery=select var1,var2,var3,var4. from table order by var1;

 $query=exec limitselect '. $oldquery .',. $limit .,. $offset;

 i try to print the sql command
 echo br.$query;

 It prints out a trimmed string

 exec limitselect 'select origin

 is theri a limit to what one can send to a sp call

 Please help i am totally confused.

 Thanks

 -- 
 PHP Windows 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] Problem compiling PHP5 with libconv

2004-03-05 Thread electroteque
hi there i am trying to build PHP5 on solaris 9, libiconv is stupidly set in
/opt/csw/lib as that is where the package manage pkg-get puts it. I have set
where to find libiconv but still not luck

Here is my compile

./configure --with-apxs2=/usr/local/httpd/bin/apxs --without-mysql --with-my
sqli=/usr/local/mysql/bin/mysql_config --with-libxml-dir=/usr/local --with-i
conv-dir=/opt/csw --with-zlib-dir=/opt/csw --with-curl=/opt/csw --with-kerbe
ros=/opt/csw --enable-track-vars --with-xml=/usr/local/libxml --enable-xslt 
--with-xslt-sablot=/usr/local --with-expat=/opt/csw --with-iconv=/opt/csw  -
-with-jpeg-dir=/opt/csw  --with-png-dir=/opt/csw --with-gd --enable-gd-nativ
e-ttf --enable-gd-imgstrttf --with-zlib=/opt/csw --with-pspell=/opt/csw --wi
th-gettext=/opt/csw --with-mcrypt=/usr/local/ --with-openssl=/opt/csw --enab
le-ftp --with-dom=/usr/local/libxslt --with-dom-xslt=/usr/local/libxslt

grep: can't open /usr/local/lib/libiconv.la
/opt/csw/bin/gsed: can't read /usr/local/lib/libiconv.la: No such file or
directory

libtool: link: `/usr/local/lib/libiconv.la' is not a valid libtool archive
make: *** [libphp5.la] Error 1


What can i do ?

Sorry if i have posted into the wrong list.

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



Re: [PHP] Advanced PHP Mailing List?

2004-03-05 Thread Jason Wong
On Friday 05 March 2004 17:09, [EMAIL PROTECTED] wrote:

[inapproriate advertising snipped]

Excuse me? Re-read the original post.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
In any given price estimate, final cost will exceed estimates by a factor of 2
-- Financial General Shefields Corollaries n1
*/

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



Re: [PHP] PHP Sessions - Cookies Not Saving

2004-03-05 Thread Jason Wong
On Friday 05 March 2004 13:05, Paul Higgins wrote:
 When I thought about what the compay really told me...it didn't make sense.
 All I know is that that cookie will not save on my WinXP box, but it will
 save on my Linux box.

As sending cookies is pretty much a generic procedure which is not platform 
dependent it would suggest that your WinXP box is broken (needless to say I'm 
assuming that you have already ensured that your browser is configured to 
accept cookies). Have you tried any other browsers/platforms?

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
All vacations and holidays create problems, except for one's own
-- Murphy's Laws on Work n34
*/

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



RE: [PHP] PHP Sessions - Cookies Not Saving

2004-03-05 Thread electroteque
 but it will
 save on my Linux box.

As sending cookies is pretty much a generic procedure which is not platform 
dependent it would suggest that your WinXP box is broken (needless to say I'm 
assuming that you have already ensured that your browser is configured to 
accept cookies). Have you tried any other browsers/platforms?

The above snippet means it works on  his linux box which is why i suggested to see if 
the session is storing in /tmp, he could prob have spyware running on his machine, i 
advice check out adaware.

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



Re: [PHP] What to do with my array?? Advise needed....

2004-03-05 Thread Richard Davey
Hello Ryan,

Friday, March 5, 2004, 3:41:35 AM, you wrote:

RA Problem is, I have no idea how many email addresses are going to get dumped
RA into that array,
RA and I dont want to have 1 hidden fields for 1 addresses...is it
RA legal (and ok) to put
RA the array into a session or  some way of passing that array?

Question - why on earth do these email addresses need to be placed
into a FORM anyway? If all you are doing is emailing them from within
PHP.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



Re[2]: [PHP] looking for php talent...

2004-03-05 Thread Richard Davey
Hello bruce,

Friday, March 5, 2004, 6:34:32 AM, you wrote:

b We need to stress that we are only looking for very skilled developers who
b are interested in being part of a true Partnership. This will initially be a
b Sweat Equity venture. While we are putting in capital for the
b development/testing servers/hardware, we do not require capital from the
b development partners.

I take it that sweat equity means you want the developers to work for
free on a promise they'll see some money at the end of it, if you
manage to sell whatever it is they build?

Hopefully I misunderstood what you meant here because it's not
sounding too appealing yet.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



Re: [PHP] Advanced PHP Mailing List?

2004-03-05 Thread Richard Davey
Hello Galen,

Friday, March 5, 2004, 8:58:50 AM, you wrote:

G But I'm wondering if there are more complex lists where I might at
G least start just listening and see what's going on. I would like to
G hear about very complex, high-end PHP coding and techniques and
G perhaps interact a little too.

G Anyone got suggestions? Anyone else have the same interest?

I'm not aware of any list like this yet - but I am aware of the need
for one. Keep an eye on the phpcommunity.org website - it is something
we can offer when launched. That is a good few months away yet, but
things are progressing well.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



[PHP] 28th of March - PHP Problems!

2004-03-05 Thread Shaun
Hi,

The 28th of march this year is a Sunday, so why does the following script
output Wed?

?php
$loop3_this_day = 28;
$loop3_this_month = 03;
$loop3_this_year = 2004;
echo date(D, mktime(0, 0, 0, $loop3_this_month, $loop3_this_day,
$loop3_this_year));
?

Any ideas?

Thanks for your help

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



Re: [PHP] 28th of March - PHP Problems!

2004-03-05 Thread Richard Davey
Hello Shaun,

Friday, March 5, 2004, 11:56:03 AM, you wrote:

S The 28th of march this year is a Sunday, so why does the following script
S output Wed?

S ?php
S $loop3_this_day = 28;
S $loop3_this_month = 03;
S $loop3_this_year = 2004;
S echo date(D, mktime(0, 0, 0, $loop3_this_month, $loop3_this_day,
S $loop3_this_year));
?

I changed the date to show a little more detail (date(D M d Y) and
it output: Sat Mar 27 2004 for me, which is exactly what it should.
Suggest you start looking for something specific to your
server/set-up.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



Re: [PHP] 28th of March - PHP Problems!

2004-03-05 Thread Jason Wong
On Friday 05 March 2004 19:56, Shaun wrote:

 $loop3_this_month = 03;

03 !== 3

manual  Types  Integers

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Where there is much light there is also much shadow.
-- Goethe
*/

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



Re[2]: [PHP] 28th of March - PHP Problems!

2004-03-05 Thread Richard Davey
Hello Jason,

Friday, March 5, 2004, 12:07:41 PM, you wrote:

JW 03 !== 3

You're right of course, it doesn't - but it also makes no difference
to his problem:

?php
$m1 = 03;
echo date(D M d Y, mktime(0, 0, 0, $m1, 28, 2004)) . br;
$m2 = 3;
echo date(D M d Y, mktime(0, 0, 0, $m2, 28, 2004));
?

They both output the exact same thing.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



Re: [PHP] 28th of March - PHP Problems!

2004-03-05 Thread Shaun
Jason Wong [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 On Friday 05 March 2004 19:56, Shaun wrote:

  $loop3_this_month = 03;

 03 !== 3

 manual  Types  Integers

 -- 
 Jason Wong - Gremlins Associates - www.gremlins.biz
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *
 --
 Search the list archives before you post
 http://marc.theaimsgroup.com/?l=php-general
 --
 /*
 Where there is much light there is also much shadow.
 -- Goethe
 */

Thanks you for your reply Jason,

but changing 03 to 3 still creates the same output!

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



Re: Re[2]: [PHP] 28th of March - PHP Problems!

2004-03-05 Thread Jason Wong
On Friday 05 March 2004 20:11, Richard Davey wrote:

 JW 03 !== 3

 You're right of course, it doesn't - but it also makes no difference
 to his problem:

In this case it will make no difference, but if one were to use 09 (in the 
mistaken belief that it represents September then it would).

 ?php
 $m1 = 03;
 echo date(D M d Y, mktime(0, 0, 0, $m1, 28, 2004)) . br;
 $m2 = 3;
 echo date(D M d Y, mktime(0, 0, 0, $m2, 28, 2004));
 ?

 They both output the exact same thing.

Which is?

I get the correct output (ie Sun Mar 28 2004). But quoting your previous post, 
how did you get: Sat Mar 27 2004 for me, which is exactly what it should?

As for the OP, if you're sure you're getting Wednesday instead of Sunday then 
you should probably hop over to bugs.php.net and whether anyone else is 
having the same problem.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Prepare for tomorrow -- get ready.
-- Edith Keeler, The City On the Edge of Forever,
   stardate unknown
*/

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



[PHP] Fw: remote stop/start the applications

2004-03-05 Thread CurlyBraces Technologies \( Pvt \) Ltd




- Original Message - 
From: CurlyBraces Technologies ( Pvt ) Ltd 

To: PHP 
Sent: Friday, March 05, 2004 3:30 PM
Subject: remote stop/start the applications

hi ,

My OS = Red Hat Linux 8
webserver = apache
In that machine , there is some perl , and php 
scrpts r running.
This perl script is the application that i have to 
run over the web. This will effect for the whole process.
Some times i want to stop/run that perl script from 
the other machine over the web.
So can i do that over the web , because it is 
running on the intranet.
can somebody help me to do this php scripting 
...plz

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

Re: [PHP] Fw: remote stop/start the applications

2004-03-05 Thread Jason Wong
On Friday 05 March 2004 20:40, CurlyBraces Technologies \( Pvt \) Ltd wrote:

 - Original Message -
 From: CurlyBraces Technologies ( Pvt ) Ltd
 To: PHP
 Sent: Friday, March 05, 2004 3:30 PM
 Subject: remote stop/start the applications

Please be patient.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Look! There! Evil!.. pure and simple, total evil from the Eighth Dimension!
-- Buckaroo Banzai
*/

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



Re[4]: [PHP] 28th of March - PHP Problems!

2004-03-05 Thread Richard Davey
Hello Jason,

Friday, March 5, 2004, 12:27:46 PM, you wrote:

JW I get the correct output (ie Sun Mar 28 2004). But quoting your previous post,
JW how did you get: Sat Mar 27 2004 for me, which is exactly what it should?

Because I over-looked that part :) but more importantly, upon
reflection, it has still done what I would have expected because it's
a BST date and PHP hasn't been told about it, so it's left to its own
devices.

If it's unknown, PHP tries to figure it out itself. This can cause
unexpected (but not incorrect) results.

echo date(D M d Y, gmmktime(0, 0, 0, 3, 28, 2004, 1));

Will give me Sun Mar 28 2004, because its a GMT date falling into BST.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



Re: [PHP] Shopping Carts

2004-03-05 Thread Brian V Bonini
On Fri, 2004-03-05 at 00:13, John Nichel wrote:
 Hi List,
 
I'm looking for people who have experience with the carts listed 
 below to solicit your opinion on said cart.  My boss is looking to put 
 something in place, and while I am evaluating these carts, I'm hoping 
 y'all can point out some pluses and minuses that I'm not going to see by 
 not running them in a day to day production environment.
 
 osCommerce (http://www.oscommerce.com)- Boss likes this one, but I have 
 issues with it's possible security bugs, and the overall design (lack 
 of) of the code

Forget this. It's a total piece of S%T!

-- 
Brian V Bonini [EMAIL PROTECTED]

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



Re: [PHP] Re: Parse error, unexpected T_STRING!!

2004-03-05 Thread Brian V Bonini
On Thu, 2004-03-04 at 21:39, Andre Cerqueira wrote:
 ? is tag for php code start
 
 Enrique Martinez wrote:
  Hello, I'm getting an error that says: 
  
  Parse error, unexpected T_STRING on line 73
  
  line 73 is: ?xml version=1.0 encoding=iso-8859-1
  ?
  
  this is what I have below line 73:
  
  !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0
  Transitional//EN
  http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
  html xmlns=http://www.w3.org/1999/xhtml;
  
  I have PHP-4.2.2, Apache 2.0 on RedHat Linux 9.0
  
  Any idea how can I fix the problem? Thanks in advance.

?php echo '?xml version=1.0 encoding=iso-8859-1?' . \r\n; ?


-- 
Brian V Bonini [EMAIL PROTECTED]

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



[PHP] Date function

2004-03-05 Thread Jason Baker
Hello, I am new to using the date function.  I am in the need of a
script that changes an image on a web page on the first day of each
month and keeps the image there until the first day of the next month.
I have tried to look for something that could come close but still
didnt work.  Can you please help me?  I have a picture of a friend of
mine that wants on her site a picture of her with a different colored
suit depending on the month.  Example:  February = Love  color=red  Any
help will be greatly appreciated.
 
Sincerely;
 
Jason M. Baker
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.593 / Virus Database: 376 - Release Date: 2/20/2004
 


Re: [PHP] Date function

2004-03-05 Thread Richard Davey
Hello Jason,

Friday, March 5, 2004, 1:51:57 PM, you wrote:

JB Hello, I am new to using the date function.  I am in the need of a
JB script that changes an image on a web page on the first day of each
JB month and keeps the image there until the first day of the next month.
JB I have tried to look for something that could come close but still
JB didn’t work.  Can you please help me?  I have a picture of a friend of
JB mine that wants on her site a picture of her with a different colored
JB suit depending on the month.  Example:  February = Love  color=red  Any
JB help will be greatly appreciated.

It might be easier to think about this from a different viewpoint -
instead of worrying about changing an image based on the day of the
month, you could instead have a directory full of images for each
month of the year, i.e.:

graphics/2004/1.jpg
graphics/2004/2.jpg
graphics/2004/3.jpg

(etc)

1 = January, 2 = February, you get the idea.

Then to display the correct one on your site all you would need is:

?php
 $month = date(n);
 echo img src=\graphics/2004/$month.jpg\;
?

Or from within your HTML:

img src=graphics/2004/?=date(n)?.jpg

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



[PHP] Necesito una función

2004-03-05 Thread :: n a s s a t :: Depto Tecnico
En una news de www.php.net informan de que esta dirección se puede utilizar para pedir 
ayuda.

En ese caso, necesitaría saber, por favor, si existe una función para saber la IP 
desde la que se está accediendo a una página.

De no ser esta la utilidad de esta cuenta de correo, les ruego disculpen las molestias.

Muchas gracias.

Un saludo, Pepi García.
Dpto. Programación.
[EMAIL PROTECTED]
www.nassat.com

[PHP] Re: optimisation sending mails

2004-03-05 Thread Marc
Manuel Lemos wrote:

 Hello,
 
 On 03/04/2004 10:38 PM, Marc wrote:
 I need every week to check mails in a database and send them on e-mail to
 a mailinglist server to synchronise the datas.
 
 I work with two mailing servers and 4 mailinglists (2 on each server).
 
   so I need to send 4 lists in mail :
   one to server 1 with liste A
   one to server 1 with liste B
   one to server 2 with liste C
   one to server 3 with liste D
 
 Why do you need to use more than one server? Seems to me like a waste of
 resources. The greatest bottleneck of mailing delivery is bandwidth. If
 you have bandwidth, you can use a mail server like qmail that can be
 configure to execute many simultaneous deliveries .
This is not my own ! My client has a contract withe two partners for two
mailing lists each one. But the datas come from the same database.

 
 I would like to know what is the best way for optimazing the server
 resources :
 
 To send mail during browsing of the record set of the database every time
 I change liste
 or
 browsing all the recordset pushing the datas in a array every time I
 change mailinglist and when browsing is closed send browse the array and
 send the four mail with the mail() function ?
 
 If you are queuing messages to many users, it does not make much sense
 to do it from a Web process as it does not require any Web output. You
 can do it running PHP from shell of a cron like scheduled task.
I think you did'nt understand what I said (my english is so poor !). The php
script is a cron task and only send a mail for each mailinglist wich
contains only : 
SUBSCRIBE [EMAIL PROTECTED] [EMAIL PROTECTED] 
SUBSCRIBE [EMAIL PROTECTED] [EMAIL PROTECTED]
...

I only wandted to know if it was better to interrupt the loop and send mail
or let the loop run and after use the mail function and send the four mail
with the four list of clients.

 
 Is there a solution which permits sending all my mails (4) in one smtp
 connextion ?
 
 There is a misconception here. You do not need to relay messages on a
 SMTP server to send them . Sending messages just requires connecting to
 the recipients SMTP server. Just use a local mailer program like
 sendmail or the equivalent based on qmail and postfix and they take care
 of deliveries from then on.
 
We use qmail but we have only a DSL connection. Our databas is on a web
hosting in France and our partners are sending mailing list from the
caribbean area. It can't be optimised the same than if all stuff where on
our own server.

Thanks for your help.

Regards

Marc

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



RE: [PHP] Necesito una función

2004-03-05 Thread Alex Hogan
If I understand you correctly I think you can use, getenv() of get the IP
address of the user.




alex hogan


 -Original Message-
 From: :: n a s s a t :: Depto Tecnico [mailto:[EMAIL PROTECTED]
 Sent: Friday, March 05, 2004 8:02 AM
 To: php-ayuda
 Subject: [PHP] Necesito una función
 
 En una news de www.php.net informan de que esta dirección se puede
 utilizar para pedir ayuda.
 
 En ese caso, necesitaría saber, por favor, si existe una función para
 saber la IP desde la que se está accediendo a una página.
 
 De no ser esta la utilidad de esta cuenta de correo, les ruego disculpen
 las molestias.
 
 Muchas gracias.
 
 Un saludo, Pepi García.
 Dpto. Programación.
 [EMAIL PROTECTED]
 www.nassat.com


** 
The contents of this e-mail and any files transmitted with it are 
confidential and intended solely for the use of the individual or 
entity to whom it is addressed.  The views stated herein do not 
necessarily represent the view of the company.  If you are not the 
intended recipient of this e-mail you may not copy, forward, 
disclose, or otherwise use it or any part of it in any form 
whatsoever.  If you have received this e-mail in error please 
e-mail the sender. 
** 




[PHP] Re: Forms, or multiple headers?

2004-03-05 Thread Andre Cerqueira
i think you have to give each checkbox a different name
try: del0, del1, del2,...
and each one with the id of the thing you are displaying
than you do something like this:
for ($i=0; isset($_POST['del'.$i]); $i++)
{
  if (!empty($_POST['del'.$i]))
$res = mysql_query(DELETE FROM $table_name
WHERE id='. intval($_POST['del'.$i]) .');
}
intval() it or u may have ppl sending a fake form with ' OR '1'='1
that would end up like: DELETE FROM $table_name WHERE id='' OR '1'='1'
you dont want that, right?


Tristan Pretty wrote:
I'm talking to a MySQL database that contains info on all downloads from 
our site.
I list all these entries, on a PHP page.
The table structure etc, are static, but the fields retrieved, are 
dynamic, based on the users search criteria.
Within each result, I've added a small form, that posts that data, to an 
external site (salesforce.com).
Each field looks like this:
http://www.risk.sungard.com/del.gif
But one can have entries on a page..

At present, a user can submit a field to salesforce one at a time, no 
probs, and I'll probably wanna keep it that way.
However..

TO enable multiple deletions, I must place the whole table in another 
form.
What happens is that no matter how many deletions I select, it only picks 
up the one at the top of the page, or none, if the top one isn't selected.

I'm using the following PHP...

if ($submit == 'DELETE SELECTED') {

foreach($_POST[select] as $del) {
$res = mysql_query(DELETE FROM $table_name WHERE 
id='$del');

}
}
But I presume that the embedded forms that talk to sales force, are 
disrupting it...

So I need to either:

1. find out how to let the page detect what's selected anotehr way.. OR
2. enable multiple post to salesforce.com, WITHOUT opening potentially 
dozens of new windows (one for each submision)

Any takers on a unique way to acheive this?

Tris..

(P.S. Glad you asked ;-)  )

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***
--
André Cerqueira


signature.asc
Description: OpenPGP digital signature


[PHP] ASCII

2004-03-05 Thread csko
Hi!
Is there a function to convert a ASCII char to decimal or binary?
Or a program?

csko

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



[PHP] Re: Necesito una función

2004-03-05 Thread Andre Cerqueira
spanish newsgroup: http://news.php.net/group.php?group=php.general.es
php.general.es
just complementing Alex Hogan words:
http://www.php.net/manual/en/function.getenv.php
(read the comments, they have the code you want)


:: N A S S A T :: Depto Tecnico wrote:

En una news de www.php.net informan de que esta dirección se puede utilizar para pedir ayuda.

En ese caso, necesitaría saber, por favor, si existe una función para saber la IP desde la que se está accediendo a una página.

De no ser esta la utilidad de esta cuenta de correo, les ruego disculpen las molestias.

Muchas gracias.

Un saludo, Pepi García.
Dpto. Programación.
[EMAIL PROTECTED]
www.nassat.com
--
André Cerqueira


signature.asc
Description: OpenPGP digital signature


RE: [PHP] ASCII

2004-03-05 Thread Ford, Mike [LSS]
On 05 March 2004 16:02, csko wrote:

 Hi!
 Is there a function to convert a ASCII char to decimal or binary? Or
 a program? 
 
 csko

http://www.php.net/ord

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



[PHP] scope problem

2004-03-05 Thread Larry Brown
Apparently I'm having some kind of meltdown here.  Can anyone explain the
logic behind why the following variable has the original value and how I can
pull/push the value to access it at the end?


while loop
{
$variable = 100;
while loop
{
switch($othervar)
{
case 1:
$variable = $variable + 100;
break;
case 2:
$variable = $variable + 200;
break;
case 3:
$variable = $variable + 300;
break;
}
echo $variable.br;
}
echo brThe final value is .$variable.br;
}

This gives values something to the tune of...

200
400
700

100

I usually have variables set outside of a while loop that increment based on
the contents of the loop and I could swear that they hold the value on the
other side of the loop.  I don't usually use break; in my scripts unless I'm
using switch. However, I would think that if using break was throwing me,
that the value wouldn't print on each cycle of the loop.

TIA

Larry

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



[PHP] Re: ASCII

2004-03-05 Thread Andre Cerqueira
char-decimal = ord('a')

http://www.php.net/manual/en/function.ord.php

Csko wrote:

Hi!
Is there a function to convert a ASCII char to decimal or binary?
Or a program?
csko
--
André Cerqueira


signature.asc
Description: OpenPGP digital signature


Re: [PHP] ASCII

2004-03-05 Thread Richard Davey
Hello csko,

Friday, March 5, 2004, 4:02:07 PM, you wrote:

c Is there a function to convert a ASCII char to decimal or binary?

Decimal = ord($str)
Binary = decbin(ord($str))

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



[PHP] Re: scope problem

2004-03-05 Thread Andre Cerqueira
can you post something that would run on php?



Larry Brown wrote:

Apparently I'm having some kind of meltdown here.  Can anyone explain the
logic behind why the following variable has the original value and how I can
pull/push the value to access it at the end?
while loop
{
$variable = 100;
while loop
{
switch($othervar)
{
case 1:
$variable = $variable + 100;
break;
case 2:
$variable = $variable + 200;
break;
case 3:
$variable = $variable + 300;
break;
}
echo $variable.br;
}
echo brThe final value is .$variable.br;
}
This gives values something to the tune of...

200
400
700
100

I usually have variables set outside of a while loop that increment based on
the contents of the loop and I could swear that they hold the value on the
other side of the loop.  I don't usually use break; in my scripts unless I'm
using switch. However, I would think that if using break was throwing me,
that the value wouldn't print on each cycle of the loop.
TIA

Larry
--
André Cerqueira


signature.asc
Description: OpenPGP digital signature


Re: [PHP] ASCII

2004-03-05 Thread Daniel Clark

ord() -- Return ASCII value of character

http://www.phpbuilder.com/manual/function.ord.php


 Hi!
 Is there a function to convert a ASCII char to decimal or binary?
 Or a program?

 csko

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



Re: [PHP] scope problem

2004-03-05 Thread Richard Davey
Hello Larry,

Friday, March 5, 2004, 4:01:39 PM, you wrote:

LB This gives values something to the tune of...

LB 200
LB 400
LB 700

LB 100

Hard to say with so little code, but...

Your first where loop is probably running twice, i.e. resetting
variable back to 100 after the 2nd (internal) where loop has finished
modifying it. Move $variable = 100 above the first where loop and see
what happens.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



Re: [PHP] ASCII

2004-03-05 Thread Christophe Chisogne
csko wrote:
Is there a function to convert a ASCII char to decimal or binary?
See php functions
- ord  chr
- decbin, bindec, dechex, etc
or simply traditionnal C way (printf family)
to format and convert at the same time
(ex get '0A' and not 'a' for char with decimal code 10)
$char= '\n';
echo sprintf(%02X, $char);
Christophe

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


[PHP] php/mysql run on Microsoft Personal Web Server 4.0 ?

2004-03-05 Thread Five
I've been learning php/mysql by uploading my scripts to a php/mysql enabled website.
It's getting to be a drag uploading each script change to check if it works.
I think this can be done but wanted to double check before starting instalation.
Will  Microsoft Personal Web Server 4.0   running on Win98se support php and  mysql?

advance thanks
Dale

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



RE: [PHP] Shopping Carts

2004-03-05 Thread Chris W. Parker
John Nichel mailto:[EMAIL PROTECTED]
on Thursday, March 04, 2004 9:14 PM said:

 osCommerce (http://www.oscommerce.com)- Boss likes this one, but I
 have issues with it's possible security bugs, and the overall design
 (lack of) of the code

i'd like to put another voice in the just-say-no-to-oscommerce
movement..

it's probably a good cart for someone that doesn't plan to modify it
at all... i spent about a week with it and then decided it was best if i
rolled my own.


chris.

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



[PHP] Undefine index

2004-03-05 Thread Dominique ANOKRE
I have a form which call a php file when click on the submit button :

form name=form method=post action=recherche.php language=JavaScript 
onSubmit=return TestSaisie()

First this runs correctly when i click on the submit buttom then the file 
recherche.php is executed and the result is displayed.
I modify the design of my pages in order to display result into frames. So i create a 
frameset named recherche.php which contains
two frames rech_haut.php and rech_bas.php.

And when i click on buttom submit in order to display the result i have this notice 
message : 

Undefined index: numcpte in c:\inetpub\wwwroot\rech_haut.php on line 66

For information, i have not this error when the file recherche.php is a simple file 
without frames !!!

Please help!!


RE: [PHP] scope problem

2004-03-05 Thread Larry Brown
Thanks for the help, but it turned out to be the nut on top of the keyboard!
Something I missed.  Good to know my concept of scope with php is still
healthy (at least).

Thanks

-Original Message-
From: Richard Davey [mailto:[EMAIL PROTECTED]
Sent: Friday, March 05, 2004 11:17 AM
To: PHP List
Subject: Re: [PHP] scope problem


Hello Larry,

Friday, March 5, 2004, 4:01:39 PM, you wrote:

LB This gives values something to the tune of...

LB 200
LB 400
LB 700

LB 100

Hard to say with so little code, but...

Your first where loop is probably running twice, i.e. resetting
variable back to 100 after the 2nd (internal) where loop has finished
modifying it. Move $variable = 100 above the first where loop and see
what happens.

--
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

--
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] Re: php/mysql run on Microsoft Personal Web Server 4.0 ?

2004-03-05 Thread Five

Five [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
 I've been learning php/mysql by uploading my scripts to a php/mysql enabled website.
 It's getting to be a drag uploading each script change to check if it works.
 I think this can be done but wanted to double check before starting instalation.
 Will  Microsoft Personal Web Server 4.0   running on Win98se support php and  
 mysql?

 advance thanks
 Dale


I can tell you if you install the server, install php using the windows installer, and 
then try to run a php script, nothing happens
:  (

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



RE: [PHP] Re: php/mysql run on Microsoft Personal Web Server 4.0 ?

2004-03-05 Thread Jay Blanchard
[snip]
I can tell you if you install the server, install php using the windows
installer, and then try to run a php script, nothing happens
[/snip]

You cannot do it with the Personal Web Server. Might I recommend that
you download Apache for Windows? Then you can use PHP all day long.

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



[PHP] Returning only a row count of 1?

2004-03-05 Thread Alex Hogan
I have 6 records in this table but using this code;

 

$querytotalcount = SELECT COUNT(*)

  FROM CF_Survey;

$resulttotalcount = mssql_query($querytotalcount) or die(Can not execute
query $insert_query. );

$totalrows = mssql_num_rows($resulttotalcount);

 

I only return a count of 1.

 

Am I missing something?  I checked the manual and archives and have come up
empty.

 

 

alex hogan

 



** 
The contents of this e-mail and any files transmitted with it are 
confidential and intended solely for the use of the individual or 
entity to whom it is addressed.  The views stated herein do not 
necessarily represent the view of the company.  If you are not the 
intended recipient of this e-mail you may not copy, forward, 
disclose, or otherwise use it or any part of it in any form 
whatsoever.  If you have received this e-mail in error please 
e-mail the sender. 
** 




Re: [PHP] Returning only a row count of 1?

2004-03-05 Thread Jason Wong
On Saturday 06 March 2004 03:40, Alex Hogan wrote:
 I have 6 records in this table but using this code;

 $querytotalcount = SELECT COUNT(*)

   FROM CF_Survey;

 $resulttotalcount = mssql_query($querytotalcount) or die(Can not execute
 query $insert_query. );

 $totalrows = mssql_num_rows($resulttotalcount);

 I only return a count of 1.

Right, and what does that single row *contain* ?

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Harp not on that string.
-- William Shakespeare, Henry VI
*/


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



Re: [PHP] Returning only a row count of 1?

2004-03-05 Thread Richard Davey
Hello Alex,

Friday, March 5, 2004, 7:40:08 PM, you wrote:

AH I have 6 records in this table but using this code;

AH $querytotalcount = SELECT COUNT(*)
AH   FROM CF_Survey;

AH $totalrows = mssql_num_rows($resulttotalcount);

AH I only return a count of 1.

It will only return 1 row because that's all you've asked it to return
- a count of the number of records.

This is for MySQL but you'll get the idea:

$sql = SELECT COUNT(*) AS hits FROM CF_Survey;
$hits = mysql_result($result, 0, hits);

Run your query directly in MSSQL and you'll see what gets returned.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



Re: Re[4]: [PHP] 28th of March - PHP Problems!

2004-03-05 Thread Shaun
Richard Davey [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hello Jason,

 Friday, March 5, 2004, 12:27:46 PM, you wrote:

 JW I get the correct output (ie Sun Mar 28 2004). But quoting your
previous post,
 JW how did you get: Sat Mar 27 2004 for me, which is exactly what it
should?

 Because I over-looked that part :) but more importantly, upon
 reflection, it has still done what I would have expected because it's
 a BST date and PHP hasn't been told about it, so it's left to its own
 devices.

 If it's unknown, PHP tries to figure it out itself. This can cause
 unexpected (but not incorrect) results.

 echo date(D M d Y, gmmktime(0, 0, 0, 3, 28, 2004, 1));

 Will give me Sun Mar 28 2004, because its a GMT date falling into BST.

 -- 
 Best regards,
  Richard Davey
  http://www.phpcommunity.org/wiki/296.html

Thanks for your replies,

Heres some interesting info:

http://bugs.php.net/bug.php?id=26111

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



RE: [PHP] Returning only a row count of 1?

2004-03-05 Thread Alex Hogan

Dohhh,

Forget I asked



alex hogan


 -Original Message-
 From: Jason Wong [mailto:[EMAIL PROTECTED]
 Sent: Friday, March 05, 2004 1:43 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Returning only a row count of 1?
 
 On Saturday 06 March 2004 03:40, Alex Hogan wrote:
  I have 6 records in this table but using this code;
 
  $querytotalcount = SELECT COUNT(*)
 
FROM CF_Survey;
 
  $resulttotalcount = mssql_query($querytotalcount) or die(Can not
 execute
  query $insert_query. );
 
  $totalrows = mssql_num_rows($resulttotalcount);
 
  I only return a count of 1.
 
 Right, and what does that single row *contain* ?
 
 --
 Jason Wong - Gremlins Associates - www.gremlins.biz
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *
 --
 Search the list archives before you post
 http://marc.theaimsgroup.com/?l=php-general
 --
 /*
 Harp not on that string.
   -- William Shakespeare, Henry VI
 */
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


** 
The contents of this e-mail and any files transmitted with it are 
confidential and intended solely for the use of the individual or 
entity to whom it is addressed.  The views stated herein do not 
necessarily represent the view of the company.  If you are not the 
intended recipient of this e-mail you may not copy, forward, 
disclose, or otherwise use it or any part of it in any form 
whatsoever.  If you have received this e-mail in error please 
e-mail the sender. 
** 




RE: [PHP] Returning only a row count of 1?

2004-03-05 Thread Alex Hogan

Yep..., it's Friday brain has left the building



alex hogan


 -Original Message-
 From: Richard Davey [mailto:[EMAIL PROTECTED]
 Sent: Friday, March 05, 2004 1:46 PM
 To: PHP General list
 Subject: Re: [PHP] Returning only a row count of 1?
 
 Hello Alex,
 
 Friday, March 5, 2004, 7:40:08 PM, you wrote:
 
 AH I have 6 records in this table but using this code;
 
 AH $querytotalcount = SELECT COUNT(*)
 AH   FROM CF_Survey;
 
 AH $totalrows = mssql_num_rows($resulttotalcount);
 
 AH I only return a count of 1.
 
 It will only return 1 row because that's all you've asked it to return
 - a count of the number of records.
 
 This is for MySQL but you'll get the idea:
 
 $sql = SELECT COUNT(*) AS hits FROM CF_Survey;
 $hits = mysql_result($result, 0, hits);
 
 Run your query directly in MSSQL and you'll see what gets returned.
 
 --
 Best regards,
  Richard Davey
  http://www.phpcommunity.org/wiki/296.html
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


** 
The contents of this e-mail and any files transmitted with it are 
confidential and intended solely for the use of the individual or 
entity to whom it is addressed.  The views stated herein do not 
necessarily represent the view of the company.  If you are not the 
intended recipient of this e-mail you may not copy, forward, 
disclose, or otherwise use it or any part of it in any form 
whatsoever.  If you have received this e-mail in error please 
e-mail the sender. 
** 




[PHP] UK Bank Holidays

2004-03-05 Thread Shaun
Hi,

Can PHP recognise dates that are UK Bank Holidays?

Thanks for your help

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



RE: [PHP] UK Bank Holidays

2004-03-05 Thread Jay Blanchard
[snip]
Can PHP recognise dates that are UK Bank Holidays?
[/snip]

Yes http://catb.org/~esr/faqs/smart-questions.html

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



[PHP] re-creating a variable name

2004-03-05 Thread Cory Berry
Hello, I'm having difficulty dynamically creating a variable name for
mysql_query.
I've tried using variable variables. I tried to re-create the sql string by
$a = update table set startdate='$startdate
$a .= $i . ' where id=$i);
but that didn't work.
I'm dynamically creating each name of the input tag.

My input tag is:  name=startdate?echo id ?

but when I use

$query = mysql_query(select * from table);
$num_rows = mysql_num_rows($query);
for($i=1;$i=$num_rows;$i++){
$updatesql = mysql_query(update table set startdate='$startdate.=$i' where
id=$i);
}

It doesn't execute.
Can someone tell me what I'm doing wrong. Any help would be greatly
appreciated.

Thanks
Cory

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



[PHP] undefined index -------- please help !!!!!!!!

2004-03-05 Thread Dominique ANOKRE
I have a form which call a php file when click on the submit button :

form name=form method=post action=recherche.php language=JavaScript 
onSubmit=return TestSaisie()

First this runs correctly when i click on the submit buttom then the file 
recherche.php is executed and the result is displayed.
I modify the design of my pages in order to display result into frames. So i create a 
frameset named recherche.php which contains
two frames rech_haut.php and rech_bas.php.

And when i click on buttom submit in order to display the result i have this notice 
message : 

Undefined index: numcpte in c:\inetpub\wwwroot\rech_haut.php on line 66

For information, i have not this error when the file recherche.php is a simple file 
without frames !!!

Please help!!



RE: [PHP] undefined index -------- please help !!!!!!!!

2004-03-05 Thread Chris W. Parker
Dominique ANOKRE mailto:[EMAIL PROTECTED]
on Friday, March 05, 2004 12:19 PM said:

 Undefined index: numcpte in c:\inetpub\wwwroot\rech_haut.php on line
 66 
 
 For information, i have not this error when the file recherche.php is
 a simple file without frames !!! 
 
 Please help!!

what is on line 66!?!?

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



RE: [PHP] re-creating a variable name

2004-03-05 Thread Chris W. Parker
Cory Berry mailto:[EMAIL PROTECTED]
on Friday, March 05, 2004 11:29 AM said:

 Hello, I'm having difficulty dynamically creating a variable name for
 mysql_query.

[snip]

 It doesn't execute.
 Can someone tell me what I'm doing wrong. Any help would be greatly
 appreciated.

?? i have no idea what you are saying. care to reword your post?


chris.

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



[PHP] Framework in PHP?

2004-03-05 Thread Rodolfo Gonzalez Gonzalez
Hello,

which free (as in beer) framework writen in PHP (OO) would you consider
the best for developing large web applications?. I was looking at Seagull
(http://seagull.phpkitchen.com/)... I would appreciate your comments on
this and other frameworks.

Thank you,
Rodolfo.

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



Re: [PHP] re-creating a variable name

2004-03-05 Thread Cory Berry
I could try and explain my problem again but it would be easier if I just
include the code.

?
if (isset($edit)) {

$select = mysql_query(SELECT * from table);
$num_rows = mysql_num_rows($select);

for($i=1;$i=$num_rows;$i++){
$query = Update table SET StartDate='$FormStartDate.=$i ' where id=$i;
$result = mysql_query($query) or die (cannot update);
 }
} else {
?
form method=post name=edit server action=? echo $PHP_SELF ?
?
$query = mysql_query(SELECT * from table);
while ($row = mysql_fetch_array($query)) {
 $id = $row[id];
 $StartDate = $row[StartDate];
?
input type=text name=FormStartDate? echo $id ? size=15 value=? echo
$StartDate ?
?}?
input type=submit name=edit value=Update Date/form


Because $FormStartDate1 is the name of the variable, I'm trying to recreate
the name of the variable with the for loop after edit is submitted.

Thanks again.
Cory



Chris W. Parker [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Cory Berry mailto:[EMAIL PROTECTED]
on Friday, March 05, 2004 11:29 AM said:

 Hello, I'm having difficulty dynamically creating a variable name for
 mysql_query.

[snip]

 It doesn't execute.
 Can someone tell me what I'm doing wrong. Any help would be greatly
 appreciated.

?? i have no idea what you are saying. care to reword your post?


chris.

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



RE: [PHP] re-creating a variable name

2004-03-05 Thread Jason Davidson
my thoughts exactly...

seems odd that your are updating a single table multiple times like
that.  

Jason

Chris W. Parker [EMAIL PROTECTED] wrote:
 
 Cory Berry mailto:[EMAIL PROTECTED]
 on Friday, March 05, 2004 11:29 AM said:
 
  Hello, I'm having difficulty dynamically creating a variable name for
  mysql_query.
 
 [snip]
 
  It doesn't execute.
  Can someone tell me what I'm doing wrong. Any help would be greatly
  appreciated.
 
 ?? i have no idea what you are saying. care to reword your post?
 
 
 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] re-creating a variable name

2004-03-05 Thread Jason Wong
On Saturday 06 March 2004 03:29, Cory Berry wrote:
 Hello, I'm having difficulty dynamically creating a variable name for
 mysql_query.
 I've tried using variable variables. I tried to re-create the sql string by
 $a = update table set startdate='$startdate
 $a .= $i . ' where id=$i);
 but that didn't work.

HOW did it not work?

Did you print out $a to see that it contained what you thought it should 
contain? You would've probably found that you had an extra space somewhere.

 I'm dynamically creating each name of the input tag.

 My input tag is:  name=startdate?echo id ?

 but when I use

 $query = mysql_query(select * from table);
 $num_rows = mysql_num_rows($query);
 for($i=1;$i=$num_rows;$i++){
 $updatesql = mysql_query(update table set startdate='$startdate.=$i' where
 id=$i);
 }

 It doesn't execute.

mysql_error() would tell why a mysql_query() fails. And again printing out the 
query that is being executed will allow you to see whether it is what you 
*think* should be executed.

BTW I think it would be somewhat easier if you used arrays instead.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Most people don't need a great deal of love nearly so much as they need
a steady supply.
*/


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



[PHP] odd, sporatic upload problem ...

2004-03-05 Thread Kenn Murrah
Greetings.

I have an odd (to me) problem  ... from most computers, the upload code 
(shown, in part, below) works just fine  but from at least one 
computer, if the user uploads a small file (under 1meg), it works 
properly . but if he uploads a larger file he gets either a page not 
found (Internet Explorer) or no data (Netscape) error  other 
users can upload files of any size, with no problem 

Does anyone have any ideas? 

The code (though I'm not at all sure it's relevent) is below:

$customer_trimmed = eregi_replace([^[:alnum:]\.],,$customer) ;
$customer_shortened = substr($customer_trimmed,0,18);
$customer_trimmed = $customer_shortened;
$folder_name = $customer_trimmed . date(mdyHis);
$old_umask = umask();
mkdir('/home/upco/uploads/' . $folder_name, 0777);
//umask($old_umask);
$dest_dir = '/home/upco/uploads/' . $folder_name;

error_reporting(0);

$summary_info = You have successfully uploaded the following 
file(s):br ;
for ($i=0; $icount($_FILES['userFile']['name']); $i++)
{
$new_name = $_FILES['userFile']['name'][$i];
$parsed_name = eregi_replace([^[:alnum:]\.],,$new_name) ;
$dest = $dest_dir . '/' . $parsed_name;
if (!file_exists ($dest)) {
copy($_FILES['userFile']['tmp_name'][$i], $dest) ; 
$changepermissions = chmod($dest, 0777);

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


RE: [PHP] re-creating a variable name

2004-03-05 Thread Chris W. Parker
Cory Berry mailto:[EMAIL PROTECTED]
on Friday, March 05, 2004 12:45 PM said:

 $query = Update table SET StartDate='$FormStartDate.=$i ' where
 id=$i;

that doesn't really make sense.

using the following values:

$FormStartDate = x;
$i = y;

the output would be:

UPDATE table SET StartDate='x.=y ' WHERE id=y

what am i missing here???

 Because $FormStartDate1 is the name of the variable, I'm trying to
 recreate the name of the variable with the for loop after edit is
 submitted. 

i don't understand what you mean by recreate the name of the variable.




chris.

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



RE: [PHP] odd, sporatic upload problem ...

2004-03-05 Thread Sam Masiello

How long is it before the Page Not Found error occurs?  Is the browser
possibly timing out?

--Sam


Kenn Murrah wrote:
 Greetings.
 
 I have an odd (to me) problem  ... from most computers, the upload
 code (shown, in part, below) works just fine  but from at least
 one 
 computer, if the user uploads a small file (under 1meg), it works
 properly . but if he uploads a larger file he gets either a page not
 found (Internet Explorer) or no data (Netscape) error  other
 users can upload files of any size, with no problem 
 
 Does anyone have any ideas?
 
 The code (though I'm not at all sure it's relevent) is below:
 
 $customer_trimmed = eregi_replace([^[:alnum:]\.],,$customer) ;
 $customer_shortened = substr($customer_trimmed,0,18);
 $customer_trimmed = $customer_shortened; $folder_name =
 $customer_trimmed . date(mdyHis);   
 
 $old_umask = umask();
 mkdir('/home/upco/uploads/' . $folder_name, 0777);
 //umask($old_umask); 
 
 $dest_dir = '/home/upco/uploads/' . $folder_name;
 
 error_reporting(0);
 
 $summary_info = You have successfully uploaded the following
 file(s):br ;
 for ($i=0; $icount($_FILES['userFile']['name']); $i++)
 {
 $new_name = $_FILES['userFile']['name'][$i];
 $parsed_name = eregi_replace([^[:alnum:]\.],,$new_name) ; $dest =
 $dest_dir . '/' . $parsed_name; if (!file_exists ($dest)) {
 copy($_FILES['userFile']['tmp_name'][$i], $dest) ; $changepermissions
 = chmod($dest, 0777);  

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



Re: [PHP] odd, sporatic upload problem ...

2004-03-05 Thread Kenn Murrah
No, it happens immediately upon clicking the submit button on the 
previous page 

Sam Masiello wrote:

How long is it before the Page Not Found error occurs?  Is the browser
possibly timing out?
--Sam

Kenn Murrah wrote:
 

Greetings.

I have an odd (to me) problem  ... from most computers, the upload
code (shown, in part, below) works just fine  but from at least
one 
computer, if the user uploads a small file (under 1meg), it works
properly . but if he uploads a larger file he gets either a page not
found (Internet Explorer) or no data (Netscape) error  other
users can upload files of any size, with no problem 

Does anyone have any ideas?

The code (though I'm not at all sure it's relevent) is below:

$customer_trimmed = eregi_replace([^[:alnum:]\.],,$customer) ;
$customer_shortened = substr($customer_trimmed,0,18);
$customer_trimmed = $customer_shortened; $folder_name =
$customer_trimmed . date(mdyHis);   

$old_umask = umask();
mkdir('/home/upco/uploads/' . $folder_name, 0777);
//umask($old_umask); 

$dest_dir = '/home/upco/uploads/' . $folder_name;

error_reporting(0);

$summary_info = You have successfully uploaded the following
file(s):br ;
for ($i=0; $icount($_FILES['userFile']['name']); $i++)
{
$new_name = $_FILES['userFile']['name'][$i];
$parsed_name = eregi_replace([^[:alnum:]\.],,$new_name) ; $dest =
$dest_dir . '/' . $parsed_name; if (!file_exists ($dest)) {
copy($_FILES['userFile']['tmp_name'][$i], $dest) ; $changepermissions
= chmod($dest, 0777);  
   

 



[PHP] safest way to write a file to web server space?

2004-03-05 Thread Jim Byrne
Hi,

Sorry this is a long(ish) post - I'm hoping you can bear with me - while I
explain what I trying to do in relation to my CMS. :-)

I have created a content management system based around PHP and MySQL. I
want to have conventional looking directory paths for my web pages - and
would like to do it in the following way:

I have a small file that contains a content id number and some includes to
provide functonality, header and footer stuff, e.g.

include configuration and functionality code
include header code
$contentid=243;
include footer code

(That of course is not real code - it is just to give you an idea of what
I'm talking about.)

When a person adds a new page they choose the section they want to add their
page to (via pull done menu) - they add their content and click submit to
create a new page.

The categories they add their page to using the form, are represented by
real directories on the server. My ideas is that - after the user submits
their new content - I copy the file with the example code above into the
appropriate directory, change the file name to something appropriate (and
safe), and change the content id to reflect the new record created in the
database. That way I have a real file, a real filepath (that means something
to users), and content that can be pulled from the database.

Regardless of the fact that there are a million other ways of creating a
CMS; assuming I'm doing it this way - what would be the safest way to copy
the file into a web directory? Would it be a good idea to make the owner and
group for the directories on the server the same as the apache owner (which
is what PHP runs as)? If I did this the permissions would be let me write
the file to disk - but I'm not sure how secure it would be?

Your thoughts would be appreciated.

All the best,
Jim
p.s. I can't use .htaccess to fancy stuff with apache - because there is a
problem with .htaccess on the server which I have tried and failed to fix -
or get anyone else to fix - so that is not an option. It is not an issue I
want to revisit, I've spent too long trying to fix it.

-- 
My new free eBook: 'Accessible Web Typography - an introduction for web
designers' at http://www.scotconnect.com/webtypography/


Pat's Guide to Glasgow West End: http://www.glasgowwestend.co.uk
Flathunting: http://www.glasgowwestend.co.uk/flathunting/

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



RE: [PHP] odd, sporatic upload problem ...

2004-03-05 Thread Sam Masiello
 
You're sure that the computer in question doesn't possibly have a
previous version of the page cached?  Any sort of proxy server setup in
that browser that isn't on the others?
 
Sorry for the mundane questions...just trying to cover some of the
obvious points...
 
--Sam
 
 

-Original Message-
From: Kenn Murrah [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 05, 2004 2:58 PM
To: Sam Masiello
Cc: php
Subject: Re: [PHP] odd, sporatic upload problem ...


No, it happens immediately upon clicking the submit button on
the previous page 


Sam Masiello wrote:


How long is it before the Page Not Found error occurs?
Is the browser
possibly timing out?

--Sam


Kenn Murrah wrote:
  

Greetings.

I have an odd (to me) problem  ... from most
computers, the upload
code (shown, in part, below) works just fine
 but from at least
one 
computer, if the user uploads a small file
(under 1meg), it works
properly . but if he uploads a larger file he
gets either a page not
found (Internet Explorer) or no data
(Netscape) error  other
users can upload files of any size, with no
problem 

Does anyone have any ideas?

The code (though I'm not at all sure it's
relevent) is below:

$customer_trimmed =
eregi_replace([^[:alnum:]\.],,$customer) ;
$customer_shortened =
substr($customer_trimmed,0,18);
$customer_trimmed = $customer_shortened;
$folder_name =
$customer_trimmed . date(mdyHis);   

$old_umask = umask();
mkdir('/home/upco/uploads/' . $folder_name,
0777);
//umask($old_umask); 

$dest_dir = '/home/upco/uploads/' .
$folder_name;

error_reporting(0);

$summary_info = You have successfully uploaded
the following
file(s):br ;
for ($i=0;
$icount($_FILES['userFile']['name']); $i++)
{
$new_name = $_FILES['userFile']['name'][$i];
$parsed_name =
eregi_replace([^[:alnum:]\.],,$new_name) ; $dest =
$dest_dir . '/' . $parsed_name; if (!file_exists
($dest)) {
copy($_FILES['userFile']['tmp_name'][$i], $dest)
; $changepermissions
= chmod($dest, 0777);  



  



[PHP] php/mssql character limit?

2004-03-05 Thread Ben Ramsey
Anyone know of any kind of character limit in php or mssql (yes, 
Microsoft SQL Server) for entering long text into a text column (of 
around 4,055 characters in length--that's where it's cutting off)?

--
Regards,
 Ben Ramsey
 http://benramsey.com
 http://www.phpcommunity.org/wiki/People/BenRamsey
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] safest way to write a file to web server space?

2004-03-05 Thread Michal Migurski
Regardless of the fact that there are a million other ways of creating a
CMS; assuming I'm doing it this way - what would be the safest way to
copy the file into a web directory?

Does the file need to be created at the moment it's asked for, or can
there be a lag? You could use cron to poll some neutral location (say, a
list of requested values in a file in /tmp) and create the
directories/files as whatever user you choose.

-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html

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



[PHP] Re: PHP || MySql Directory Tree Problem......

2004-03-05 Thread CF High
Hey all.

I've developed a site builder application that allows my clients to build/maintain 
their sites without my having to deal with tedious web design tasks.

The current version has some problems, however.

To resolve these issues I've switched over to an MVC (Model-View-Controller) 
structured site.

Great results so far except for one problem: the site directory structure.

Currently I have all page ids  titles stored in my site_tree table.

The site_tree table has the following structure:

prime_id (int auto_increment)
parent_id (int)
layout (int)
secure (int)
pop_menu (char 1)
title (var char 200) 

Here's some example to data to clarify the purpose of this table:

  prime_id parent_id layout secure pop_menu title 
  2  0  2  0  Y  Resources  
  3  0  1  0  Y  Memberships  
  4  2 3  0  N  Children and Youth 
  5  0  3  0  N  Events  
  6  2 1  0  N Adult Education 


Rows 3  5; i.e. Children and Youth  Adult Education, correspond to the parent 
category, Resources, whose prime_id is 2.

So, each child category's parent_id is the prime_id of the parent category and each 
child can be a parent to many children.

One use of this structure is to auto build the javascript popup menu for the site 
navigation (the pop_menu flag is used for this purpose).

The problem I'm having is retrieving data from, for example, the products table:

  prime_id page_id copy product_type 
  1 4  Test 1  
  2 6 Test1 1  


The products table page_id equals the prime_id of the site_tree table.  

When I query for product data based on the product category; i.e. Resources, which has 
a prime_id of 2, there is no matching record in the products table (since the products 
table only contains specific items, not category data).

So, what can I do to join the site_tree table with the products table and other 
similarly structured tables?

Please email for further details -- there's likely stuff I'm leaving out.

TIA for ny clues re: site tree models.

--Noah
 



-- 
 


[PHP] [Newbie Guide] For the benefit of new members

2004-03-05 Thread Ma Siva Kumar
===
This message is for the benefit of new 
subscribers and those new to PHP.  Please 
feel free to add more points and send to the 
list.
===
1. If you have any queries/problems about PHP 
try http://www.php.net/manual/en first. You 
can download a copy and use it offline also. 

Please also try 
http://www.php.net/manual/faq.php 
for answers to frequently answered questions 
about PHP (added by Christophe Chisogne).

2. Try http://www.google.com next. Searching 
for php YOUR QUERY may fetch you relevant 
information within the first 10 results.

3. There is a searchable archive of the 
mailing list discussion at 
http://phparch.com/mailinglists. Many of the 
common topics are discussed repeatedly, and 
you may get answer to your query from the 
earlier discussions. 

For example: One of the repeatedly discussed 
question in the list is Best PHP editor. 
Everyone has his/her favourite editor. 
You can get all the opinions by going through 
the list archives. If you want a chosen list 
try this link : 
http://phpeditors.linuxbackup.co.uk/ 
(contributed by Christophe Chisogne).

4. Not sure if PHP is working or you want 
find out what extensions are available to 
you?

Just put the following code into a file with 
a .php extension and access it through your 
webserver:

?php
phpinfo();
? 

If PHP is installed you will see a page with 
a lot of information on it. If PHP is not 
installed (or not working correctly) your 
browser will try to download the file.

(contributed by Teren and reworded by Chris W 
Parker)

5. If you are stuck with a script and do not 
understand what is wrong, instead 
of posting the whole script, try doing some 
research yourself. One useful trick is to 
print the variable/sql query using print or 
echo command and check whether you get what 
you expected. 

After diagnosing the problem, send the 
details of your efforts (following steps 1, 
2  3) and ask for help.

6. PHP is a server side scripting language. 
Whatever processing PHP does takes 
place BEFORE the output reaches the client. 
Therefore, it is not possible to access 
users'  computer related information (OS, 
screen size etc) using PHP. Nor can you 
modify any the user side settings. You need 
to go for JavaScript and ask the question in 
a JavaScript list.

On the other hand, you can access the 
information that is SENT by the user's 
browser when a client requests a page from 
your server. You can find details about 
browser, OS etc as reported by 
this request. - contributed by Wouter van 
Vliet and reworded by Chris W Parker.

7. Provide a clear descriptive subject line. 
Avoid general subjects like Help!!, A 
Question etc.  Especially avoid blank 
subjects. 

8. When you want to start a new topic, open a 
new mail composer and enter the mailing list 
address [EMAIL PROTECTED] instead of 
replying to an existing thread and replacing 
the subject and body with your message.

9. It's always a good idea to post back to 
the list once you've solved your problem. 
People usually add [SOLVED] to the subject 
line of their email when posting solutions. 
By posting your solution you're helping the 
next person with the  same question. 
[contribued by Chris W Parker]

10. Ask smart questions  
http://catb.org/~esr/faqs/smart-questions.html
[contributed by Jay Blanchard)

Hope you have a good time programming with 
PHP.

Best regards,

-- 
Integrated Management Tools for leather 
industry
--
http://www.leatherlink.net

Ma Siva Kumar,
BSG LeatherLink (P) Ltd,
Chennai - 600106

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



[PHP] UK Bank Holidays 2

2004-03-05 Thread Shaun
Hi,

How can PHP recognise dates that are UK Bank Holidays?

Thanks for your help

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



Re: [PHP] UK Bank Holidays 2

2004-03-05 Thread Ryan A
WTF? isnt this the second time today this has appeared on the list?

Dude, other than the people in the UK nobody cares about
UK bank holidays...search google for this query and maybe someone from
there has written something for it..or read the manual a couple of times and
you'll see that the bottom question is a real dumb one.

Cheers,
-Ryan

 Hi,

 How can PHP recognise dates that are UK Bank Holidays?

 Thanks for your help

 --
 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] FIle Upload problems

2004-03-05 Thread Brian V Bonini
The form:

form  enctype=multipart/form-data action=?php echo
$_SERVER['PHP_SELF'] ? method=POST
input type=hidden name=MAX_FILE_SIZE value=1
fieldset
legendAdd Rider/legend
label for=rider_nameName:/label
input type=text name=rider_name id=rider_name size=30
maxlength=30 /br /
label for=rider_license_catLic. Cat.:/label
input type=text name=rider_license_cat id=rider_license_cat
size=2 maxlength=1 /br /
label for=commentsComments:/label
input type=text name=comments id=comments size=30
maxlength=30 /br /
label for=image_uploadUpload Image:/label
input name=image_upload id=image_upload type=file /br /
pinput type=submit name=action value=Add Rider/p
/fieldset
/form

The code:

if (is_uploaded_file($_FILES['image_upload']['tmp_name'])) {
move_uploaded_file($_FILES['image_upload']['tmp_name'],
$upload_file_path);
echo success;
} else {
echo Possible file upload attack. Filename:  .
$_FILES['image_upload']['name'] . br /\n;
switch($_FILES['HTTP_POST_FILES']['userfile']['error']){
case 0: //no error; possible file attack!
echo There was a problem with your upload.br
/\n;
break;
case 1: //uploaded file exceeds the upload_max_filesize
directive in php.ini
echo The file you are trying to upload is too
big.br /\n;
break;
case 2: //uploaded file exceeds the MAX_FILE_SIZE
directive that was specified in the html form
echo The file you are trying to upload is too
big.br /\n;
break;
case 3: //uploaded file was only partially uploaded
echo The file you are trying upload was only
partially uploaded.br /\n;
break;
case 4: //no file was uploaded
echo You must select an image for upload.br /\n;
break;
default: //a default error, just in case!  :)
echo There was a problem with your upload.br
/\n;
break;
}
}
}

No matter what I try this keeps falling through to the default switch.


-- 
Brian V Bonini [EMAIL PROTECTED]

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



Re: [PHP] UK Bank Holidays 2

2004-03-05 Thread Tom Rogers
Hi,

Saturday, March 6, 2004, 10:39:13 AM, you wrote:
S Hi,

S How can PHP recognise dates that are UK Bank Holidays?

S Thanks for your help


Well first question is:
What are the rules for a bank holiday in the UK
is it  the first monday of a month, after christmas day , new year
etc..

If there is such a rule PHP can usually dig it out. If they are
decided by committee then you are on your own :)

-- 
regards,
Tom

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



Re[2]: [PHP] UK Bank Holidays 2

2004-03-05 Thread Tom Rogers
Hi,

Saturday, March 6, 2004, 12:03:15 PM, you wrote:
TR Hi,

TR Saturday, March 6, 2004, 10:39:13 AM, you wrote:
S Hi,

S How can PHP recognise dates that are UK Bank Holidays?

S Thanks for your help


TR Well first question is:
TR What are the rules for a bank holiday in the UK
TR is it  the first monday of a month, after christmas day , new year
TR etc..

TR If there is such a rule PHP can usually dig it out. If they are
TR decided by committee then you are on your own :)

TR -- 
TR regards,
TR Tom


This may help you

http://www.dti.gov.uk/er/bankhol.htm

Probably the best way to tackle this is to store the info in a table
as it looks like it is decided by rules, committee and the Queen

-- 
regards,
Tom

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



[PHP] Re: FIle Upload problems

2004-03-05 Thread Andre Cerqueira
try echo'ing $_FILES['image_upload']['tmp_name'], and check if the path 
exists

maybe some wrong configuration on php.ini
upload_tmp_dir ?
it is usually a good idea trying to isolate the smallest piece of code 
that gives the unwanted result
makes it easier for other ppl to help, and sometimes you find out the 
bug, by yourself, on the way



Brian V Bonini wrote:
The form:

form  enctype=multipart/form-data action=?php echo
$_SERVER['PHP_SELF'] ? method=POST
input type=hidden name=MAX_FILE_SIZE value=1
fieldset
legendAdd Rider/legend
label for=rider_nameName:/label
input type=text name=rider_name id=rider_name size=30
maxlength=30 /br /
label for=rider_license_catLic. Cat.:/label
input type=text name=rider_license_cat id=rider_license_cat
size=2 maxlength=1 /br /
label for=commentsComments:/label
input type=text name=comments id=comments size=30
maxlength=30 /br /
label for=image_uploadUpload Image:/label
input name=image_upload id=image_upload type=file /br /
pinput type=submit name=action value=Add Rider/p
/fieldset
/form
The code:

if (is_uploaded_file($_FILES['image_upload']['tmp_name'])) {
move_uploaded_file($_FILES['image_upload']['tmp_name'],
$upload_file_path);
echo success;
} else {
echo Possible file upload attack. Filename:  .
$_FILES['image_upload']['name'] . br /\n;
switch($_FILES['HTTP_POST_FILES']['userfile']['error']){
case 0: //no error; possible file attack!
echo There was a problem with your upload.br
/\n;
break;
case 1: //uploaded file exceeds the upload_max_filesize
directive in php.ini
echo The file you are trying to upload is too
big.br /\n;
break;
case 2: //uploaded file exceeds the MAX_FILE_SIZE
directive that was specified in the html form
echo The file you are trying to upload is too
big.br /\n;
break;
case 3: //uploaded file was only partially uploaded
echo The file you are trying upload was only
partially uploaded.br /\n;
break;
case 4: //no file was uploaded
echo You must select an image for upload.br /\n;
break;
default: //a default error, just in case!  :)
echo There was a problem with your upload.br
/\n;
break;
}
}
}
No matter what I try this keeps falling through to the default switch.


--
André Cerqueira


signature.asc
Description: OpenPGP digital signature


Re: [PHP] Re: FIle Upload problems

2004-03-05 Thread Brian V Bonini
On Fri, 2004-03-05 at 21:33, Andre Cerqueira wrote:
 try echo'ing $_FILES['image_upload']['tmp_name'], and check if the path 
 exists

Gives me nothing, hmmm...

 
 maybe some wrong configuration on php.ini
 upload_tmp_dir ?

%more php.ini  ls -l / | grep tmp
register_globals = On
upload_tmp_dir = /tmp
file_uploads = 1 
 
drwxrwxrwt  29 root  wheel1536 Mar  5 21:39 tmp

In the form if I trim off the local /PATH/to/file/ it returns successful
and created a 0 byte file where it should. Obviously not what ultimately
needs to happen but Am I supposed have to translate the local path
first of something?

-- 
Brian V Bonini [EMAIL PROTECTED]

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



Re: [PHP] Re: FIle Upload problems

2004-03-05 Thread Jason Wong
On Saturday 06 March 2004 10:42, Brian V Bonini wrote:
 On Fri, 2004-03-05 at 21:33, Andre Cerqueira wrote:
  try echo'ing $_FILES['image_upload']['tmp_name'], and check if the path
  exists

 Gives me nothing, hmmm...

If you had enable error reporting and checked what errors were reported you 
would probably have solved your problem already.

 In the form if I trim off the local /PATH/to/file/ it returns successful
 and created a 0 byte file where it should. Obviously not what ultimately
 needs to happen but Am I supposed have to translate the local path
 first of something?

I don't see anywhere in your form where you have /PATH/to/file/, what are 
you referring to?

Also the following is obviously incorrect ...

  switch($_FILES['HTTP_POST_FILES']['userfile']['error']){

... it should be ...

  switch($_FILES['userfile']['error']){

... and you should have substituted 'userfile' with 'image_upload' as that is 
what you're using in your form.

Do yourself a favour, study the example in the manual, get it working, 
understand how it works, THEN modify it in small incremental steps until it 
does what you want.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Live from New York ... It's Saturday Night!
*/

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



Re: [PHP] UK Bank Holidays 2

2004-03-05 Thread Ben Ramsey
WTF? isnt this the second time today this has appeared on the list?

Dude, other than the people in the UK nobody cares about
UK bank holidays...search google for this query and maybe someone from
there has written something for it..or read the manual a couple of times and
you'll see that the bottom question is a real dumb one.
Ryan:  Well, that's not a very nice way to treat someone on the list, 
even if it was the second time you'd seen the question in the same day 
or even if it was a question that is obviously in the manual.  Some 
people are just at different proficiencies in their learning process and 
don't yet know to go to the manual for certain questions.  If we treated 
every newbie like this, then we wouldn't have people coding in PHP!

Shaun: Consequently, the question was a valid one that the manual could 
not answer, and the short answer is, no.  PHP does not have an 
intrensic way of telling on what dates UK banking holidays fall (mainly 
because not everyone coding PHP lives in the UK).  You will need to 
write your own function for this.  The easiest way would be to just look 
at a calendar for several years in advance and just plug all the dates 
into an array and test the array to see if today's day is in there.  If 
it is, then today is a banking holiday.

Hope that helps.

--
Regards,
 Ben Ramsey
 http://benramsey.com
 http://www.phpcommunity.org/wiki/People/BenRamsey
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: php/mysql run on Microsoft Personal Web Server 4.0 ?

2004-03-05 Thread Five

Five [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
 I've been learning php/mysql by uploading my scripts to a php/mysql enabled website.
 It's getting to be a drag uploading each script change to check if it works.
 I think this can be done but wanted to double check before starting instalation.
 Will  Microsoft Personal Web Server 4.0   running on Win98se support php and  
 mysql?

 advance thanks
 Dale

If anyone is sstill interested, here's an excelent website that walks you through 
downloading, installing and configuring apache,
php, and mysql.

http://internetmaster.com/installtutorial/index.htm

If it can work for my dyslexic eyes, it can work for anyone.

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



Re: [PHP] UK Bank Holidays 2

2004-03-05 Thread Ryan A
 Ryan:  Well, that's
 not a very nice way to treat someone on the list,
 even if it was the second time
 you'd seen the question in the same day
 or even if it was a question that is obviously in the manual.  Some
 people are just at different proficiencies in their learning process and
 don't
 yet know to go to the manual for certain questions.  If we treated
 every newbie like this, then we
 wouldn't have people coding in PHP!

Hi _uncle_ Ben,
I have nothing against newbies or newbie questions even though I may read
questions like which is the
best shopping cart, best PHP IDE etc 3+ times in a month, or why
register_globals are better off or why
this code does not work when its just a semicolon missing...although I
must say the most frequient seems
to be then ones where people write to the list without even trying to do a
single word search on google.
I too was a newbie and compared to some
guys on the list I still most certainly am. But when you write a question
that does not get answered the first
time round...then retry a bit later is just downright irritating. If the guy
wrote some code a bit later on to do
his holiday thing and hit a wall...I and a crapload of people here will be
most willing to lend a hand if he needed
help, theres just gotto be a limit. If the guy thought that the first
message didnt get through then its cool...but by
the 2 in the subject.COME ON for petes sake.
Anyway, you have your view on this so..

Cheers,
-Ryan

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



[PHP] Let's start a php-advanced list!

2004-03-05 Thread Galen
From my earlier post, I've had a number of people email me, on and off 
list, that there isn't much in the way of an advanced php mailing 
list. It also sounds like at least a few people are quite interested in 
the possibility.

Who runs the php official mailing lists? Can we ask them to start a 
php-advanced list? Give it a description like Ready to take you coding 
to the next level? Got questions about high-level PHP code? This is the 
list for you. Redirect people asking questions like What is SQL and 
What's wrong with this code or How do I insert simple task (which 
a search in the manual would have found the function to do this) to the 
php-general list. That would leave our group free to discuss meaty 
things and really get somewhere.

Anybody else interested in this type of list?

-Galen

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


Re: [PHP] Let's start a php-advanced list!

2004-03-05 Thread Rasmus Lerdorf
On Fri, 5 Mar 2004, Galen wrote:

  From my earlier post, I've had a number of people email me, on and off
 list, that there isn't much in the way of an advanced php mailing
 list. It also sounds like at least a few people are quite interested in
 the possibility.

 Who runs the php official mailing lists? Can we ask them to start a
 php-advanced list? Give it a description like Ready to take you coding
 to the next level? Got questions about high-level PHP code? This is the
 list for you. Redirect people asking questions like What is SQL and
 What's wrong with this code or How do I insert simple task (which
 a search in the manual would have found the function to do this) to the
 php-general list. That would leave our group free to discuss meaty
 things and really get somewhere.

 Anybody else interested in this type of list?

This has come up many times before and I really don't think it will work.
Splitting advanced users from beginners means that there will be nobody to
answer the beginner questions which means they will get posted to the
advanced list where the people with the answers are.  It is a
self-defeating separation.  Having everyone in one big lump means that
both camps and all the camps in between learn from each other.

The other question is who decides what is advanced?  Chances are what you
think is advanced may seem trivial to me, or vice-versa.

-Rasmus

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



Re: [PHP] Let's start a php-advanced list!

2004-03-05 Thread Jason Wong
On Saturday 06 March 2004 14:57, Galen wrote:

  From my earlier post, I've had a number of people email me, on and off
 list, that there isn't much in the way of an advanced php mailing
 list. It also sounds like at least a few people are quite interested in
 the possibility.

The only way you can run more than one list on a similar topic is if:

i) You have a clear distinction on what exactly should be discussed on which 
particular list

ii) List members apply rigorous self-policing to (a) refuse to answer 
off-topic posts (b) ask posters of said posts to re-post on the appropriate 
list

Otherwise one of two things will probably happen:

1) The people who are experienced and are most able to question the more 
advanced questions will be sick and tired of answering the FAQs and 
newbie questions and may only subscribe to the advanced list. This means 
the newbie list will be in the hands of newbies and thus newbies will be 
asking and answering newbie questions.

2) The more likely case would be that because it is pretty difficult to draw 
the line between newbie questions and advanced questions there will be 
even more cross-posting. Witness the amount of DB-related, solely 
Windows-related, and installation-related questions that appear on this list. 
That is despite the fact that those issues are covered by their own lists.

 Who runs the php official mailing lists? Can we ask them to start a
 php-advanced list? Give it a description like Ready to take you coding
 to the next level? Got questions about high-level PHP code? This is the
 list for you. Redirect people asking questions like What is SQL and
 What's wrong with this code or How do I insert simple task (which
 a search in the manual would have found the function to do this) to the
 php-general list. That would leave our group free to discuss meaty
 things and really get somewhere.

The crux of the matter is who decides what are meaty, advanced things? IMO 
99% of so called newbie questions are answered in the manual, user comments 
in the manual, FAQs, list archives, and Google. So to run a newbie list one 
would only have to auto-post the above list of resources to the list every 
few minutes, hopefully the newbies will get the idea very quickly and learn 
to solve the simple problems on their own. Then they can subscribe to the 
advanced list for discussions on problems not answered in the above list of 
resources.

 Anybody else interested in this type of list?

It will only work if there is:

(a) a clear definition of advanced topics -- pretty difficult to define
(b) some kind of moderation

So if you can solve those two problems then yeah, maybe.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Plus ,ca change, plus c'est la m^eme chose.
[The more things change, the more they remain the same.]
-- Alphonse Karr, Les Gu^epes
*/

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



[PHP] RE: [PHP-WIN] Sending arguments to a SP in PHP

2004-03-05 Thread Svensson, B.A.T. (HKG)
Very is your problem located?

Is the string not properly built by php?
or is an error genereated when you try to execute the query?


-Original Message-
From: Harpreet K. Singh
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: 2004-03-04 21:55
Subject: [PHP-WIN] Sending arguments to a SP in PHP

I am using PHP and sql server 2000.

I have a stored procedure which takes 3 arguments. The first argument is
a
string and the rest 2 are integers.

For some reasons the call to the stored procedure is being trimmed.

My call is as follows
$oldquery=select var1,var2,var3,var4. from table order by var1;

$query=exec limitselect '. $oldquery .',. $limit .,. $offset;

i try to print the sql command
echo br.$query;

It prints out a trimmed string

exec limitselect 'select origin

is theri a limit to what one can send to a sp call

Please help i am totally confused.

Thanks

-- 
PHP Windows 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