php-general Digest 30 Jul 2004 11:01:51 -0000 Issue 2907

2004-07-30 Thread php-general-digest-help

php-general Digest 30 Jul 2004 11:01:51 - Issue 2907

Topics (messages 192254 through 192282):

Re: Conversion of Field Value to Hyperlink
192254 by: rogerk.queernet.org
192259 by: Curt Zirzow
192261 by: Harlequin
192269 by: John Nichel
192271 by: John Nichel
192272 by: John Nichel
192274 by: Jason Barnett
192275 by: Jason Barnett
192279 by: Jason Wong

Re: Conversion of Field Value to Hyperlink OT
192255 by: Jay Blanchard

Re: Variable functions within an object
192256 by: Curt Zirzow
192258 by: Jason Davidson

Re: Searching and removing
192257 by: Jonathan Lassoff
192260 by: Justin Patrin
192262 by: Jonathan Lassoff
192263 by: Justin Patrin
192264 by: Justin Patrin
192265 by: Matt M.

How to nest information from different tables.
192266 by: Karl-Heinz Schulz
192268 by: zareef ahmed

Re: Server's clock gone funny, maybe?
192267 by: David Robley

Re: A native Windows binding for PHP
192270 by: Manuel Lemos
192273 by: Travis Low

Re: Browser reload problem
192276 by: Jason Barnett

Re: reading txt file - certain lines
192277 by: Rory McKinley

Splitting a string by the number of characters in the string?
192278 by: Brent Clements
192280 by: Justin Patrin
192281 by: Jason Wong

Sending mail() using 5.0.0
192282 by: Michael Purdy

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--
---BeginMessage---
Quoting John Holmes [EMAIL PROTECTED]:

 Why not simply 'Read The Fine Manual', or 'Read The Fantastic
   Manual'?  Why does it have to contain profanity?
 
  For all practical purposes:
 
RTFM == read the manual
 
  If someone finds it offensive then they're either delusional or paranoid or
  more likely both!

 If I'm offended by the word wong what do that make me?

Wong-headed?!
---End Message---
---BeginMessage---
* Thus wrote John Nichel:
 Harlequin wrote:
 RTFM...?
 
 
 AKA : Read The F**king Manual

I thought the proper response was suppose to be: STFW :)
 

Curt
-- 
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about.  No, sir.  Our model is the trapezoid!
---End Message---
---BeginMessage---
Mmmm...

Interesting Jay.

Maybe I'll just WTFM mate :)


-- 
-
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-
Jay Blanchard [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
[snip]
I have a table generated by some code that returns certain field values
and
drops them into a table. On of these values is ID and I'd like to
convert it
to a hyperlink that people can use to go to another page to view further
information about a record. However:

The fields are not individually identified as I use a for statement and
I
think I might need to redesign the table but don't know where to start.

Can anyone provide any pointers please...?
[/snip]

RTFM.

If I need a hyperlink I have to code it even in a loopi.e.

?php
while($remi = mysql_fetch_object($dbemi)){
print(tr\n);
print(td . $remi-bellname . /td\n);
print(tda href=\batch.crm.php?bn= . $remi-niiname . \
. $remi-niiname . /a - click for batch report/td\n);
print(td align=\right\ . number_format($remi-bellcount,
0, '', ',') . /td\n);
print(td align=\right\ . $remi-statdate . /td\n);
print(/tr\n);
}
?
---End Message---
---BeginMessage---
John Holmes wrote:
Why not simply 'Read The Fine Manual', or 'Read The Fantastic
Manual'?  Why does it have to contain profanity?
For all practical purposes:
 RTFM == read the manual
If someone finds it offensive then they're either delusional or paranoid or 
more likely both!

If I'm offended by the word wong what do that make me?
A wong-a-phobiac? ;)
--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
---End Message---
---BeginMessage---
Brian Dunning wrote:
I'm among those who are really pissed off when I see honest questions 
being answered with 'RTFM' or 'STFW'. I am relatively new to PHP, but by 
no means am I new to programming: like everyone else here, I already 
know how to RTFM and STFW. But sometimes I like to get an opinion from a 
real person: correct me if I'm wrong; is that not the purpose of a list??
The purpose of this list is to help those who are willing to help 
themselves.  Rarely on this list will you see a RTFM reply to a well 
thought out question to a problem that isn't so well (if at all) 
documented.  Asking for opinion's is fine too, and I don't think you'll 
find many on this list who will 'RTFM' someone asking for an opinion as 
long as the opinion hasn't been asked a gazillion times before (What's 
the best 

[PHP] Re: Conversion of Field Value to Hyperlink

2004-07-30 Thread Jason Barnett
Harlequin wrote:
Afternoon...
I have a table generated by some code that returns certain field values and
drops them into a table. On of these values is ID and I'd like to convert it
I wouldn't let users create their own primary key for any type of inserts, if 
that's what you're using ID for.  Users could easily fake a form ID and put 
whatever data into an existing row with that ID.

to a hyperlink that people can use to go to another page to view further
information about a record. However:
The fields are not individually identified as I use a for statement and I
think I might need to redesign the table but don't know where to start.
Even with a for statement, you could create element names for each item in an 
array.  But another solution is to create an array with the indexes you want to 
show and then foreach () over that array.

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


Re: [PHP] Conversion of Field Value to Hyperlink

2004-07-30 Thread Jason Barnett
Funny... for the short time I've been on the list, it seems like our most 
popular topics are the ones that involve flaming.  I guess I need to get some 
charcoal for my barbecue pit, lest I be the one on the end of the fork ;)

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


Re: [PHP] Browser reload problem

2004-07-30 Thread Jason Barnett
Is there a question here?  Or is this a resolution?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] reading txt file - certain lines

2004-07-30 Thread Rory McKinley
Dustin Krysak wrote:
snip
Now what I want to do is read this file, but only say read 5 songs 
worth, then I would place the PHP code in (another table) and display 
the next 5 songs and so on This just allows for a more flexible 
layout in the final presentation. the way I am having the text files 
written, there is no way to get it to produce seperate text files - 
otherwise this would be easy to do
snip
What you can do (if you have access to a DB) is pull the text file into 
a single field table, using br as the line terminator. Looking at my 
MySQl book, for LOAD DATA, it says you can use a string to terminate the 
line.

Then you can just run a simple query on the table (limited to the 
equivalent lines for 5 songs), and together with a loop, output the 
results.

For big files, the DB will be faster and provides you with far greater 
flexibility

HTH
--
Rory McKinley
Nebula Solutions
+27 21 555 3227 - office
+27 21 551 0676 - fax
+27 82 857 2391 - mobile
www.nebula.co.za

This e-mail is intended only for the person to whom it is addressed and
may contain confidential information which may be legally privileged.
Nebula Solutions accepts no liability for any loss, expense or damage
arising from this e-mail and/or any attachments.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Splitting a string by the number of characters in the string?

2004-07-30 Thread Brent Clements
In PHP 5 there is a awesome function called str_split, is there an equivalent in PHP 
4.x?

I need to do the following:

Split a 60 character string into 3 20 character array chunks.

using str_split I could easily do it, but how do I do it in PHP 4.x?

Thanks,
Brent


Re: [PHP] Conversion of Field Value to Hyperlink

2004-07-30 Thread Jason Wong
On Friday 30 July 2004 06:57, John Holmes wrote:
 Why not simply 'Read The Fine Manual', or 'Read The Fantastic
   Manual'?  Why does it have to contain profanity?
 
  For all practical purposes:
 
RTFM == read the manual
 
  If someone finds it offensive then they're either delusional or paranoid
  or more likely both!

 If I'm offended by the word wong what do that make me?

I don't know, but you can enrol in my Camp for Correction of Undesirable and 
Negative Traits :) They'll have you sorted out in no time.

-- 
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
--
/*
You never go anywhere without your soul.
*/

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



Re: [PHP] Splitting a string by the number of characters in the string?

2004-07-30 Thread Justin Patrin
On Fri, 30 Jul 2004 02:44:19 -0500, Brent Clements
[EMAIL PROTECTED] wrote:
 In PHP 5 there is a awesome function called str_split, is there an equivalent in PHP 
 4.x?
 
 I need to do the following:
 
 Split a 60 character string into 3 20 character array chunks.
 
 using str_split I could easily do it, but how do I do it in PHP 4.x?
 

RTFM! Look at the See Alsos in the manual on the page for str_split.

-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

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



Re: [PHP] Splitting a string by the number of characters in the string?

2004-07-30 Thread Jason Wong
On Friday 30 July 2004 15:44, Brent Clements wrote:
 In PHP 5 there is a awesome function called str_split, is there an
 equivalent in PHP 4.x?

 I need to do the following:

 Split a 60 character string into 3 20 character array chunks.

 using str_split I could easily do it, but how do I do it in PHP 4.x?

  substr()

-- 
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
--
/*
Superstition, idolatry, and hypocrisy have ample wages, but truth goes
a-begging.
-- Martin Luther
*/

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



[PHP] Sending mail() using 5.0.0

2004-07-30 Thread Michael Purdy
Folks

I am running php 5.0.0 on Windows 2000

When using php-cgi.exe or php.exe for that matter I get the following error when using 
MAIL()

Warning: mail() [function.mail]: sendmail_from not set in php.ini or custom From: 
header missing in e:\http\cgi\mail.php on line 4

When using php-win.exe or an earlier version of php I have no problems.  Has anyone 
else ran into this problem?

Mike


[PHP] Calling a function at a certain time of day.

2004-07-30 Thread Angelo Zanetti
HI,

Im slightly in the dark as to do the following. What I need is a thread of
some sort that runs and when the time is midnight, it automatically calls a
script that does something. Can anyone point me in the right direction as to
where to start. Thanks

Angelo


Disclaimer 
This e-mail transmission contains confidential information,
which is the property of the sender.
The information in this e-mail or attachments thereto is 
intended for the attention and use only of the addressee. 
Should you have received this e-mail in error, please delete 
and destroy it and any attachments thereto immediately. 
Under no circumstances will the Cape Technikon or the sender 
of this e-mail be liable to any party for any direct, indirect, 
special or other consequential damages for any use of this e-mail.
For the detailed e-mail disclaimer please refer to 
http://www.ctech.ac.za/polic or call +27 (0)21 460 3911

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



Re: [PHP] Sending mail() using 5.0.0

2004-07-30 Thread Jason Wong
On Friday 30 July 2004 19:00, Michael Purdy wrote:

 I am running php 5.0.0 on Windows 2000

 When using php-cgi.exe or php.exe for that matter I get the following error
 when using MAIL()

 Warning: mail() [function.mail]: sendmail_from not set in php.ini or
 custom From: header missing in e:\http\cgi\mail.php on line 4

 When using php-win.exe or an earlier version of php I have no problems. 
 Has anyone else ran into this problem?

Right, so what's different between this and the earlier version? The error 
message suggests you look at php.ini.

-- 
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
--
/*
Remembering is for those who have forgotten.
-- Chinese proverb
*/

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



[PHP] Re: Calling a function at a certain time of day.

2004-07-30 Thread Craig Donnelly
Have a look at Cron

http://www.webmasters-central.com/t/cron.shtml

HTH

Craig

Angelo Zanetti [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 HI,

 Im slightly in the dark as to do the following. What I need is a thread of
 some sort that runs and when the time is midnight, it automatically calls
a
 script that does something. Can anyone point me in the right direction as
to
 where to start. Thanks

 Angelo

 
 Disclaimer
 This e-mail transmission contains confidential information,
 which is the property of the sender.
 The information in this e-mail or attachments thereto is
 intended for the attention and use only of the addressee.
 Should you have received this e-mail in error, please delete
 and destroy it and any attachments thereto immediately.
 Under no circumstances will the Cape Technikon or the sender
 of this e-mail be liable to any party for any direct, indirect,
 special or other consequential damages for any use of this e-mail.
 For the detailed e-mail disclaimer please refer to
 http://www.ctech.ac.za/polic or call +27 (0)21 460 3911

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



[PHP] Re: Calling a function at a certain time of day.

2004-07-30 Thread Angelo binc2
thanks craig, just what I was looking for!! 


 Craig Donnelly [EMAIL PROTECTED] 7/30/2004 1:22:56 PM

Have a look at Cron

http://www.webmasters-central.com/t/cron.shtml 

HTH

Craig

Angelo Zanetti [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 HI,

 Im slightly in the dark as to do the following. What I need is a
thread of
 some sort that runs and when the time is midnight, it automatically
calls
a
 script that does something. Can anyone point me in the right
direction as
to
 where to start. Thanks

 Angelo

 
 Disclaimer
 This e-mail transmission contains confidential information,
 which is the property of the sender.
 The information in this e-mail or attachments thereto is
 intended for the attention and use only of the addressee.
 Should you have received this e-mail in error, please delete
 and destroy it and any attachments thereto immediately.
 Under no circumstances will the Cape Technikon or the sender
 of this e-mail be liable to any party for any direct, indirect,
 special or other consequential damages for any use of this e-mail.
 For the detailed e-mail disclaimer please refer to
 http://www.ctech.ac.za/polic or call +27 (0)21 460 3911

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


Disclaimer 
This e-mail transmission contains confidential information,
which is the property of the sender.
The information in this e-mail or attachments thereto is 
intended for the attention and use only of the addressee. 
Should you have received this e-mail in error, please delete 
and destroy it and any attachments thereto immediately. 
Under no circumstances will the Cape Technikon or the sender 
of this e-mail be liable to any party for any direct, indirect, 
special or other consequential damages for any use of this e-mail.
For the detailed e-mail disclaimer please refer to 
http://www.ctech.ac.za/polic or call +27 (0)21 460 3911

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



Re: [PHP] Conversion of Field Value to Hyperlink

2004-07-30 Thread John Nichel
Brian Dunning wrote:
I guess flame me back channel was a little confusing. I'll try to use 
smaller words next time.
It had nothing to do with your words Brian.  I may have been born and 
raised in the South, but I'm still a pretty smart guy, and knew what you 
meant.  However that doesn't mean I am going to comply with *your 
request* when you flame some of the primary helpers on this list 
publicly.  I'm not under the impression that you're the one who decides 
who's *noise* is welcome on this list.

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Calling a function at a certain time of day.

2004-07-30 Thread Craig Donnelly
Sorry I meant to say, assuming your on Unix/Linux system,
Otherwise if Windows use task scheduler Control Panel  Scheduled Tasks

Cheers,
Craig
Craig Donnelly [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Have a look at Cron

 http://www.webmasters-central.com/t/cron.shtml

 HTH

 Craig

 Angelo Zanetti [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  HI,
 
  Im slightly in the dark as to do the following. What I need is a thread
of
  some sort that runs and when the time is midnight, it automatically
calls
 a
  script that does something. Can anyone point me in the right direction
as
 to
  where to start. Thanks
 
  Angelo
 
  
  Disclaimer
  This e-mail transmission contains confidential information,
  which is the property of the sender.
  The information in this e-mail or attachments thereto is
  intended for the attention and use only of the addressee.
  Should you have received this e-mail in error, please delete
  and destroy it and any attachments thereto immediately.
  Under no circumstances will the Cape Technikon or the sender
  of this e-mail be liable to any party for any direct, indirect,
  special or other consequential damages for any use of this e-mail.
  For the detailed e-mail disclaimer please refer to
  http://www.ctech.ac.za/polic or call +27 (0)21 460 3911

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



[PHP] PHP GDI

2004-07-30 Thread Jay
Hi!
I have a BIIIG problem with GDI. I try to use some functions on a .gif 
image and now i need to install GDI. How do i install gd 2.0.28 on my XP 
machine.

I use Win XP, Apache 2.0.50 and PHP 4.3.8
Thanx in advance
J
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] How to nest information from different tables.

2004-07-30 Thread Karl-Heinz Schulz
Thank you for the information but I still have some problems.

I use the following code 

code

?php 
require(../admin/functions.php);
include(../admin/header.inc.php);

?
?
$event_query = mysql_query(select id, inserted, information, eventname,
date, title from event order by inserted desc LIMIT 0 , 30);
while($event = mysql_fetch_row($event_query)){

print(bspan style=\font-family: Arial, Helvetica,
sans-serif;color:#003300;font-size:14px;\.html_decode($event[5])./span
/bbr);
print(span style=\font-family: Arial, Helvetica,
sans-serif;font-size:12px;\.html_decode($event[4])./spanbr);
print(span style=\font-family: Arial, Helvetica,
sans-serif;font-size:12px;\.html_decode($event[2])./spanp);
}
?
? 
$eventdetails_query = mysql_query(select details, information, file_name
from eventdetails where event.id = eventdetails.event_id);
while($eventdetails = mysql_fetch_row($eventdetails_query)){ 

print(span style=\font-family: Arial, Helvetica,
sans-serif;font-size:12px;\.html_decode($eventdetails[0])./spanp);
print(span style=\font-family: Arial, Helvetica,
sans-serif;font-size:12px;\.html_decode($eventdetails[1])./spanp);
print(span style=\font-family: Arial, Helvetica,
sans-serif;font-size:12px;\.html_decode($eventdetails[2])./spanp);
} 
?
/code

But it generates now for the second query the is not a valid MySql result
error.

TIA


-Original Message-
From: zareef ahmed [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 29, 2004 11:57 PM
To: Karl-Heinz Schulz; [EMAIL PROTECTED]
Subject: Re: [PHP] How to nest information from different tables.

Hi,

You can use join or make this query as follows

$query=select *(or coulmn name) from event,
eventdetails where event.id = eventdetails.id;

zareef ahmed

--- Karl-Heinz Schulz [EMAIL PROTECTED] wrote:

 I have two tables with relevant information's;
 
 Table1 - event
 Table 2 - eventdetails
 
 
 I'm trying to list all events in table one plus to
 show for each event
 whatever documents are available (file_name,
 information)
 
 My code to list all events from the event table
 is:
 
 code
 
 ?php 
 require(../admin/functions.php);
 include(../admin/header.inc.php);
 
 ?
 ?
 $event_query = mysql_query(select id, inserted,
 information, eventname,
 date, title from event order by inserted desc LIMIT
 0 , 30);
 while($event = mysql_fetch_row($event_query)){
 
 print(bspan style=\font-family: Arial,
 Helvetica,

sans-serif;color:#003300;font-size:14px;\.html_decode($event[5])./span
 /bbr);
 print(span style=\font-family: Arial, Helvetica,

sans-serif;font-size:12px;\.html_decode($event[4])./spanbr);
 print(span style=\font-family: Arial, Helvetica,

sans-serif;font-size:12px;\.html_decode($event[2])./spanhrp);
 
 print ( here I would need the list of all files
 associates with the event  
 $eventdetails_query = mysql_query(select filename,
 information from
 eventdetails where event=.$id);
 
 
 }
 ?
 
 /code
 
 Can this be done and what would be the best
 approach?
 
 TIA
 
 Karl-Heinz
 
 
 
 Tracking #: A3E9B485BFDA4A44A6BFCE20A805CA39C3D820DA
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


=
Zareef Ahmed :: A PHP Developer in Delhi(India).
Homepage :: http://www.zasaifi.com




__
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

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



RE: [PHP] PHP GDI

2004-07-30 Thread Jay Blanchard
[snip]
I have a BIIIG problem with GDI. I try to use some functions on a .gif 
image and now i need to install GDI. How do i install gd 2.0.28 on my XP

machine.

I use Win XP, Apache 2.0.50 and PHP 4.3.8
[/snip]

I Googled some information for you...
http://gnuwin32.sourceforge.net/packages/gd.htm

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



RE: [PHP] PHP GDI

2004-07-30 Thread Jay Blanchard
[snip]
I have a BIIIG problem with GDI. I try to use some functions on a .gif 
image and now i need to install GDI. How do i install gd 2.0.28 on my XP

machine.

I use Win XP, Apache 2.0.50 and PHP 4.3.8
[/snip]

I hit send too quickly ...
http://forums.devshed.com/archive/t-72779

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



Re: [PHP] PHP GDI

2004-07-30 Thread John Nichel
Jay wrote:
Hi!
I have a BIIIG problem with GDI. I try to use some functions on a .gif 
image and now i need to install GDI. How do i install gd 2.0.28 on my XP 
machine.

I use Win XP, Apache 2.0.50 and PHP 4.3.8
Thanx in advance
J
http://www.boutell.com/gd/faq.html
--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] How to nest information from different tables.

2004-07-30 Thread John Nichel
Karl-Heinz Schulz wrote:
snip
But it generates now for the second query the is not a valid MySql result
error.
/snip
Echo out mysql_error() after you try to execute the second query.
--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] How to nest information from different tables.

2004-07-30 Thread John Nichel
Karl-Heinz Schulz wrote:
snip
$eventdetails_query = mysql_query(select details, information, file_name
from eventdetails where event.id = eventdetails.event_id);
/snip
What is 'eventdetails.event_id'?
Should this be a variable?
$eventdetails.event_id?
--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] How to nest information from different tables.

2004-07-30 Thread Karl-Heinz Schulz
John,


eventdetails is a table
event_id is a field in the eventdetails table

I want to show all file downloads (information's in table eventdetails) for
all events (table name is event)

TIA 

-Original Message-
From: John Nichel [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 30, 2004 8:17 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] How to nest information from different tables.

Karl-Heinz Schulz wrote:
snip
 $eventdetails_query = mysql_query(select details, information, file_name
 from eventdetails where event.id = eventdetails.event_id);
/snip

What is 'eventdetails.event_id'?

Should this be a variable?

$eventdetails.event_id?


Tracking #: 903D32A5877AC940823D21982DB192A8131A4DB5
-- 
By-Tor.com
It's all about the Rush
http://www.by-tor.com

-- 
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] How to nest information from different tables.

2004-07-30 Thread Jeremy Berthet
You have forgotten one table in your second query, try this :
$eventdetails_query = mysql_query(select details, information, 
file_name from event, eventdetails where event.id = eventdetails.event_id);

Karl-Heinz Schulz wrote:
Thank you for the information but I still have some problems.
I use the following code 

code
?php 
require(../admin/functions.php);
include(../admin/header.inc.php);

?
?
$event_query = mysql_query(select id, inserted, information, eventname,
date, title from event order by inserted desc LIMIT 0 , 30);
while($event = mysql_fetch_row($event_query)){
print(bspan style=\font-family: Arial, Helvetica,
sans-serif;color:#003300;font-size:14px;\.html_decode($event[5])./span
/bbr);
print(span style=\font-family: Arial, Helvetica,
sans-serif;font-size:12px;\.html_decode($event[4])./spanbr);
print(span style=\font-family: Arial, Helvetica,
sans-serif;font-size:12px;\.html_decode($event[2])./spanp);
}
?
? 
$eventdetails_query = mysql_query(select details, information, file_name
from eventdetails where event.id = eventdetails.event_id);
while($eventdetails = mysql_fetch_row($eventdetails_query)){ 

print(span style=\font-family: Arial, Helvetica,
sans-serif;font-size:12px;\.html_decode($eventdetails[0])./spanp);
print(span style=\font-family: Arial, Helvetica,
sans-serif;font-size:12px;\.html_decode($eventdetails[1])./spanp);
print(span style=\font-family: Arial, Helvetica,
sans-serif;font-size:12px;\.html_decode($eventdetails[2])./spanp);
} 
?
/code

But it generates now for the second query the is not a valid MySql result
error.
TIA
-Original Message-
From: zareef ahmed [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 29, 2004 11:57 PM
To: Karl-Heinz Schulz; [EMAIL PROTECTED]
Subject: Re: [PHP] How to nest information from different tables.

Hi,
You can use join or make this query as follows
$query=select *(or coulmn name) from event,
eventdetails where event.id = eventdetails.id;
zareef ahmed
--- Karl-Heinz Schulz [EMAIL PROTECTED] wrote:

I have two tables with relevant information's;
Table1 - event
Table 2 - eventdetails
I'm trying to list all events in table one plus to
show for each event
whatever documents are available (file_name,
information)
My code to list all events from the event table
is:
code
?php 
require(../admin/functions.php);
include(../admin/header.inc.php);

?
?
$event_query = mysql_query(select id, inserted,
information, eventname,
date, title from event order by inserted desc LIMIT
0 , 30);
while($event = mysql_fetch_row($event_query)){
print(bspan style=\font-family: Arial,
Helvetica,
sans-serif;color:#003300;font-size:14px;\.html_decode($event[5])./span
/bbr);
print(span style=\font-family: Arial, Helvetica,
sans-serif;font-size:12px;\.html_decode($event[4])./spanbr);
print(span style=\font-family: Arial, Helvetica,
sans-serif;font-size:12px;\.html_decode($event[2])./spanhrp);
print ( here I would need the list of all files
associates with the event  
$eventdetails_query = mysql_query(select filename,
information from
eventdetails where event=.$id);
}
?
/code
Can this be done and what would be the best
approach?
TIA
Karl-Heinz

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


=
Zareef Ahmed :: A PHP Developer in Delhi(India).
Homepage :: http://www.zasaifi.com
	
		
__
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] How to nest information from different tables.

2004-07-30 Thread John Nichel
Karl-Heinz Schulz wrote:
John,
eventdetails is a table
event_id is a field in the eventdetails table
I want to show all file downloads (information's in table eventdetails) for
all events (table name is event)
TIA 
Okay.  What does mysql_error() say?
--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] How to nest information from different tables.

2004-07-30 Thread John Nichel
Jeremy Berthet wrote:
You have forgotten one table in your second query, try this :
$eventdetails_query = mysql_query(select details, information, 
file_name from event, eventdetails where event.id = 
eventdetails.event_id);
Good eyes. ;)
--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Maintaining sessions across multiple sites

2004-07-30 Thread Ron Dyck
I'm in the process of building an application that has an adminstration
back-end shared by multiple sites. I need to maintain a persistent session
across these sites to properly identify users. I'm using a db to store the
session data but when switching from site to site, a new session_id is
started.

Does someone know of a good article that explains how to accomplish this
effectively?

Any help is appreciated.

ron

==
Ron Dyck
Webbtech
www.webbtech.net
==

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



RE: [PHP] How to nest information from different tables.

2004-07-30 Thread Karl-Heinz Schulz

Thank you,


I made one error - I forgot the second table (Thank you Jeremy)
It didn't like the field information in the eventdetails table - it worked
after I changed it to informations (Thank you John).


..but the result is not what I was trying to achieve.

I'm trying to display the following

Event 1 (from event table)
Information (from event table)
Detail (from event table)
File 1 (from event_details table)
File 2 (from event_details table)
File 3 (from event_details table)

hr

Event 2 (from event table)
Information (from event table)
Detail (from event table)
File 1 (from event_details table)
File 2 (from event_details table)
File 3 (from event_details table)

hr

And so on.

TIA





-Original Message-
From: Jeremy Berthet [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 30, 2004 8:10 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] How to nest information from different tables.

You have forgotten one table in your second query, try this :

$eventdetails_query = mysql_query(select details, information, 
file_name from event, eventdetails where event.id = eventdetails.event_id);

Karl-Heinz Schulz wrote:

 Thank you for the information but I still have some problems.
 
 I use the following code 
 
 code
 
 ?php 
 require(../admin/functions.php);
 include(../admin/header.inc.php);
 
 ?
 ?
 $event_query = mysql_query(select id, inserted, information, eventname,
 date, title from event order by inserted desc LIMIT 0 , 30);
 while($event = mysql_fetch_row($event_query)){
 
 print(bspan style=\font-family: Arial, Helvetica,

sans-serif;color:#003300;font-size:14px;\.html_decode($event[5])./span
 /bbr);
 print(span style=\font-family: Arial, Helvetica,
 sans-serif;font-size:12px;\.html_decode($event[4])./spanbr);
 print(span style=\font-family: Arial, Helvetica,
 sans-serif;font-size:12px;\.html_decode($event[2])./spanp);
 }
 ?
 ? 
 $eventdetails_query = mysql_query(select details, information, file_name
 from eventdetails where event.id = eventdetails.event_id);
 while($eventdetails = mysql_fetch_row($eventdetails_query)){ 
 
 print(span style=\font-family: Arial, Helvetica,

sans-serif;font-size:12px;\.html_decode($eventdetails[0])./spanp);
 print(span style=\font-family: Arial, Helvetica,

sans-serif;font-size:12px;\.html_decode($eventdetails[1])./spanp);
 print(span style=\font-family: Arial, Helvetica,

sans-serif;font-size:12px;\.html_decode($eventdetails[2])./spanp);
 } 
 ?
 /code
 
 But it generates now for the second query the is not a valid MySql
result
 error.
 
 TIA
 
 
 -Original Message-
 From: zareef ahmed [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, July 29, 2004 11:57 PM
 To: Karl-Heinz Schulz; [EMAIL PROTECTED]
 Subject: Re: [PHP] How to nest information from different tables.
 
 Hi,
 
 You can use join or make this query as follows
 
 $query=select *(or coulmn name) from event,
 eventdetails where event.id = eventdetails.id;
 
 zareef ahmed
 
 --- Karl-Heinz Schulz [EMAIL PROTECTED] wrote:
 
 
I have two tables with relevant information's;

Table1 - event
Table 2 - eventdetails


I'm trying to list all events in table one plus to
show for each event
whatever documents are available (file_name,
information)

My code to list all events from the event table
is:

code

?php 
require(../admin/functions.php);
include(../admin/header.inc.php);

?
?
$event_query = mysql_query(select id, inserted,
information, eventname,
date, title from event order by inserted desc LIMIT
0 , 30);
while($event = mysql_fetch_row($event_query)){

print(bspan style=\font-family: Arial,
Helvetica,

 

sans-serif;color:#003300;font-size:14px;\.html_decode($event[5])./span
 
/bbr);
print(span style=\font-family: Arial, Helvetica,

 
 sans-serif;font-size:12px;\.html_decode($event[4])./spanbr);
 
print(span style=\font-family: Arial, Helvetica,

 
 sans-serif;font-size:12px;\.html_decode($event[2])./spanhrp);
 
print ( here I would need the list of all files
associates with the event  
$eventdetails_query = mysql_query(select filename,
information from
eventdetails where event=.$id);


}
?

/code

Can this be done and what would be the best
approach?

TIA

Karl-Heinz



Tracking #: A3E9B485BFDA4A44A6BFCE20A805CA39C3D820DA

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


 
 
 
 =
 Zareef Ahmed :: A PHP Developer in Delhi(India).
 Homepage :: http://www.zasaifi.com
 
 
   
   
 __
 Do you Yahoo!?
 New and Improved Yahoo! Mail - 100MB free storage!
 http://promotions.yahoo.com/new_mail 

-- 
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] Maintaining sessions across multiple sites

2004-07-30 Thread Matt M.
 I'm in the process of building an application that has an adminstration
 back-end shared by multiple sites. I need to maintain a persistent session
 across these sites to properly identify users. I'm using a db to store the
 session data but when switching from site to site, a new session_id is
 started.
 
 Does someone know of a good article that explains how to accomplish this
 effectively?


You could just make sure to always pass the session id in the query
string or a hidden field

here is a short article:
http://www.phpbuilder.com/columns/chriskings20001128.php3

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



Re: [PHP] Maintaining sessions across multiple sites

2004-07-30 Thread Tom Rogers
Hi,

Friday, July 30, 2004, 11:31:07 PM, you wrote:
RD I'm in the process of building an application that has an adminstration
RD back-end shared by multiple sites. I need to maintain a persistent session
RD across these sites to properly identify users. I'm using a db to store the
RD session data but when switching from site to site, a new session_id is
RD started.

RD Does someone know of a good article that explains how to accomplish this
RD effectively?

RD Any help is appreciated.

RD ron

RD ==
RD Ron Dyck
RD Webbtech
RD www.webbtech.net
RD ==


msession is designed for just this purpose

http://www.mohawksoft.com/

-- 
regards,
Tom

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



Re: [PHP] How to nest information from different tables.

2004-07-30 Thread John Nichel
Karl-Heinz Schulz wrote:
Thank you,
I made one error - I forgot the second table (Thank you Jeremy)
It didn't like the field information in the eventdetails table - it worked
after I changed it to informations (Thank you John).
..but the result is not what I was trying to achieve.
I'm trying to display the following
Event 1 (from event table)
Information (from event table)
Detail (from event table)
File 1 (from event_details table)
File 2 (from event_details table)
File 3 (from event_details table)
hr
Check google for information on doing 'Joins' in MySQL.
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Number validation

2004-07-30 Thread Andre
Hello 
I need one script in PHP to validate only numbers inserted from a form.
For example like a telephone number.
Thanks.


RE: [PHP] Number validation

2004-07-30 Thread Jay Blanchard
[snip]
I need one script in PHP to validate only numbers inserted from a form.
For example like a telephone number.
[/snip]

Did you want us to search Google for you? Or would you rather we write
something?

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



Re: [PHP] Number validation

2004-07-30 Thread Jordi Canals
Andre wrote:
Hello 
I need one script in PHP to validate only numbers inserted from a form.
For example like a telephone number.
Thanks.

Well ... you can write it or if don't want to code ... perhaps searching 
the web could help.

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


Re: [PHP] Number validation

2004-07-30 Thread John Nichel
Andre wrote:
Hello 
I need one script in PHP to validate only numbers inserted from a form.
For example like a telephone number.
Thanks.

Well, you could RTFM on regular expressions
http://us4.php.net/preg_match
Or you could STFW for how to match a phone number...
http://www.google.com/search?hl=enlr=ie=UTF-8q=php+regular+expression+match+phone+numberbtnG=Search
Or you could STFA to see if this has already been asked...
http://marc.theaimsgroup.com/?l=php-generalw=2r=1s=validate+phone+numberq=b
Or you could pay me, and I'll write it for you...
$65/hr, 3 hour minimum.
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Number validation again...

2004-07-30 Thread Andre
Hello again 

Does exits any function in PHP to see if one string is compose for
numbers.
And I have already searched in google before I asked here 

Thanks again

André Caridade


Re: [PHP] Maintaining sessions across multiple sites

2004-07-30 Thread Ron Dyck
 RD I'm in the process of building an application that has an
adminstration
 RD back-end shared by multiple sites. I need to maintain a persistent
session
 RD across these sites to properly identify users. I'm using a db to store
the
 RD session data but when switching from site to site, a new session_id is
 RD started.

 msession is designed for just this purpose

 http://www.mohawksoft.com/

Does msession work with php5?

ron

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



Re: [PHP] Number validation

2004-07-30 Thread Angelo binc2
Nice one John, 

Come on guys, please read the manual or do some searching before posting.

Cheers for now
Angelo

 John Nichel [EMAIL PROTECTED] 7/30/2004 4:07:33 PM 
Andre wrote:
 Hello 
 I need one script in PHP to validate only numbers inserted from a form.
 For example like a telephone number.
 Thanks.
 

Well, you could RTFM on regular expressions

http://us4.php.net/preg_match 

Or you could STFW for how to match a phone number...

http://www.google.com/search?hl=enlr=ie=UTF-8q=php+regular+expression+match+phone+numberbtnG=Search
 

Or you could STFA to see if this has already been asked...

http://marc.theaimsgroup.com/?l=php-generalw=2r=1s=validate+phone+numberq=b 

Or you could pay me, and I'll write it for you...

$65/hr, 3 hour minimum.

-- 
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED] 

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



Disclaimer
This e-mail transmission contains confidential information,
which is the property of the sender.
The information in this e-mail or attachments thereto is
intended for the attention and use only of the addressee.
Should you have received this e-mail in error, please delete
and destroy it and any attachments thereto immediately.
Under no circumstances will the Cape Technikon or the sender
of this e-mail be liable to any party for any direct, indirect,
special or other consequential damages for any use of this e-mail.
For the detailed e-mail disclaimer please refer to
http://www.ctech.ac.za/polic or call +27 (0)21 460 3911

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



RE: [PHP] Number validation again...

2004-07-30 Thread Jay Blanchard
[snip]
Does exits any function in PHP to see if one string is compose for
numbers.
And I have already searched in google before I asked here 
[/snip]

http://www.php.net/is_numeric

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



RE: [PHP] Number validation again...

2004-07-30 Thread Daniel Purdy

[snip]
Does exits any function in PHP to see if one string is compose for
numbers. And I have already searched in google before I asked here 
[/snip]

The manual is your friend.
http://www.php.net/strspn

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



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

2004-07-30 Thread Tom Rogers
Hi,

Saturday, July 31, 2004, 12:12:26 AM, you wrote:

RD Does msession work with php5?

RD ron


I have no idea :-)

-- 
regards,
Tom

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



[PHP] New Flash Chat Program

2004-07-30 Thread Matt Palermo
Hello everyone.  Once again I would like to thank you for all your help.  I
have just completed a new program called TotalChat.  It's a PHP/Flash/MySQL
live chat system for your website.  It's a great tool for providing live
support to your site members.  You can view the full product information
here:

http://sweetphp.com/nuke/modules.php?name=Script_Previewscript=6

As a thank you to all those who have helped me on here I am giving away 5
free copies of the program to the first 5 people who contact me about it.
Thanks again for all your help guys.  Great job!

Matt Palermo
[EMAIL PROTECTED]
http://sweetphp.com

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



[PHP] PHP5 exception handling

2004-07-30 Thread Matthew Weier O'Phinney
I've done some reading on the ZE2 exception handling, but I'm not quite
sure I understand how it works. I'm familiar with the following in perl:

eval {
do some stuff...
}
if ($@) {
report an exception...
}

Which looks a lot like the following in PHP5:
try {
do some stuff...
}
catch () {
}

The problem I'm running into: what do I pass as arguments to catch()?
The articles on ZE2 use something like: catch (Exception $e) {}, or
something like catch(MyException $e) (where MyException is a class they
defined in their examples). Is the 'Exception' class a base
class/handler with PHP5? Do I need to create my own exception handler
classes? Do I even need to catch objects of a specific type, or can I
simply do:
catch ($error) {
do something with $error
}

Thanks in advance.

-- 
Matthew Weier O'Phinney   | WEBSITES:
Webmaster and IT Specialist   | http://www.garden.org
National Gardening Association| http://www.kidsgardening.com
802-863-5251 x156 | http://nationalgardenmonth.org
mailto:[EMAIL PROTECTED] | http://vermontbotanical.org

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



Re: [PHP] Number validation again...

2004-07-30 Thread Jordi Canals
Andre wrote:
Does exits any function in PHP to see if one string is compose for
numbers.
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


RE: [PHP] How to nest information from different tables.

2004-07-30 Thread Karl-Heinz Schulz
John,

Since we never have more than 30 records I don't think it will be necessary
to join the tables.

I tried the following syntax and have one last question.

How can I specify that the eventdetails only print the details for the
specific record?

The first where example puts the details after the first loop is completed
(code is comments out)

The second where example put all event_details information in all the
events.

I must be missing something.

TIA




//$eventdetails_query = mysql_query(select informations, details, file_name
from eventdetails, event where eventdetails.event_id =.$event[0]);


$eventdetails_query = mysql_query(select informations, details, file_name
from eventdetails, event where eventdetails.event_id = event.id);
while($eventdetails = mysql_fetch_row($eventdetails_query)){

-Original Message-
From: John Nichel [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 30, 2004 9:52 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] How to nest information from different tables.

Karl-Heinz Schulz wrote:
 Thank you,
 
 
 I made one error - I forgot the second table (Thank you Jeremy)
 It didn't like the field information in the eventdetails table - it
worked
 after I changed it to informations (Thank you John).
 
 
 ..but the result is not what I was trying to achieve.
 
 I'm trying to display the following
 
 Event 1 (from event table)
 Information (from event table)
 Detail (from event table)
 File 1 (from event_details table)
 File 2 (from event_details table)
 File 3 (from event_details table)
 
 hr

Check google for information on doing 'Joins' in MySQL.


Tracking #: A1D6447851B7E2489F08DDC66F7F0627FB1F13C9
-- 
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]

-- 
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] Browser reload problem

2004-07-30 Thread Ashley M. Kirchner
Jason Barnett wrote:
Is there a question here?  Or is this a resolution?
   Thanks for asking.  I found a solution that works.  Basically when 
data gets returned, check the unique id against the DB.  If it doesn't 
exist, insert it together with the other stuff I want in the DB.  If it 
does, don't bother re-adding it - don't return an error either because 
the user won't care anyway.

   Though I'm intrigued by two things: a) why am I getting both 
$_REQUEST as well as $_POST variables when I get PayPal's redirect, and 
b) I wonder if Matthew Sims' solution of inserting a header redirect 
back to the same page really discards all of the $_POST variables.  And 
if so, what happens with the $_REQUEST ones?

--
W | I haven't lost my mind; it's backed up on tape somewhere.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / WebSmith . 800.441.3873 x130
 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.

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


Re: [PHP] How to nest information from different tables.

2004-07-30 Thread John Nichel
Karl-Heinz Schulz wrote:
John,
Since we never have more than 30 records I don't think it will be necessary
to join the tables.
Your queries are preforming a join (you're selecting from more than one 
table with one query, a common reference pointetc.).  Check out 
http://dev.mysql.com/doc/mysql/en/JOIN.html

It can be confusing stuff, but if you can't retrive your data the way 
you want by looking at that, the people on the MySQL list are pretty 
friendly.

--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] How to nest information from different tables.

2004-07-30 Thread Aldwyn
Did your table event_details contain a field linked with
event.id ? if not, you'll need it

Maybe I misunderstood what you want, but try this


$event_result = mysq_query(SELECT * FROM event_table) or
die(Cant catch events);
print(table);
while ($eventDb = mysql_fetch_object($event_result)){
print(tr);

print(td.$eventDb-id.   .$eventDb-Information. /td);
print(td.$eventDb-detail./td);
$event_details_result = mysql_query(SELECT * FROM
event_details WHERE event_details.id_event = .$eventDb-id);
while ($event_detailsDb =
mysql_fetch_object($event_details_result)){
print(td.$event_detailsDb-file1./td);
print(td.$event_detailsDb-file2./td);
print(td.$event_detailsDb-file3./td);
}
print(/tr);
}
print(/table);

I use a script like your on my web site, and it looks like above.

Jonathan Langlois
[EMAIL PROTECTED]


Accédez au courrier électronique de La Poste : www.laposte.net ; 
3615 LAPOSTENET (0,34€/mn) ; tél : 08 92 68 13 50 (0,34€/mn)



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



Re: [PHP] PHP5 exception handling

2004-07-30 Thread Curt Zirzow
* Thus wrote Matthew Weier O'Phinney:

 The problem I'm running into: what do I pass as arguments to catch()?
 The articles on ZE2 use something like: catch (Exception $e) {}, or
 something like catch(MyException $e) (where MyException is a class they
 defined in their examples). Is the 'Exception' class a base
 class/handler with PHP5? Do I need to create my own exception handler
 classes? Do I even need to catch objects of a specific type, or can I
 simply do:
 catch ($error) {
 do something with $error
 }

At minimum you should always at least catch the Exception class:

  catch (Exception $e) { }

If the class instance your calling throws a custom exception
definition you can attempt to catch that before the standard
Exception class:

?php

class MyException extends Exception {

  /* Redefine the exception so message isn't optional */
  public function __construct($message, $code = 0) {

// custom stuff you want to do..
// ...

parent::__construct($message, $code);
  }

  /* custom string representation of object */
  public function __toString() {
return __CLASS__ .  [{$this-code}]: {$this-message}\n;
  }

  public function customFunction() {
echo A Custom function for this type of exception\n;
  }

}

class foo {
  function myException() {
throw new MyException('Exception thrown');
  }
  function standardException() {
throw new Exception();
  }
}

$f = new foo();

try {
  $f-myException();
}
catch (MyException $e) {
  echo Caught my exception\n, $e;
  $e-customFunction();
}
catch (Exception $e) {
  echo Default Exception caught\n, $e;
}

try {
  $f-standardException();
}
catch (MyException $e) {
  echo Caught my exception\n, $e;
  $e-customFunction();
}
catch (Exception $e) {
  echo Default Exception caught\n, $e;
}


HTH,


Curt
-- 
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about.  No, sir.  Our model is the trapezoid!

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



RE: [PHP] Browser reload problem

2004-07-30 Thread Ford, Mike [LSS]
On 30 July 2004 16:25, Ashley M. Kirchner wrote:

 Jason Barnett wrote:
 
 Though I'm intrigued by two things: a) why am I getting both
 $_REQUEST as well as $_POST variables

Because $_REQUEST is an aggregate of $_GET, $_POST and $_COOKIE.  That's the way it's 
defined: see 
http://www.php.net/manual/en/reserved.variables.php#reserved.variables.request.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, 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] Variable functions within an object

2004-07-30 Thread Julio Sergio Santana
Curt Zirzow wrote:
  $this-{$this-fname}();
  or (what it actually is doing.. )
  $func = $this-fname;
  $this-$func();
Curt
The point here is that the named function is outside the object. That 
is, $this-foo() doesn't exist, so $this-{$this-fname}(), does not 
work either.
But if you look at your suggested construct, I wonder why
$this-{$this-fname}() is sintactically correct while
{$this-fname}() is not (since we just striped out the prefix '$this-' 
which means that the function is inside the object).

Look for instance at a similar case when dealing with variable variables 
  in arrays, this is what the online documentation says in this case:

In order to use variable variables with arrays, you have to resolve an 
ambiguity problem. That is, if you write $$a[1] then the parser needs to 
know if you meant to use $a[1] as a variable, or if you wanted $$a as 
the variable and then the [1] index from that variable. The syntax for 
resolving this ambiguity is: ${$a[1]} for the first case and ${$a}[1] 
for the second.

So, I think the case is similar here
Clearly, $this-fname() means call the object's method 'fname', but
{$this-fname}(), would mean call the function whose name is 
'$this-fname'.
I think, for the sake of orthogonallity, this feature should be added to 
 the language.

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


Re: [PHP] PHP5 exception handling

2004-07-30 Thread Jason Davidson
You can check out how exceptions are handled in Java or C++ as well,
they all sorta work the same, you may find more complete docs for
them.

Jason

On 30 Jul 2004 14:58:59 -, Matthew Weier O'Phinney
[EMAIL PROTECTED] wrote:
 I've done some reading on the ZE2 exception handling, but I'm not quite
 sure I understand how it works. I'm familiar with the following in perl:
 
 eval {
 do some stuff...
 }
 if ($@) {
 report an exception...
 }
 
 Which looks a lot like the following in PHP5:
 try {
 do some stuff...
 }
 catch () {
 }
 
 The problem I'm running into: what do I pass as arguments to catch()?
 The articles on ZE2 use something like: catch (Exception $e) {}, or
 something like catch(MyException $e) (where MyException is a class they
 defined in their examples). Is the 'Exception' class a base
 class/handler with PHP5? Do I need to create my own exception handler
 classes? Do I even need to catch objects of a specific type, or can I
 simply do:
 catch ($error) {
 do something with $error
 }
 
 Thanks in advance.
 
 --
 Matthew Weier O'Phinney   | WEBSITES:
 Webmaster and IT Specialist   | http://www.garden.org
 National Gardening Association| http://www.kidsgardening.com
 802-863-5251 x156 | http://nationalgardenmonth.org
 mailto:[EMAIL PROTECTED] | http://vermontbotanical.org
 
 --
 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] PHP5 exception handling

2004-07-30 Thread Matthew Weier O'Phinney
* Curt Zirzow [EMAIL PROTECTED]:
 * Thus wrote Matthew Weier O'Phinney:
 
  The problem I'm running into: what do I pass as arguments to catch()?
  The articles on ZE2 use something like: catch (Exception $e) {}, or
  something like catch(MyException $e) (where MyException is a class they
  defined in their examples). Is the 'Exception' class a base
  class/handler with PHP5? Do I need to create my own exception handler
  classes? Do I even need to catch objects of a specific type, or can I
  simply do:
  catch ($error) {
  do something with $error
  }

 At minimum you should always at least catch the Exception class:

   catch (Exception $e) { }

So, the Exception class is in the PHP5 distribution, then? Do I need to
include/require it, or is it implicit in simply running PHP5?

snip
 class foo {
   function myException() {
 throw new MyException('Exception thrown');
   }
   function standardException() {
 throw new Exception();
   }
 }

 $f = new foo();

 try {
   $f-myException();
 }
 catch (MyException $e) {
   echo Caught my exception\n, $e;
   $e-customFunction();
 }
 catch (Exception $e) {
   echo Default Exception caught\n, $e;
 }

 try {
   $f-standardException();
 }
 catch (MyException $e) {
   echo Caught my exception\n, $e;
   $e-customFunction();
 }
 catch (Exception $e) {
   echo Default Exception caught\n, $e;
 }

Next question: do I have to 'throw' an error for it to be caught? Again,
coming from perl, if I try to eval something and it fails, I don't have
to throw in error -- if one occurs, I catch it with the 'if ($@)'
construct. Is 'catch (Exception $e)' equivalent? i.e., if an error
occurs in a try block that isn't specifically thrown, will that
construct catch it?

-- 
Matthew Weier O'Phinney   | WEBSITES:
Webmaster and IT Specialist   | http://www.garden.org
National Gardening Association| http://www.kidsgardening.com
802-863-5251 x156 | http://nationalgardenmonth.org
mailto:[EMAIL PROTECTED] | http://vermontbotanical.org

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



Re: [PHP] Variable functions within an object

2004-07-30 Thread Curt Zirzow
* Thus wrote Julio Sergio Santana:
 
 Curt Zirzow wrote:
 
   $this-{$this-fname}();
 
   or (what it actually is doing.. )
 
   $func = $this-fname;
   $this-$func();
 
 Curt
 
 The point here is that the named function is outside the object. That 
 is, $this-foo() doesn't exist, so $this-{$this-fname}(), does not 
 work either.
 But if you look at your suggested construct, I wonder why
 $this-{$this-fname}() is sintactically correct while
 {$this-fname}() is not (since we just striped out the prefix '$this-' 
 which means that the function is inside the object).

Sorry, i did misread what actual function you were trying to
access, the problem is that {} isn't really the thing that expands
the variable its the special cases:

  -{} 
  ${}

{} by itself simply defines a  code block.


 ...
 
 Clearly, $this-fname() means call the object's method 'fname', but
 {$this-fname}(), would mean call the function whose name is 
 '$this-fname'.
 I think, for the sake of orthogonallity, this feature should be added to 
  the language.

One way to solve this without adding a feature like that would be:

  ${$this-fname} = $this-fname;
  ${$this-fname}();

or for the oneline purists :)

  ${ ${$this-fname} = $this-fname }();

wow.. ${} is more powerful than i had originally though.

Curt
-- 
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about.  No, sir.  Our model is the trapezoid!

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



[PHP] Means of collecting HTTP response headers

2004-07-30 Thread Gerard Samuel
A means that is not specifically tied to Apache functions.
Just looking for a way so that it works no matter the webserver.
Thanks

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



[PHP] XML validation with XML Schema

2004-07-30 Thread Matias Bagini
Is there any way to validate an XML with XML Schema using PHP4... I need 
something like the

bool DOMDocument-schemaValidate ( string filename)
that exists on PHP5
Thanks,
Matias.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] php mysql--mysqli persistent connections...

2004-07-30 Thread bruce
hi..

in looking over mysqli/mysql constructs, i noticed that mysqli doesn't
appear to support persistent connections. is this correct, did i miss
something..???

without using persistent connections/transactional processing, how is one
supposed to accomplish handling db transactions across multiple pages..???

if persistent connections are still supported with mysqli, how?

and if the persistent connection is no longer available, can someone explain
why it was dropped..???

thanks

-bruce

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



Re: [PHP] php mysql--mysqli persistent connections...

2004-07-30 Thread John Holmes
 without using persistent connections/transactional
 processing, how is one
 supposed to accomplish handling db transactions across
 multiple pages..???

At what point was this ever allowed or even capable of being done? Are you saying 
you're doing this now?

---John Holmes...

UCCASS - PHP Survey System
http://www.bigredspark.com/survey.html

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



Re: [PHP] Variable functions within an object

2004-07-30 Thread Julio Sergio Santana

Curt Zirzow wrote:
or for the oneline purists :)
  ${ ${$this-fname} = $this-fname }();
wow.. ${} is more powerful than i had originally though.
Thank you Curt,
With your suggestion, I finally re-wrote the example, and here it is:
?php
function foo() {
   echo In foo()br /\n;
}
class a {
  var $fname;
  function a() {
$this-fname = 'foo'; // the name of the function
  }
  function execute() { // method to execute the named function
${${$this-fname}=$this-fname}();
  }
}
$w = new a;
$w-execute();
?
And this outputs:
X-Powered-By: PHP/4.1.2
Content-type: text/html
In foo()br /
Thank you again,
Sergio.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Replace a button by an image

2004-07-30 Thread Henri Marc
Hello,

Is it possible to replace a button by an image with
PHP?

Thanks!

Dave






Vous manquez d’espace pour stocker vos mails ? 
Yahoo! Mail vous offre GRATUITEMENT 100 Mo !
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/

Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour 
dialoguer instantanément avec vos amis. A télécharger gratuitement sur 
http://fr.messenger.yahoo.com

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



RE: [PHP] php mysql--mysqli persistent connections...

2004-07-30 Thread bruce
php/mysql supported persistent connections..

i had assumed that mysqli would as well

it appears that it doesn't...

-bruce


-Original Message-
From: John Holmes [mailto:[EMAIL PROTECTED]
Sent: Friday, July 30, 2004 10:54 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP] php mysql--mysqli persistent connections...


 without using persistent connections/transactional
 processing, how is one
 supposed to accomplish handling db transactions across
 multiple pages..???

At what point was this ever allowed or even capable of being done? Are you
saying you're doing this now?

---John Holmes...

UCCASS - PHP Survey System
http://www.bigredspark.com/survey.html

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



Re: RE: [PHP] php mysql--mysqli persistent connections...

2004-07-30 Thread John Holmes
 php/mysql supported persistent connections..

Have you ever used persistant connections. I don't think they work the way you are 
thinking. Persistant connections rarely had any benifit except in certain server 
configurations. 

---John Holmes...

UCCASS - PHP Survey System
http://www.bigredspark.com/survey.html

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



RE: [PHP] Replace a button by an image

2004-07-30 Thread Jay Blanchard
[snip]
Is it possible to replace a button by an image with
PHP?
[/snip]

Yes, anything is possible. http://phpbutton.sourceforge.net/

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



RE: RE: [PHP] php mysql--mysqli persistent connections...

2004-07-30 Thread bruce
never worked with them

but i'm getting close in an app that i believes requires them...

i'm going to need to do transactional processing across multiple pages for a
test app. i was looking at the mysqli functions which work for the
rollback/commit which is ok. but it's my understanding that once the page
closes, the db connection is lost, which would trigger a rollback of any db
queries/processing currently in process. however, if i had a persistent
connection, then the connection should be open, and the rollback shouldn't
be triggered, and the app could proceed with the db processing, followed by
a commit!

at least this was the plan, until i couldn't find the persistent hook within
mysqli...

what am i missing..??

-bruce


-Original Message-
From: John Holmes [mailto:[EMAIL PROTECTED]
Sent: Friday, July 30, 2004 11:09 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: RE: [PHP] php mysql--mysqli persistent connections...


 php/mysql supported persistent connections..

Have you ever used persistant connections. I don't think they work the way
you are thinking. Persistant connections rarely had any benifit except in
certain server configurations.

---John Holmes...

UCCASS - PHP Survey System
http://www.bigredspark.com/survey.html

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



Re: [PHP] Replace a button by an image

2004-07-30 Thread John Nichel
Jay Blanchard wrote:
Yes, anything is possible.
Can I be the next Queen of England?
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] XML validation with XML Schema

2004-07-30 Thread Christian Stocker
Hi

On Fri, 30 Jul 2004 14:25:44 -0300, Matias Bagini
[EMAIL PROTECTED] wrote:
 Is there any way to validate an XML with XML Schema using PHP4... I need
 something like the
 
 bool DOMDocument-schemaValidate ( string filename)

No, not implemented in PHP 4. The Schema Implementatin of libxml2 is
not complete/finished anyway (but their getting there slowly...)

chregu

 
 that exists on PHP5
 
 Thanks,
 
 Matias.
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


-- 
christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 1 240 56 70 | mobile +41 76 561 88 60  | fax +41 1 240 56 71
http://www.bitflux.ch  |  [EMAIL PROTECTED]  |  gnupg-keyid 0x5CE1DECB

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



[PHP] es_US spanish locale doesn't recognize meridian (AM/PM)

2004-07-30 Thread Olga
Hi!
I am working on a bilingual site for US users - it will be in English and
Spanish... I came across some difficulties formatting dates. I set the
locale depending on language chosen and use strftime to display the
formatting I need. However, it looks like none of the Spanish locales (I am
using es_US, but I tested others) use AM  PM values. I realize that AM  PM
aren't used much outside US, but I believe that Spanish speaking users
within the US will be more familiar with AM/PM notation.

I looked at the source files for locales on the server (I am using Redhat
Linux ES), and, indeed, values that relate to AM / PM are empty.
I am not sure whether there's a PHP way around it, or maybe I should find a
different source for the es_US locale and reinstall it (not sure how to do
it), but so far I had no success finding any information about it... Seems
like everybody else is perfectly happy using 24-hour format for US Spanish
locale on Linux / Unix.

I would appreciate any help!
Thanks

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



[PHP] UML

2004-07-30 Thread [EMAIL PROTECTED]
Now that PHP is OOP with 5.0 is there a UML tool dedicated to PHP?

/T
Best IT
[EMAIL PROTECTED]
http://www.best-it.biz





RE: [PHP] UML

2004-07-30 Thread Jay Blanchard
[snip]
Now that PHP is OOP with 5.0 is there a UML tool dedicated to PHP?
[/snip]

Since UML stands for Unified Modeling Language why would you need one
for PHP? Have you seen Umbrello? http://uml.sourceforge.net/index.php

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



Re: [PHP] PHP5 exception handling

2004-07-30 Thread Tularis
Matthew Weier O'Phinney wrote:
* Curt Zirzow [EMAIL PROTECTED]:
* Thus wrote Matthew Weier O'Phinney:
The problem I'm running into: what do I pass as arguments to catch()?
The articles on ZE2 use something like: catch (Exception $e) {}, or
something like catch(MyException $e) (where MyException is a class they
defined in their examples). Is the 'Exception' class a base
class/handler with PHP5? Do I need to create my own exception handler
classes? Do I even need to catch objects of a specific type, or can I
simply do:
   catch ($error) {
   do something with $error
   }
At minimum you should always at least catch the Exception class:
 catch (Exception $e) { }

So, the Exception class is in the PHP5 distribution, then? Do I need to
include/require it, or is it implicit in simply running PHP5?
snip
class foo {
 function myException() {
   throw new MyException('Exception thrown');
 }
 function standardException() {
   throw new Exception();
 }
}
$f = new foo();
try {
 $f-myException();
}
catch (MyException $e) {
 echo Caught my exception\n, $e;
 $e-customFunction();
}
catch (Exception $e) {
 echo Default Exception caught\n, $e;
}
try {
 $f-standardException();
}
catch (MyException $e) {
 echo Caught my exception\n, $e;
 $e-customFunction();
}
catch (Exception $e) {
 echo Default Exception caught\n, $e;
}

Next question: do I have to 'throw' an error for it to be caught? Again,
coming from perl, if I try to eval something and it fails, I don't have
to throw in error -- if one occurs, I catch it with the 'if ($@)'
construct. Is 'catch (Exception $e)' equivalent? i.e., if an error
occurs in a try block that isn't specifically thrown, will that
construct catch it?
evals don't throw errors as far as I know, unless you throw it yourself 
from within the eval. The few internal functions that do throw 
exceptions can be caught using the catch(Exception $e) method, if you 
want to MAKE something throw an exception, then you need to explicitly 
tell it to THROW. Remember though, this is not an error-mechanism! It's 
exceptions... Errors are returned the standard way, and can be handled 
using error_handlers (http://www.php.net/manual/en/ref.errorfunc.php)

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


RE: [PHP] UML

2004-07-30 Thread Jay Blanchard
[snip]
[snip]
Now that PHP is OOP with 5.0 is there a UML tool dedicated to
PHP?
[/snip]
Since UML stands for Unified Modeling Language why would you need one
for PHP? Have you seen Umbrello? http://uml.sourceforge.net/index.php
[/snip]

An article of interest

http://www.phppatterns.com/index.php/article/articleview/15/1/1/

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



[PHP] Re: UML

2004-07-30 Thread Manuel Lemos
Hello,
On 07/30/2004 04:14 PM, [EMAIL PROTECTED] wrote:
Now that PHP is OOP with 5.0 is there a UML tool dedicated to PHP?
Umbrello already supported PHP before PHP 5.
http://www.umbrello.org/
--
Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP5 exception handling

2004-07-30 Thread Matthew Weier O'Phinney
* Tularis [EMAIL PROTECTED]:
 Matthew Weier O'Phinney wrote:

 * Curt Zirzow [EMAIL PROTECTED]:
 
* Thus wrote Matthew Weier O'Phinney:

The problem I'm running into: what do I pass as arguments to catch()?
The articles on ZE2 use something like: catch (Exception $e) {}, or
something like catch(MyException $e) (where MyException is a class they
defined in their examples). Is the 'Exception' class a base
class/handler with PHP5? Do I need to create my own exception handler
classes? Do I even need to catch objects of a specific type, or can I
simply do:
catch ($error) {
do something with $error
}

At minimum you should always at least catch the Exception class:

  catch (Exception $e) { }
 
 
 So, the Exception class is in the PHP5 distribution, then? Do I need to
 include/require it, or is it implicit in simply running PHP5?
 
 snip

snip

 Next question: do I have to 'throw' an error for it to be caught? Again,
 coming from perl, if I try to eval something and it fails, I don't have
 to throw in error -- if one occurs, I catch it with the 'if ($@)'
 construct. Is 'catch (Exception $e)' equivalent? i.e., if an error
 occurs in a try block that isn't specifically thrown, will that
 construct catch it?
 
 evals don't throw errors as far as I know, unless you throw it yourself 
 from within the eval. The few internal functions that do throw 
 exceptions can be caught using the catch(Exception $e) method, if you 
 want to MAKE something throw an exception, then you need to explicitly 
 tell it to THROW. Remember though, this is not an error-mechanism! It's 
 exceptions... Errors are returned the standard way, and can be handled 
 using error_handlers (http://www.php.net/manual/en/ref.errorfunc.php)

That helps explain it a lot. Perl's eval mechanism is much more
flexible, but also very non-standard from what I've been reading of C++
and Java (thanks to the person who recommended that reading). I was
thinking of exceptions as a way to gracefully handle code errors, but it
appears now that they are more a mechanism to handle return values that
fall outside the expected realm. I'll stick to error_handlers for code
errors, and start seeing what use I can make of the try{} catch(){}
constructs.

Off to the experimentation room...

-- 
Matthew Weier O'Phinney   | WEBSITES:
Webmaster and IT Specialist   | http://www.garden.org
National Gardening Association| http://www.kidsgardening.com
802-863-5251 x156 | http://nationalgardenmonth.org
mailto:[EMAIL PROTECTED] | http://vermontbotanical.org

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



Re: [PHP] Means of collecting HTTP response headers

2004-07-30 Thread Gerard Samuel
On Friday 30 July 2004 01:32 pm, Gerard Samuel wrote:
 A means that is not specifically tied to Apache functions.
 Just looking for a way so that it works no matter the webserver.
 

Seems like the function stream_get_meta_data() will fill the job.. 

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



RE: RE: [PHP] php mysql--mysqli persistent connections...

2004-07-30 Thread John Holmes
 i'm going to need to do transactional processing across 
 multiple pages for a test app. 

Not going to happen. That's not how persistant connections work and not what they are 
for. You'll need to come up with a different method. 

---John Holmes...

UCCASS - PHP Survey System
http://www.bigredspark.com/survey.html

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



Re: [PHP] UML

2004-07-30 Thread Colin Kettenacker
[EMAIL PROTECTED] [EMAIL PROTECTED] on 7/30/04 12:14 PM wrote:

 Now that PHP is OOP with 5.0 is there a UML tool dedicated to PHP?
 

Well it is not dedicated to PHP, but the latest release of ArgoUML can
output to PHP 5.0 (haven't tried it myself yet).

ck
-- 
Cheap Domain Registration | Web Hosting | Email Packages | + more
Fantastic prices -- Even better service.
http://www.hosttohost.net 

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



[PHP] db transactions across multiple pages...

2004-07-30 Thread bruce
i can't be the only one to need to do this

since it appears that php5/mysqli no longer supports pconnect, how does this
get done???

it almost seems that there needs to be a small intermediate server/app that
php would talk to, that would in turn talk with the mysql server. this app
would essentially make the connection, and maintain the connection with the
mysql db/server. the php app could then be free to make any required calls
with the mysql db, knowing that there's a persistent connection available
from the intermediate server.

in essence, the intermediate server would basically be a container for db
connections...

comments/criticisms/etc...

-bruce



-Original Message-
From: bruce [mailto:[EMAIL PROTECTED]
Sent: Friday, July 30, 2004 11:33 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: RE: [PHP] php mysql--mysqli persistent connections...


never worked with them

but i'm getting close in an app that i believes requires them...

i'm going to need to do transactional processing across multiple pages for a
test app. i was looking at the mysqli functions which work for the
rollback/commit which is ok. but it's my understanding that once the page
closes, the db connection is lost, which would trigger a rollback of any db
queries/processing currently in process. however, if i had a persistent
connection, then the connection should be open, and the rollback shouldn't
be triggered, and the app could proceed with the db processing, followed by
a commit!

at least this was the plan, until i couldn't find the persistent hook within
mysqli...

what am i missing..??

-bruce


-Original Message-
From: John Holmes [mailto:[EMAIL PROTECTED]
Sent: Friday, July 30, 2004 11:09 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: RE: [PHP] php mysql--mysqli persistent connections...


 php/mysql supported persistent connections..

Have you ever used persistant connections. I don't think they work the way
you are thinking. Persistant connections rarely had any benifit except in
certain server configurations.

---John Holmes...

UCCASS - PHP Survey System
http://www.bigredspark.com/survey.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] MAX_FILE_SIZE

2004-07-30 Thread Monty
This is what is says in the online php manual:

... You should add the MAX_FILE_SIZE form variable anyway as it saves users
the trouble of waiting for a big file being transferred only to find that it
was too big and the transfer actually failed.

... The MAX_FILE_SIZE hidden field must precede the file input field. Also,
be sure your file upload form has enctype=multipart/form-data.

I have done all of the above, however, the file is ALWAYS uploaded first
before the filesize is checked (which then generates an error 2 stored in
the $_FILES array). This isn't horrible for small files, but, for larger
files it sucks that the user has to wait for the entire file to upload first
before being told it's too big.

If the MAX_FILE_SIZE form variable doesn't prevent this, as the manual says
it should, then what's the point of using it?

I'm using PHP 4.3.2 on Redhat Linux ES 3.0.

Monty

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



Re: [PHP] db transactions across multiple pages...

2004-07-30 Thread John Nichel
bruce wrote:
i can't be the only one to need to do this
since it appears that php5/mysqli no longer supports pconnect, how does this
get done???
it almost seems that there needs to be a small intermediate server/app that
php would talk to, that would in turn talk with the mysql server. this app
would essentially make the connection, and maintain the connection with the
mysql db/server. the php app could then be free to make any required calls
with the mysql db, knowing that there's a persistent connection available
from the intermediate server.
in essence, the intermediate server would basically be a container for db
connections...
comments/criticisms/etc...
-bruce
I'm not sure I understand what it is exactly you want to do.  Is it that 
you want to open a connection to the db on page one, and have that 
connection remain open on pages two, three, etc.?  If that's the case, I 
don't think (I could be wrong, never used pconnect) pconnect ever did 
this.  My understanding is that PHP will close _all_ db connections when 
the page is finished executing, no matter how that connection was opened.

If this is what you want to do, why do you need the connection to remain 
open after a page executes?  No queries are going to be run after 
execution stops.

--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] help with regex

2004-07-30 Thread C.F. Scheidecker Antunes
Hello,
I has as the output of a unzip command called from a PHP script the 
following:

unzip test.zip
Archive:  test.zip
 inflating: arch1.txt
 inflating: arch2.txt
 inflating: arch3.txt
 inflating: arch4.txt
 inflating: arch5.txt
 inflating: arch6.txt
The same I have from a pkware execution :
pkunzip teste.zip
PKZIP(R)  Version 6.0  FAST!  Compression Utility for Linux X86
Copyright 1989-2002 PKWARE Inc.  All Rights Reserved. Evaluation Version
PKZIP Reg. U.S. Pat. and Tm. Off.  Patent No. 5,051,745
Extracting files from .ZIP: teste.zip
   Inflating: arch1.txt
   Inflating: arch2.txt
   Inflating: arch3.txt
   Inflating: arch4.txt
   Inflating: arch5.txt
So, I need some help on how to write a regexp to get the values after 
inflating, that is the filenames, and put them in an array. Both outputs 
above are stored on a $stdout php variable.

Also, I need to be able to indentify errors with the unzip utility that 
does not support some types of zip file, the output is like this:

unzip test1.zip
Archive:  test1.zip
  skipping: test1.txt  `shrink' method not supported
There's a skipping instead of a inflating or Inflating in pkware.
The third situation is an error on the zip file itself :
unzip test2.zip
Archive:  test2.zip
 End-of-central-directory signature not found.  Either this file is not
 a zipfile, or it constitutes one disk of a multi-part archive.  In the
 latter case the central directory and zipfile comment will be found on
 the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of test2.zip or
   test2.zip.zip, and cannot find test2.zip.ZIP, period.
or
pkunzip test2.zip
PKZIP(R)  Version 6.0  FAST!  Compression Utility for Linux X86
Copyright 1989-2002 PKWARE Inc.  All Rights Reserved. Evaluation Version
PKZIP Reg. U.S. Pat. and Tm. Off.  Patent No. 5,051,745
Extracting files from .ZIP: test2.zip
Errors were found in .ZIP file, attempt to fix (Yes/No)? N
PKZIP: (Z152) No CE signature found
Help is much appreacited.
Thanks in advance.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] db transactions across multiple pages...

2004-07-30 Thread bruce
we want to have the ability to perform db queries/actions with the db across
multiple pages.

the pconnect supposedly allowed an app to use the same connection if one was
available. so an app would establish the connection on page 1, and page 2
could use the same db connection... this is required as i understand it if
you're going to do transactional processing, as once the connect dies, the
actions being performed are rolled back if you haven't done a commit...

-bruce


-Original Message-
From: John Nichel [mailto:[EMAIL PROTECTED]
Sent: Friday, July 30, 2004 1:45 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] db transactions across multiple pages...


bruce wrote:
 i can't be the only one to need to do this

 since it appears that php5/mysqli no longer supports pconnect, how does
this
 get done???

 it almost seems that there needs to be a small intermediate server/app
that
 php would talk to, that would in turn talk with the mysql server. this app
 would essentially make the connection, and maintain the connection with
the
 mysql db/server. the php app could then be free to make any required calls
 with the mysql db, knowing that there's a persistent connection available
 from the intermediate server.

 in essence, the intermediate server would basically be a container for db
 connections...

 comments/criticisms/etc...

 -bruce

I'm not sure I understand what it is exactly you want to do.  Is it that
you want to open a connection to the db on page one, and have that
connection remain open on pages two, three, etc.?  If that's the case, I
don't think (I could be wrong, never used pconnect) pconnect ever did
this.  My understanding is that PHP will close _all_ db connections when
the page is finished executing, no matter how that connection was opened.

If this is what you want to do, why do you need the connection to remain
open after a page executes?  No queries are going to be run after
execution stops.

--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]

--
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] upload_tmp_dir Not Working

2004-07-30 Thread Monty
In my .htaccess file I have...

php_value upload_tmp_dir /home/site/temp

But when I upload a file using a form, here's what the $_FILE array prints
out:

[tmp_name] = /temp/phpvRRDss

/temp is a valid directory, but, it's not the directory I specified in the
.htaccess file for this site.

So, obviously PHP is not using my temp directory, or it's not reporting the
proper temp directory in the $_FILES array.

I also tried adding this to my httpd.conf file within the site's VirtualHost
directives, but, that didn't work either (yes, I restarted Apache first).

Anyone have any insight on this??

Thanks!  - Monty

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



Re: [PHP] db transactions across multiple pages...

2004-07-30 Thread John Nichel
bruce wrote:
we want to have the ability to perform db queries/actions with the db across
multiple pages.
the pconnect supposedly allowed an app to use the same connection if one was
available. so an app would establish the connection on page 1, and page 2
could use the same db connection... this is required as i understand it if
you're going to do transactional processing, as once the connect dies, the
actions being performed are rolled back if you haven't done a commit...
-bruce
You're right...according to the docs, my understanding of what pconnect 
did was wrong.  I can't find where it says that this feature is going 
away in php5 though.

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


[PHP] Page load based on logic

2004-07-30 Thread Michael Harding
I have a if statement.

if (this){
load page1.php;
} else {
load page2.php;
}

I simply want to go to different page depending on the results of a logic
statement.  I can't find a function or statement that allow me to pass the
page to.  I am looking for a load() or goto() type call.

I do NOT want to do the header thing and reload the same page back onto
itself.

I can't believe a language as powerful as PHP does have this basic function.
I must be missing it.

Any suggestions?

Thanks.

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



RE: [PHP] db transactions across multiple pages...

2004-07-30 Thread bruce
not sure if it's php/mysqli... but if you check the php.net for the mysqli
not mysql functions... you won't see the persistent attribute listed for
the php.ini attributes...

-bruce

you're learning more every day


-Original Message-
From: John Nichel [mailto:[EMAIL PROTECTED]
Sent: Friday, July 30, 2004 2:15 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] db transactions across multiple pages...


bruce wrote:
 we want to have the ability to perform db queries/actions with the db
across
 multiple pages.

 the pconnect supposedly allowed an app to use the same connection if one
was
 available. so an app would establish the connection on page 1, and page 2
 could use the same db connection... this is required as i understand it if
 you're going to do transactional processing, as once the connect dies, the
 actions being performed are rolled back if you haven't done a commit...

 -bruce

You're right...according to the docs, my understanding of what pconnect
did was wrong.  I can't find where it says that this feature is going
away in php5 though.

--
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] db transactions across multiple pages...

2004-07-30 Thread Pablo Gosse
snip
 the pconnect supposedly allowed an app to use the same connection if
 one was available. so an app would establish the connection on page
 1, and page 2 could use the same db connection... this is required as
 i understand it if you're going to do transactional processing, as
 once the connect dies, the actions being performed are rolled back if
 you haven't done a commit... 
/snip

AFAIK, transactions do not span across multiple script executions, only
multiple queries within the same script execution.

The purpose of a persistent connection is to reduce the total number of
db connections which are open to a server.  AFAIK a persistent
connection will be reused when a request is made for a connection with a
specific username, password and db, and one already exists with said
parameters.

AFAIK it has nothing to do with transactions spanning multiple script
executions.

Once a script has finished executing, as a previous poster wrote, PHP
will close the connection (if it's persistent it's left in the pool to
be reused) and if a transaction was not commited or rolled back, then it
will be rolled back by default.

So if you have one php script which starts a transaction and then
executes five queries, at the end of that script being executed unless
you commit the transaction, it will be rolled back by default.  Even if
you are using persistent connections, if this were to happen the
transaction would still be rolled back.

This is all AFAIK, so I could be wrong.  If I've put some incorrect
information here, please correct it and let me know where I've gone
wrong.

Cheers and HTH,

Pablo

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



[PHP] Re: Page load based on logic

2004-07-30 Thread Tino Didriksen
Michael Harding wrote:
I have a if statement.
if (this){
load page1.php;
} else {
load page2.php;
}
I simply want to go to different page depending on the results of a logic
statement.  I can't find a function or statement that allow me to pass the
page to.  I am looking for a load() or goto() type call.
I do NOT want to do the header thing and reload the same page back onto
itself.
I can't believe a language as powerful as PHP does have this basic function.
I must be missing it.
Any suggestions?
Thanks.
require_once() seems suitable.
-- Tino Didriksen / Project JJ
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Is preg_quote() UTF8 safe?

2004-07-30 Thread Tino Didriksen
Is preg_quote() UTF8 safe?
Or any other mb_string encoding really, but for me UTF8 is the important
one.
As far as I can see from the source it does not check encodings, but I
don't know if there would ever be conflicts even without such a check.
-- Tino Didriksen / Project JJ
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Maintaining sessions across multiple sites

2004-07-30 Thread Rodolfo Gonzalez Gonzalez
On Fri, 30 Jul 2004, Tom Rogers wrote:

 RD I'm in the process of building an application that has an adminstration
 RD back-end shared by multiple sites. I need to maintain a persistent session

 msession is designed for just this purpose


how reliable msession is?. I'm interested on it too.


Regards.

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



Re: [PHP] MAX_FILE_SIZE

2004-07-30 Thread Jason Wong
On Saturday 31 July 2004 04:40, Monty wrote:

 If the MAX_FILE_SIZE form variable doesn't prevent this, as the manual says
 it should, then what's the point of using it?

It's up to the browser whether or not it uses that setting, most don't.

-- 
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
--
/*
Don't relax!  It's only your tension that's holding you together.
*/

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



Re: [PHP] upload_tmp_dir Not Working

2004-07-30 Thread Justin Patrin
On Fri, 30 Jul 2004 17:08:46 -0400, Monty [EMAIL PROTECTED] wrote:
 In my .htaccess file I have...
 
 php_value upload_tmp_dir /home/site/temp
 
 But when I upload a file using a form, here's what the $_FILE array prints
 out:
 
 [tmp_name] = /temp/phpvRRDss
 
 /temp is a valid directory, but, it's not the directory I specified in the
 ..htaccess file for this site.
 
 So, obviously PHP is not using my temp directory, or it's not reporting the
 proper temp directory in the $_FILES array.
 
 I also tried adding this to my httpd.conf file within the site's VirtualHost
 directives, but, that didn't work either (yes, I restarted Apache first).
 
 Anyone have any insight on this??
 

Perhaps try putting it in your php.ini where it belongs? Perhaps this
is a non-overrideable value.

-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

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



Re: [PHP] Page load based on logic

2004-07-30 Thread Justin Patrin
On Fri, 30 Jul 2004 17:12:01 -0400, Michael Harding
[EMAIL PROTECTED] wrote:
 I have a if statement.
 
 if (this){
 load page1.php;
 } else {
 load page2.php;
 }
 
 I simply want to go to different page depending on the results of a logic
 statement.  I can't find a function or statement that allow me to pass the
 page to.  I am looking for a load() or goto() type call.
 
 I do NOT want to do the header thing and reload the same page back onto
 itself.
 
 I can't believe a language as powerful as PHP does have this basic function.
 I must be missing it.
 
 Any suggestions?
 

if($cond == true) {
  include('page1.php');
} else {
  include('page2.php');
}

-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

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



[PHP] Re: upload_tmp_dir Not Working

2004-07-30 Thread Mark Collin
Have you phsyically checked what is in /home/site/temp/ directory ?

I suspect the file is being placed there but php is just referring to it 
as /temp/

Monty [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]:
 In my .htaccess file I have...

 php_value upload_tmp_dir /home/site/temp

 But when I upload a file using a form, here's what the $_FILE array
 prints
 out:

 [tmp_name] = /temp/phpvRRDss

 /temp is a valid directory, but, it's not the directory I specified in
 the
 .htaccess file for this site.

 So, obviously PHP is not using my temp directory, or it's not reporting
 the
 proper temp directory in the $_FILES array.

 I also tried adding this to my httpd.conf file within the site's
 VirtualHost
 directives, but, that didn't work either (yes, I restarted Apache
 first).

 Anyone have any insight on this??

 Thanks!  - Monty

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



Re: [PHP] upload_tmp_dir Not Working

2004-07-30 Thread Monty

 On Fri, 30 Jul 2004 17:08:46 -0400, Monty [EMAIL PROTECTED] wrote:
 In my .htaccess file I have...
 
 php_value upload_tmp_dir /home/site/temp
 
 But when I upload a file using a form, here's what the $_FILE array prints
 out:
 
 [tmp_name] = /temp/phpvRRDss
 
 /temp is a valid directory, but, it's not the directory I specified in the
 ..htaccess file for this site.
 
 So, obviously PHP is not using my temp directory, or it's not reporting the
 proper temp directory in the $_FILES array.
 
 I also tried adding this to my httpd.conf file within the site's VirtualHost
 directives, but, that didn't work either (yes, I restarted Apache first).
 
 Anyone have any insight on this??
 
 
 Perhaps try putting it in your php.ini where it belongs? Perhaps this
 is a non-overrideable value.
 

The PHP manual says that the upload_tmp_dir setting is PHP_INI_SYSTEM, so,
it can be set in php.ini or httpd.conf.

That explains why it won't work in .htaccess, but, not why it didn't work in
httpd.conf. Where in the httpd.conf file does this need to go then? The
online docs don't say. I don't want this to be global, I want a different
upload_tmp_dir for each site. But, if it can only be set in PHP.INI, then I
guess this isn't possible??

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



[PHP] Re: Replace a button by an image

2004-07-30 Thread Harlequin
Henri.

I prefer to use CSS for things like this but I'm sure PHP has it's own
idiosyncrasies.

I checked out the site posted in response to your post and personally
thought the graphics were a bit ropey.

typically CSS is used for replacing images or backgrounds on hover but is
very flexible and quick to load an alternate image but it could just as
easily be applied to static images such as buttons etc.

Feel free to drop me a line if you need any pointers.

-- 
-
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-
Henri marc [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hello,

 Is it possible to replace a button by an image with
 PHP?

 Thanks!

 Dave






 Vous manquez d'espace pour stocker vos mails ?
 Yahoo! Mail vous offre GRATUITEMENT 100 Mo !
 Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/

 Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés
pour dialoguer instantanément avec vos amis. A télécharger gratuitement sur
http://fr.messenger.yahoo.com

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



[PHP] Re: A native Windows binding for PHP

2004-07-30 Thread Manuel Lemos
Hello,
On 07/30/2004 06:32 PM, Rubem Pechansky wrote:
On the other hand you can always open the source of the library and 
develop closed source extensions or tools that make the development of 
your library more powerful and useful so it will be an advantage for 
people to buy those extensions and tools from you instead of developing 
themselves.

This is exactly what I have in mind. If I want this tool to be useful
and popular, I know I can't make people pay for it, at least for
non-commercial use (thanks, Hayden). But for that to happen I must
first find a partner company who wants to invest a little bit and then
add it to their portfolio. I think this is the best way to make it
free.
Right, but before you release anything it is going to be hard to 
demonstrate to any partner/investor that what you have is interesting 
and has business potential because besides yourself you do not have any 
user base to show or even poll for potential business case.

If I were you, I would probably develop some tools to address specific 
needs of some clients that would pay so you can justify dedicating full 
time development of your library and tools. Releasing your library to 
the public would either provide you a user base to test it and suggest 
improvement as well a potential client base to provide you hints on 
possible products or services they would be willing to pay.

--
Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


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

2004-07-30 Thread Tom Rogers
Hi,

Saturday, July 31, 2004, 7:34:08 AM, you wrote:
RGG On Fri, 30 Jul 2004, Tom Rogers wrote:

RGG how reliable msession is?. I'm interested on it too.

RGG Regards.
I have been using it for several years now as my default session
handler and it has never once failed me, so I would say from my point
of view it is extremly reliable. I have a class which handles all the
messy stuff which your quite welcome to have and see how it can be
used.

-- 
regards,
Tom

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



Re: [PHP] Replace a button by an image

2004-07-30 Thread PHP Gen



 Jay Blanchard wrote:
  Yes, anything is possible.
 
 Can I be the next Queen of England?
 
 -- 
 John C. Nichel

Anythings possible...and with all your choices you
want to be an old fart??

:-)



=
--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)



__
Do you Yahoo!?
Y! Messenger - Communicate in real time. Download now. 
http://messenger.yahoo.com

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



Re: [PHP] upload_tmp_dir Not Working

2004-07-30 Thread Justin Patrin
On Fri, 30 Jul 2004 18:05:54 -0400, Monty [EMAIL PROTECTED] wrote:
 
  On Fri, 30 Jul 2004 17:08:46 -0400, Monty [EMAIL PROTECTED] wrote:
  In my .htaccess file I have...
 
  php_value upload_tmp_dir /home/site/temp
 
  But when I upload a file using a form, here's what the $_FILE array prints
  out:
 
  [tmp_name] = /temp/phpvRRDss
 
  /temp is a valid directory, but, it's not the directory I specified in the
  ..htaccess file for this site.
 
  So, obviously PHP is not using my temp directory, or it's not reporting the
  proper temp directory in the $_FILES array.
 
  I also tried adding this to my httpd.conf file within the site's VirtualHost
  directives, but, that didn't work either (yes, I restarted Apache first).
 
  Anyone have any insight on this??
 
 
  Perhaps try putting it in your php.ini where it belongs? Perhaps this
  is a non-overrideable value.
 
 
 The PHP manual says that the upload_tmp_dir setting is PHP_INI_SYSTEM, so,
 it can be set in php.ini or httpd.conf.
 
 That explains why it won't work in .htaccess, but, not why it didn't work in
 httpd.conf. Where in the httpd.conf file does this need to go then? The
 online docs don't say. I don't want this to be global, I want a different
 upload_tmp_dir for each site. But, if it can only be set in PHP.INI, then I
 guess this isn't possible??
 

I believe that if it's PHP_INI_SYSTEM, it has to be for the whole
system. If you're setting it per-domain or directory or something in
httpd.conf, that's probably why it's not working.

I don't see why this would matter as you can immediately move it
wherever you want it.

-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

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



  1   2   >