[PHP] Re: Option value

2002-10-16 Thread BAROILLER

you can do this with javascript calls.


Uma Shankari T. [EMAIL PROTECTED] a écrit dans le message
de news: [EMAIL PROTECTED]


 Hello,

   Is it possible to extract the value option which item name selected..for
 example i am having list of soap brand in the options..is it possible that
 to tell that the user seleced this brand of soap while in the submittion
 of the form..can any one please tell me how to do this..


 Regards,
 Uma




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




RE: [PHP] Re: PHP XML

2002-10-16 Thread Simon Taylor

To me this is a lot of work and processing for limited benefits, a simple db
abstraction layer provides you with a divide between you db queries and the
presentation of your site, what benefits do you see in doing this?
Cheers
Simon

-Original Message-
From: Alexandru COSTIN [mailto:[EMAIL PROTECTED]] 
Sent: 15 October 2002 18:50
To: [EMAIL PROTECTED]
Subject: [PHP] Re: PHP  XML


Hello,

Most of what you are looking for is already implemented and fully working in

our Krysalis Professional platform.

We help you create dynamic XML files, we provide you reusable taglibs  to 
avoid rewriting similar code multiple times, wr provide various levels of 
caching and many more.

Please se more details at : http://www.interakt.ro/products/

Alexandru

 Let me preface this by saying that I know the benefits of using XML 
 with regards to portability and extensibility. Here is the issue I 
 face.  I have all of my data stored in a MySQL database.  I'm 
 considering reworking my website so that it uses XML (after being 
 converted from resultant records in my DB) to transmit  XSLT to 
 transform and display the data to my end user. There are a few 
 benifits I can see in sending XML messages as part of the back end 
 processing.  However, that seems to be out- weighed by the amount of 
 processing that's going to need to take place in actually serving the 
 data to the user. First I have to query and pull the records from the 
 database.  Then, I need to send those records to a function (or 
 functions) to convert it to XML.  Then, I need to take that XML data 
 and have PHP use an XSL stylesheet to transform it to HTML before it, 
 finally, gets sent on to the browser.  So that's basically 2 
 conversions that take place on the back end.
 How much experience have any of you had with doing that?  Does
 it take significantly longer to serve the pages; is there a noticible
 performance hit?  Do you realize more benifit for the back end
 processes when using XML that makes any additional time it takes
 to display a page to the user worth it?
 I'd love to hear about people's experience with this kind of thing so I
 can better make a decision wrt whether or not I should even go down
 this route.
 
 thnx,
 Chris


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

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




[PHP] test

2002-10-16 Thread BAROILLER Pierre-Emmanuel

only to see if i can post messages 



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




Re: [PHP] Fedex rate calculator

2002-10-16 Thread arvind

Hi  Dwalker,

Fedex has changed the site after sep 22 2002.Most of the scripts i got where
for the
http://rate.dmz.fedex.com/servlet/RateFinderServlet?orig_country=USlanguage
=english link which does not work any more.


Arvind
Dwalker [EMAIL PROTECTED] wrote in message
01c274db$0bbeaae0$d07623c7@b">news:01c274db$0bbeaae0$d07623c7@b...
 http://www.phpbuilder.com/snippet/detail.php?type=snippetid=413


 THIS E-MAIL MESSAGE AND ALL ATTACHMENTS TRANSMITTED HEREWITH ARE TRADE
 SECRET AND/OR CONFIDENTIAL INFORMATION INTENDED ONLY FOR THE VIEWING AND
 USE OF ADDRESSEE.  IF THE READER OF THIS MESSAGE IS NOT THE INTENDED
 RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY REVIEW, USE, COMMUNICATION,
 DISSEMINATION, DISTRIBUTION OR COPYING OF THIS COMMUNICATION IS
PROHIBITED.
 IF YOU HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY THE SENDER
 IMMEDIATELY BY TELEPHONE OR ELECTRONIC MAIL, AND DELETE THIS MESSAGE AND
 ALL COPIES AND BACKUPS THEREOF.  THANK YOU FOR YOUR COOPERATION.

 -Original Message-
 From: arvind [EMAIL PROTECTED]
 To: [EMAIL PROTECTED] [EMAIL PROTECTED]
 Date: Wednesday, October 16, 2002 12:55 AM
 Subject: [PHP] Fedex rate calculator


 hi all,
 
 Where can i get the fedex rate calculator in php for the new fedex
 site?.Fedex has changed the earlier url for the rates and my old script
 have
 stopped working .
 Anyone can help me out on this ?
 
 
 Thanks
 @rvi
 
 
 
 --
 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] Want to exclude first 10 records from table

2002-10-16 Thread Manisha

I am having forum table. First 10 records are treated as Current postings 
and rest are treated as Archive.

I know how to take first 10

select * from forum order by postdate desc LIMIT 10

But I do not know how to take postings excluding above 10. I do not want to 
make use of loop rather I want to do this in one single query as I need to 
pass this to some further include files.

Thanks in advance
Manisha


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




Re: [PHP] Fedex rate calculator

2002-10-16 Thread dwalker

It may be too soon for anyone to have gotten around to the task of putting
together a new PHP script for the new rates.  Has EVERYTHING changed or just
a few things?  Will FEDEX help you out?


THIS E-MAIL MESSAGE AND ALL ATTACHMENTS TRANSMITTED HEREWITH ARE TRADE
SECRET AND/OR CONFIDENTIAL INFORMATION INTENDED ONLY FOR THE VIEWING AND
USE OF ADDRESSEE.  IF THE READER OF THIS MESSAGE IS NOT THE INTENDED
RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY REVIEW, USE, COMMUNICATION,
DISSEMINATION, DISTRIBUTION OR COPYING OF THIS COMMUNICATION IS PROHIBITED.
IF YOU HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY THE SENDER
IMMEDIATELY BY TELEPHONE OR ELECTRONIC MAIL, AND DELETE THIS MESSAGE AND
ALL COPIES AND BACKUPS THEREOF.  THANK YOU FOR YOUR COOPERATION.

-Original Message-
From: arvind [EMAIL PROTECTED]
To: [EMAIL PROTECTED] [EMAIL PROTECTED]
Date: Wednesday, October 16, 2002 1:40 AM
Subject: Re: [PHP] Fedex rate calculator


Hi  Dwalker,

Fedex has changed the site after sep 22 2002.Most of the scripts i got
where
for the
http://rate.dmz.fedex.com/servlet/RateFinderServlet?orig_country=USlanguag
e
=english link which does not work any more.


Arvind
Dwalker [EMAIL PROTECTED] wrote in message
01c274db$0bbeaae0$d07623c7@b">news:01c274db$0bbeaae0$d07623c7@b...
 http://www.phpbuilder.com/snippet/detail.php?type=snippetid=413


 THIS E-MAIL MESSAGE AND ALL ATTACHMENTS TRANSMITTED HEREWITH ARE TRADE
 SECRET AND/OR CONFIDENTIAL INFORMATION INTENDED ONLY FOR THE VIEWING AND
 USE OF ADDRESSEE.  IF THE READER OF THIS MESSAGE IS NOT THE INTENDED
 RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY REVIEW, USE, COMMUNICATION,
 DISSEMINATION, DISTRIBUTION OR COPYING OF THIS COMMUNICATION IS
PROHIBITED.
 IF YOU HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY THE
SENDER
 IMMEDIATELY BY TELEPHONE OR ELECTRONIC MAIL, AND DELETE THIS MESSAGE AND
 ALL COPIES AND BACKUPS THEREOF.  THANK YOU FOR YOUR COOPERATION.

 -Original Message-
 From: arvind [EMAIL PROTECTED]
 To: [EMAIL PROTECTED] [EMAIL PROTECTED]
 Date: Wednesday, October 16, 2002 12:55 AM
 Subject: [PHP] Fedex rate calculator


 hi all,
 
 Where can i get the fedex rate calculator in php for the new fedex
 site?.Fedex has changed the earlier url for the rates and my old script
 have
 stopped working .
 Anyone can help me out on this ?
 
 
 Thanks
 @rvi
 
 
 
 --
 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] File upload and php... not a beginner question...

2002-10-16 Thread Baroiller Pierre-Emmanuel

Hi,

everyone know how to upload files from the browser to your web server using
multipart-form method with move_downloaded_file() php function.

But... It's a slow method for multiple files  huge files transfert.

I'm currently working on a big photo album tool, and I want to provide user
the ability to upload a lot of jpeg files in one time...
The big problem with form is it's too slow...

Does anyone know how to by-pass this ( with java or other tools )?



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




RE: [PHP] File upload and php... not a beginner question...

2002-10-16 Thread David Freeman


  I'm currently working on a big photo album tool, and I want 
  to provide user
  the ability to upload a lot of jpeg files in one time...
  The big problem with form is it's too slow...
  
  Does anyone know how to by-pass this ( with java or other 
  tools )?

It's primarly slow because of the time it takes to upload the files -
the larger the files and the slower the link, the longer it will take.
There isn't a whole lot that you can do about this with java or any
other tricks.

Depending on your audience and requirements you could always just
teach/ask people to use ftp where they at least get some feedback on the
upload process.

CYA, Dave




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




[PHP] Re: Need help with HTTP-Authentication

2002-10-16 Thread BAROILLER

Hi,

a simple question.. :)
how do you do ?
You can use 2 methods :
with a .htaccess file on your webserver, updated with your table fields
or a direct authentification with http headers and a little bit of php...
Tell me more? may be I could help you.

Regards,
P.E. Baroiller

Davy Obdam [EMAIL PROTECTED] a écrit dans le message de news:
001901c2747e$fa0184a0$[EMAIL PROTECTED]
 Hi People,.

 I have a problem with HTTP-Authentication, i have 2 users in my
 database, and i want both to be able to login. However it works, but
 only the first user is able to login. I Use a MySQL 3.23.xx database,
 PHP 4.2.3 and Apache 2.0.40. Can anyone help me with this, any help
 would be greatly apreciated. Thanks already;-)Maybe some examples?? ;-)

 Best regards,

 Davy Obdam,
 mailto:[EMAIL PROTECTED]







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




[PHP] file upload and php (Not a begginer question!)

2002-10-16 Thread Baroiller Pierre-Emmanuel

Hi,

everyone know how to upload files from the browser to your web server using
multipart-form method with move_downloaded_file() php function.

But... It's a slow method for multiple files  huge files transfert.

I'm currently working on a big photo album tool, and I want to provide user
the ability to upload a lot of jpeg files in one time...
The big problem with form is it's too slow...

Does anyone know how to by-pass this ( with java or other tools )?



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




Re: [PHP] Want to exclude first 10 records from table

2002-10-16 Thread Jason Wong

On Wednesday 16 October 2002 14:44, Manisha wrote:
 I am having forum table. First 10 records are treated as Current postings
 and rest are treated as Archive.

 I know how to take first 10

 select * from forum order by postdate desc LIMIT 10

 But I do not know how to take postings excluding above 10. I do not want to
 make use of loop rather I want to do this in one single query as I need to
 pass this to some further include files.

Use LIMIT -- rtfm for the database you're using for details.

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
It's not hard to admit errors that are [only] cosmetically wrong.
-- J.K. Galbraith
*/


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




[PHP] Re: Want to exclude first 10 records from table

2002-10-16 Thread arvind

Try this,

To retrieve all rows from a certain offset upto the end of the result set,
you can use -1 for the second parameter:
mysql SELECT * FROM table LIMIT 95,-1; # Retrieve rows 96-last.

Manisha [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I am having forum table. First 10 records are treated as Current postings
 and rest are treated as Archive.

 I know how to take first 10

 select * from forum order by postdate desc LIMIT 10

 But I do not know how to take postings excluding above 10. I do not want
to
 make use of loop rather I want to do this in one single query as I need to
 pass this to some further include files.

 Thanks in advance
 Manisha




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




Re: [PHP] Re: Need help with HTTP-Authentication

2002-10-16 Thread dwalker

direct authentication with http headers

?php
file://if some_variable is NOT set then redirect to some other location
session_start();
  if (!isset($HTTP_GET_VARS[some_variable])) {

header( 'Location:
http://www.yourfavoritepage.com/login.php?v=nogo' );
}
?
html
!-- Your html code goes here --
/html

THIS E-MAIL MESSAGE AND ALL ATTACHMENTS TRANSMITTED HEREWITH ARE TRADE
SECRET AND/OR CONFIDENTIAL INFORMATION INTENDED ONLY FOR THE VIEWING AND
USE OF ADDRESSEE.  IF THE READER OF THIS MESSAGE IS NOT THE INTENDED
RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY REVIEW, USE, COMMUNICATION,
DISSEMINATION, DISTRIBUTION OR COPYING OF THIS COMMUNICATION IS PROHIBITED.
IF YOU HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY THE SENDER
IMMEDIATELY BY TELEPHONE OR ELECTRONIC MAIL, AND DELETE THIS MESSAGE AND
ALL COPIES AND BACKUPS THEREOF.  THANK YOU FOR YOUR COOPERATION.

-Original Message-
From: BAROILLER [EMAIL PROTECTED]
To: [EMAIL PROTECTED] [EMAIL PROTECTED];
[EMAIL PROTECTED] [EMAIL PROTECTED]; [EMAIL PROTECTED]
[EMAIL PROTECTED]
Date: Wednesday, October 16, 2002 2:15 AM
Subject: [PHP] Re: Need help with HTTP-Authentication


Hi,

a simple question.. :)
how do you do ?
You can use 2 methods :
with a .htaccess file on your webserver, updated with your table fields
or a direct authentification with http headers and a little bit of php...
Tell me more? may be I could help you.

Regards,
P.E. Baroiller

Davy Obdam [EMAIL PROTECTED] a écrit dans le message de news:
001901c2747e$fa0184a0$[EMAIL PROTECTED]
 Hi People,.

 I have a problem with HTTP-Authentication, i have 2 users in my
 database, and i want both to be able to login. However it works, but
 only the first user is able to login. I Use a MySQL 3.23.xx database,
 PHP 4.2.3 and Apache 2.0.40. Can anyone help me with this, any help
 would be greatly apreciated. Thanks already;-)Maybe some examples?? ;-)

 Best regards,

 Davy Obdam,
 mailto:[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] test..

2002-10-16 Thread BAROILLER

don't replay, thanks.. It's only to see if i can post messages...



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




RE: [PHP] Want to exclude first 10 records from table

2002-10-16 Thread Smith, Benjamin

select * from forum order by postdate desc LIMIT 10, -1

Assuming you are using MySQL of course.

See the official documentation for further assistance:

http://www.mysql.com/doc/en/SELECT.html

-Original Message-
From: Manisha [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 16 October 2002 4:44 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Want to exclude first 10 records from table


I am having forum table. First 10 records are treated as Current postings 
and rest are treated as Archive.

I know how to take first 10

select * from forum order by postdate desc LIMIT 10

But I do not know how to take postings excluding above 10. I do not want to 
make use of loop rather I want to do this in one single query as I need to 
pass this to some further include files.

Thanks in advance
Manisha


-- 
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] Installing PHP 4.2.3 with Apache 2.0.43 on WinXP Home Edition

2002-10-16 Thread Kjartan Mannes

Wednesday, October 16, 2002, 6:27:12 AM, Reginald Alex Mullin wrote:
 I've been trying to get PHP working on my WinXP machine for the past few
 days now, but have been unsucessful.  The Apache web server itself starts 
 and works fine (without PHP), but whenever I try loading the PHP module, it 
 doesn't restart.  Instead, I get the following error message: The 
 requested operation has failed.  I don't quite know what the problem is 
 because the error log doesn't tell me much (see error.log snipit code 
 below).  I think I've configured both PHP and Apache correctlty (see 
 php.ini and httpd.conf snipit code below), but I'm obviously missing 
 something.  If anyone can help, please let me know.  Thank you.

Make sure you copied over the correct dll files to your Windows system
directory.

Copy php4ts.dll to c:\windows\system32.

See http://www.php.net/manual/en/install.windows.php for more
information.

-- 
Kjartan [EMAIL PROTECTED] (http://natrak.net/)
:: Those who never retract their opinions love themselves more
than they love the truth. - Joseph Joubert


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




Re: [PHP] How to use imap?

2002-10-16 Thread Kjartan Mannes

Wednesday, December 4, 2002, 8:15:26 AM, ns_andy wrote:
 I've imap-2001a.tar  downloaded,
 but don't know how to get it work?
 I am using Windows 2k ,
 Can I have the steps of installation of imap?

If you are running it on Windows just load the extension php_imap.dll in
your php.ini:

  extension=php_imap.dll

-- 
Kjartan [EMAIL PROTECTED] (http://natrak.net/)
:: Real programmers don't work from 9 to 5. If any real
programmers are around at 9am it's because they were up all
night.


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




Re: [PHP] $_SESSION

2002-10-16 Thread Paonarong Buachaiyo

Please, I' also have some question about  $_SESSION.

Simple, how can we earse all $SESSION variable except one or two variables.

Beacuse i want to show some error message in my login form when login
failed. i want to destroy all other $_SESSION variable (about 10) except
$_SESSION['errmsg'] and $_SESSION['errcount'].

Any way to do it except

unset($_SESSION['xx1']);
unset($_SESSION['xx2']);
unset($_SESSION['xx3']);
.
unset($_SESSION['xx10']);

Please,
Pao

John W. Holmes [EMAIL PROTECTED] wrote in message
000501c274a4$ed28ae40$7c02a8c0@coconut">news:000501c274a4$ed28ae40$7c02a8c0@coconut...
  Hi All,
 still trying to update old code. Am I using $_SESSION properly?
 
  snip
 if (mysql_num_rows($res) ==1){
 /* If correct start session*/
  session_start();
  $_SESSION['SESSION_UNAME'];
  $SESSION_UNAME = $user;
 
  header(Location: welcome.php);
  mysql_free_result ($res);
  /snip

 Nope. Just use $_SESSION['SESSION_UNAME'] = $user;

 You can treat $_SESSION just as you would any other array.

 $_SESSION['something'] = whatever;

 etc... Then, on any page with session_start(), you have the whole
 session array available to you, no matter what page the variable was
 initially created on.

 FYI: use unset($_SESSION['SESSION_UNAME']); to erase a session variable.

 ---John Holmes...





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




RE: [PHP] Re: PHP XML

2002-10-16 Thread Joshua Alexander

To me this is a lot of work and processing for limited benefits, a simple db
abstraction layer provides you with a divide between you db queries and the
presentation of your site, what benefits do you see in doing this?

I have to agree with Simon. I am at a loss when it comes to seeing 
any benefit to XML that doesn't involve data exchange between at 
least two parties.

I've spent the last two years building database-backed websites, so 
I'm constantly trying to improve how I build them in order to make 
design and maintenance easier... I used to rely heavily on SSI for 
this, and now I rely more on PHP... if XML would make things easier, 
believe me, I would LOVE to know how... but I just don't see it.

-Josh


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




[PHP] Pass trough streaming of files

2002-10-16 Thread David Nordenberg

Hello
I wonder if it is possible to do some kind of pass trough streaming of a
file in PHP without making the content go through the mmap process?
IE I want to make a PHP file that reads a mp3 file and sends it to the
listning client, possibly winamp but mmap caches the whole mp3 file before
starting to generate the output to the client. Is there some way to do this
with PHP?
A short example of what I want to do:
?
readfile(mymp3.mp3);
?
Ofcource my intention for this is more complicated then the example code I
wrote but you get the point :)
Doing this on a 100 meg mp3 file makes my server wanna retire :(

Regards David Nordenberg



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




[PHP] Bubble windows

2002-10-16 Thread Jason End

Remember those bubbles windows php.net used to have?
What are those actually called? Any tutorials that
show how to make them?

thanks, 

Jay

__
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos  More
http://faith.yahoo.com

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




RE: [PHP] Re: PHP XML

2002-10-16 Thread José León Serna

El mié, 16-10-2002 a las 10:22, Joshua Alexander escribió:
 I have to agree with Simon. I am at a loss when it comes to seeing 
 any benefit to XML that doesn't involve data exchange between at 
 least two parties.
 
 I've spent the last two years building database-backed websites, so 
 I'm constantly trying to improve how I build them in order to make 
 design and maintenance easier... I used to rely heavily on SSI for 
 this, and now I rely more on PHP... if XML would make things easier, 
 believe me, I would LOVE to know how... but I just don't see it.
Let's imagine you create a website of an online magazine, this magazine
publishes in HTML, PDF, TXT, PS, etc, etc, etc. How would you do it?

I would use XML to write the articles and then stylesheets to transform
the articles to the formats I want. Write once, publish anywhare ;-)

Regards
-- 
XPde :: XP-like desktop environment (developed with Kylix ;-)
http://www.xpde.com





signature.asc
Description: This is a digitally signed message part


[PHP] Read XML file

2002-10-16 Thread Christian Ista

Hello,

Look the code below. The code work I can see on the screen the value of 
each tags (except SOFT, no need it). I'd like now put the value in a 2 
dimensions array, for each tag, first cell the tag name, and the value in 
the second cell. Could you tell me the change to do ?

Thanks,

Christian,



?php
$parser = xml_parser_create();

xml_set_element_handler($parser, startElement, endElement);
xml_set_character_data_handler($parser, characterData);
$filehandler = fopen(FileXML.xml, r);

while ($data = fread($filehandler, 4096)) {
xml_parse($parser, $data, feof($filehandler));
}

fclose($filehandler);
xml_parser_free($parser);

function startElement($parser, $tag) {
switch($tag){
case SOFT:
break;

default :
break;
}

}

function endElement($parser, $tag) {
}   
string function characterData($parser_instance, $xml_data) {
echo $xml_data.'br';
}
?


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




[PHP] Script optimisation

2002-10-16 Thread Tony Crockford

Hi,

I'm sure this is an RTFM, but I'm not sure where I should be looking.

is it quicker for PHP to execute ? echo $var ? in blocks of html or to
echo all of the html and only have one ? and ?

I'm using a PHP script to write a lot of html files to hard disk and the
script execution time is climbing beyond the maximum set in PHP.ini
(I've changed the setting, but...)

I'm looking to shave milliseconds of each execution, any ideas, pointers
or tutorials you could point me to.

Thanks


Tony


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




RE: [PHP] Bubble windows

2002-10-16 Thread Jon Haworth

Hi Jason,

 Remember those bubbles windows php.net used to have?
 What are those actually called? Any tutorials that
 show how to make them?

http://www.php.net/manual/en/faq.misc.php#faq.misc.popup

HTH
Jon

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




RE: [PHP] local IP script question

2002-10-16 Thread Jon Haworth

Hi, 

 I'm running Apache/PHP on my machine (WinXP Pro).. 
 I want to create a local php script that detects my 
 ISP's assigned IP address and add a port to it 
 (e.g.: http://xxx.xxx.xxx.xxx: )..

If the machine that's running Apache is the same as the machine that gets an
IP from your ISP, you probably want to look into $_SERVER[SERVER_ADDR].

Cheers
Jon

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




[PHP] How to convert the text file into pdf file in php

2002-10-16 Thread Jack

Dear all
I want to make a script which will ask php to convert the source file into
pdf file format n then save it to somewhere else, but i don't know if php
can do such thing, so could you pls help me on this?
Thx a lot
Jack



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




RE: [PHP] Re: PHP XML

2002-10-16 Thread Simon Taylor

Sure in this context I agree with you, but how often do you have a website
which needs to publish in many different formats? I have designed and built
websites for a while and have never come across such an application.
But if I were ever I would definitely invest the effort that is required,
but until then I will save myself from the extra work.
Cheers
Simon

-Original Message-
From: José León Serna [mailto:[EMAIL PROTECTED]] 
Sent: 16 October 2002 10:40
To: Joshua Alexander
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Re: PHP  XML


El mié, 16-10-2002 a las 10:22, Joshua Alexander escribió:
 I have to agree with Simon. I am at a loss when it comes to seeing
 any benefit to XML that doesn't involve data exchange between at 
 least two parties.
 
 I've spent the last two years building database-backed websites, so
 I'm constantly trying to improve how I build them in order to make 
 design and maintenance easier... I used to rely heavily on SSI for 
 this, and now I rely more on PHP... if XML would make things easier, 
 believe me, I would LOVE to know how... but I just don't see it.
Let's imagine you create a website of an online magazine, this magazine
publishes in HTML, PDF, TXT, PS, etc, etc, etc. How would you do it?

I would use XML to write the articles and then stylesheets to transform the
articles to the formats I want. Write once, publish anywhare ;-)

Regards
-- 
XPde :: XP-like desktop environment (developed with Kylix ;-)
http://www.xpde.com



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




[PHP] Re: Script optimisation

2002-10-16 Thread Brian McGarvie

depending on the requirements of your script, it is quicker to use ? echo
$var; ? as required, this is because php essentially ignores all the html
tags untill a ? ... ? is found for which php does it's stuff...

if you use

?
...
code
...
large echo ...; statements here and there...

?

PHP has to go thru the contents of ... and repace any variables it
finds...

however if you are echo'ing without variables always use '...' and not ...
as the single quotes state that it's just text and so it does'nt need to
parse this just output it. You can do 'some text'.$aVariable.' more text';
which will be quicker that some text $aVariable more text; to process...

As I said at the start, it very much depends on what is required for a
particular script...

Also, it is better to choose a style and stick to it! And only break your
own style when the need calls for it.

HTH,

Brian M McGarvie ([EMAIL PROTECTED][EMAIL PROTECTED])
IT/Web Apps Specialist
www.anypurposeloans.co.uk -- www.mcgarvie.net


Tony Crockford [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,

 I'm sure this is an RTFM, but I'm not sure where I should be looking.

 is it quicker for PHP to execute ? echo $var ? in blocks of html or to
 echo all of the html and only have one ? and ?

 I'm using a PHP script to write a lot of html files to hard disk and the
 script execution time is climbing beyond the maximum set in PHP.ini
 (I've changed the setting, but...)

 I'm looking to shave milliseconds of each execution, any ideas, pointers
 or tutorials you could point me to.

 Thanks


 Tony




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




Re: [PHP] Script optimisation

2002-10-16 Thread Timothy Hitchens

This an issue that many people in the PHP community face each day.

I would suggest these first very basic ones:

If you have strings that are echo/parsed that you use double quotes but 
when the string contains no variable replacement use singles.

If you are writing files of considerable size look at the memory limit 
setting in php.ini and up it for each script.

Look at loops and see if something is being counted or calculated each 
time around if so have it set prior to entry to the loop.


Without seeing your scripts I can't suggest anything wonderfull.


Timothy Hitchens (HiTCHO)
[EMAIL PROTECTED]




Tony Crockford wrote:
 Hi,
 
 I'm sure this is an RTFM, but I'm not sure where I should be looking.
 
 is it quicker for PHP to execute ? echo $var ? in blocks of html or to
 echo all of the html and only have one ? and ?
 
 I'm using a PHP script to write a lot of html files to hard disk and the
 script execution time is climbing beyond the maximum set in PHP.ini
 (I've changed the setting, but...)
 
 I'm looking to shave milliseconds of each execution, any ideas, pointers
 or tutorials you could point me to.
 
 Thanks
 
 
 Tony
 
 

-- 
Timothy Hitchens (HiTCHO)
Web Application Analyst and Developer
e-mail: [EMAIL PROTECTED]
mobile: 0419 521 440



-
HiTCHO Group - ABN: 85 816 540 110
Web Site: http://www.hitcho.com.au/
Snail Mail: PO Box 101 Arana Hills QLD 4054
Telephone: 07 3351 0951 - Facsimile: 07 3351 0952


IMPORTANT:
This email may be the view of the individual and
not that of the organisation. The contents of
this electronic mail (including attachments) may
be privileged and commercially confidential.

Any unauthorised use of the contents is expressly
prohibited. If you have received this document in
error, please advise us by telephone immediately
and then delete the document.



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




RE: [PHP] Script optimisation

2002-10-16 Thread Simon Taylor

Tony,
I am not sre which is faster, but I am pretty sure you wouldn't be able to
measure it in milliseconds..
Cheers
Simon

-Original Message-
From: Tony Crockford [mailto:[EMAIL PROTECTED]] 
Sent: 16 October 2002 10:48
To: Php-General@Lists. Php. Net
Subject: [PHP] Script optimisation


Hi,

I'm sure this is an RTFM, but I'm not sure where I should be looking.

is it quicker for PHP to execute ? echo $var ? in blocks of html or to
echo all of the html and only have one ? and ?

I'm using a PHP script to write a lot of html files to hard disk and the
script execution time is climbing beyond the maximum set in PHP.ini (I've
changed the setting, but...)

I'm looking to shave milliseconds of each execution, any ideas, pointers or
tutorials you could point me to.

Thanks


Tony


-- 
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 convert the text file into pdf file in php

2002-10-16 Thread Simon Taylor

Jack,
This is in the manual under pdf functions and you will need this library.
http://www.pdflib.com/pdflib/index.html
Cheers
Simon

-Original Message-
From: Jack [mailto:[EMAIL PROTECTED]] 
Sent: 16 October 2002 10:56
To: [EMAIL PROTECTED]
Subject: [PHP] How to convert the text file into pdf file in php


Dear all
I want to make a script which will ask php to convert the source file into
pdf file format n then save it to somewhere else, but i don't know if php
can do such thing, so could you pls help me on this? Thx a lot Jack



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

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




RE: [PHP] Re: PHP XML

2002-10-16 Thread José León Serna

El mié, 16-10-2002 a las 11:02, Simon Taylor escribió:
 Sure in this context I agree with you, but how often do you have a website
 which needs to publish in many different formats? I have designed and built
 websites for a while and have never come across such an application.
 But if I were ever I would definitely invest the effort that is required,
 but until then I will save myself from the extra work.
If you create an intranet (DMS, ISO compliance, etc) for a company, sure
you have to deal with that ;-)

Regards 
-- 
XPde :: XP-like desktop environment (developed with Kylix ;-)
http://www.xpde.com





signature.asc
Description: This is a digitally signed message part


[PHP] http://pear.php.net/

2002-10-16 Thread Tariq Murtaza


check out the error  http://pear.php.net/

Error: DB Error: connect failed: [nativecode=Can't connect to local 
MySQL server through socket '/tmp/mysql.sock' (61)]



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




RE: [PHP] Re: PHP XML

2002-10-16 Thread Joshua Alexander

I still wouldn't use XML for this. I mean, all the articles are in 
the database, and I'm already using PHP to pull them out and format 
them into html, right? I can just as easily use PHP to put them into 
all those other formats.

So again, why waste time with XML unless I need to feed these 
articles to others, like in a newsfeed situation?

But if I were ever I would definitely invest the effort that is required,
but until then I will save myself from the extra work.

Let's imagine you create a website of an online magazine, this magazine
publishes in HTML, PDF, TXT, PS, etc, etc, etc. How would you do it?

I would use XML to write the articles and then stylesheets to transform the
articles to the formats I want. Write once, publish anywhare ;-)

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




RE: [PHP] Re: PHP XML

2002-10-16 Thread José León Serna

El mié, 16-10-2002 a las 11:13, Joshua Alexander escribió:
 I still wouldn't use XML for this. I mean, all the articles are in 
 the database, and I'm already using PHP to pull them out and format 
 them into html, right? I can just as easily use PHP to put them into 
 all those other formats.
In what format do you have the articles on the database? TXT?
You will need to create a PHP software to format these articles to 
HTML
PDF
TXT
PS

With XML you don't need that, the parser does the hard work for you.

What would it happen if you need another format? You would need to
develop another program (or modify an existing one) to transform your
content to the new format. With XML you just need to add a new XSL.

Of course, XML is not the only solution, but IMO is the easiest.

Regards
-- 
XPde :: XP-like desktop environment (developed with Kylix ;-)
http://www.xpde.com





signature.asc
Description: This is a digitally signed message part


RE: [PHP] Re: Script optimisation

2002-10-16 Thread Tony Crockford


 As I said at the start, it very much depends on what is required for a
 particular script...


Here's an area I'm struggling with:

(it's a breadcrumb trail building a href from variables according to
which page I'm creating):

?php
//index
echo a href=\, $urltoitem, /tm, $cat1_ref, /lv, $count_levels,
/index.htm\;
getcat1name($cat1_ref);
echo /abr /img src=\img/dar.gif\ alt=\ \ /br /;
//subcat1
echo a href=\, $urltoitem, /tm, $cat1_ref, /lv, $count_levels,
/s, $sub_cat1_ref, .htm\;
getsub_cat1name($sub_cat1_ref);
echo /abr /img src=\img/dar.gif\ alt=\ \ /br /;
//cat2
echo a href=\, $urltoitem, /tm, $cat1_ref, /lv, $count_levels,
/s, $sub_cat1_ref, -c, $cat2_ref, .htm\;
getcat2name($cat2_ref);
echo /abr /img src=\img/dar.gif\ alt=\ \ /br /;
//subcat2
echo a href=\, $urltoitem, /tm, $cat1_ref, /lv, $count_levels,
/s, $sub_cat1_ref, -c, $cat2_ref, -sc, $sub_cat2_ref,.htm\;
getsub_cat2name($sub_cat2_ref);
echo /a;
?

every time I mess with the -- and '--' I end up getting an error or no
output.

from what you're saying this would be a slow part of the script and as
I'm generating nearly 4000 pages atm it would be good to speed this bit
up.

how would you do it?

TIA

Tony




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




[PHP] Random open_basedir -effection?

2002-10-16 Thread Ville Mattila

Folks,

I've noticed that I got open_basedir restriction in effect warnings
randomly in a random situations. I've seen this error appearing whether the
script is using filesystem or not. And the weirdest thing: I don't have any
open_basedir restrictions set!

Just a second ago I got following error from PHP:

Warning: open_basedir restriction in effect. File is in wrong directory in
Unknown on line 0

Warning: Failed opening '/var/www/ank_myynti/www/ajoneuvot/index.php' for
inclusion (include_path='.:/usr/local/lib/php') in Unknown on line 0

a) I'm not trying to include that index.php mentioned above, I try to open
it!
b) The index.php script is not using filesystem at all

This effect is very rare but it happens sometimes anyway. And as I said
without any frequency but completely randomly.

My PHP is 4.2.3 ruinning as a Apache module for 1.3.26 in Linux RH7.3.

Thanks,
Ville


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




Re: [PHP] passing mysql_error() out put to a different page?

2002-10-16 Thread Marek Kilimajer

And also on the folloving page use echo 
htmlspecialchars(stripslashes($_GET['err_value']));

John W. Holmes wrote:

Well, the die() function takes a limited number of parameters, which


as
  

you
noted is why it doesn't like the assignment of the mysql_error() and


the
  

header
statements both inside the die() function.  So, why not something like
this:

$res = mysql_query(.);
if ($res == FALSE)  //which is what I _believe_ die() looks at
/* or at least this is what the manual says the function returns on a
query
error */
{
$error = mysql_error();
Header(Location: logerror.php?op=insert_errorerr_value=$error);



If you do it this way, you'll want to urlencode(), rawurlencode(), or
base64_encode() the $error. You only have to decode on the receiving end
if you use the base64_encode.

---John Holmes...



  



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




[Fwd: Re: [PHP] Re: PHP XML]

2002-10-16 Thread Tariq Murtaza

Can u elaborate more about ISO standards.
i mean, if u could explain more about using Xml in DMS with ISO
standards with small examples
Best ragards

José León Serna wrote:
  El mié, 16-10-2002 a las 11:02, Simon Taylor escribió:
 
 Sure in this context I agree with you, but how often do you have a 
website
 which needs to publish in many different formats? I have designed and 
built
 websites for a while and have never come across such an application.
 But if I were ever I would definitely invest the effort that is required,
 but until then I will save myself from the extra work.
 
  If you create an intranet (DMS, ISO compliance, etc) for a company, sure
  you have to deal with that ;-)
 
  Regards



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




Re: [PHP] Inserting a variable into a mysql_query() statement

2002-10-16 Thread Marek Kilimajer

You very likely need to use $_REQUEST[hidden_manuf_id] in your first 
example, which is almost correct otherwise( for security reasons, also 
put single quotes around it)

Phil Clark wrote:

I'm trying to insert the variable $hidden_manuf_id into a mysql_query()
statement.

If i do this:
mysql_query(DELETE FROM product WHERE manufacturer=$hidden_manuf_id,$bb)
or die(mysql_error());
PHP server doesn't see the variable because it is inside the string
quotes.

If I do this:
mysql_query(DELETE FROM product WHERE manufacturer=$hidden_manuf_id,$bb)
or die(mysql_error());
PHP server reports a parsing error.

What is the correct syntax?  ($bb is correctly defined.)




  



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




Re: [Fwd: Re: [PHP] Re: PHP XML]

2002-10-16 Thread José León Serna

El mar, 15-10-2002 a las 23:16, Tariq Murtaza escribió:
 Can u elaborate more about ISO standards.
 i mean, if u could explain more about using Xml in DMS with ISO 
 standards with small examples
AFAIK there is no especific request to use XML to be compliant with
ISO standard, the ISO specifies the information must be accesible by
everyone, so XML is the perfect candidate, it was just a sample ;-)

Regards.



signature.asc
Description: This is a digitally signed message part


Re: [PHP] How to convert the text file into pdf file in php

2002-10-16 Thread Jason Wong

On Wednesday 16 October 2002 16:56, Jack wrote:
 Dear all
 I want to make a script which will ask php to convert the source file into
 pdf file format n then save it to somewhere else, but i don't know if php
 can do such thing, so could you pls help me on this?

If you've compiled PHP with support for PDFLib then, yes, you can use PHP to 
convert text to PDF. But rather than using the built-in pdf functions 
directly it would be much easier to use one of the several classes available 
(search google).

In addition, there are at least two classes available that can generate PDF 
without using PDFLib. Again search google.

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
Stupidity is its own reward.
*/


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




Re: [PHP] File upload and php... not a beginner question...

2002-10-16 Thread Marek Kilimajer

Well, you can use
form target=_blank 
onSubmit=document.location='please_be_patient_and_dont_close_the_new_window.html' 


Baroiller Pierre-Emmanuel wrote:

Hi,

everyone know how to upload files from the browser to your web server using
multipart-form method with move_downloaded_file() php function.

But... It's a slow method for multiple files  huge files transfert.

I'm currently working on a big photo album tool, and I want to provide user
the ability to upload a lot of jpeg files in one time...
The big problem with form is it's too slow...

Does anyone know how to by-pass this ( with java or other tools )?



  



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




[PHP] netscape http user agent pattern thing.

2002-10-16 Thread Noodle Snacks

I am just finish off a site. An of course the css rendered really badly with
netscape... Fixed that with the:




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




[PHP] netscape user agent name...

2002-10-16 Thread Noodle Snacks

Accidently hit the send shortcut...

I am just finish off a site. An of course the css rendered really badly with
netscape... Fixed that with the:

style type='text/css' @import url(style_sheets/?=$skin[0][0]?); /style

trick. One or two of the images looks really bad with the simpler css. I am
going to detect the browser on the server side and decide which image I am
going to link to.

my question is does Netscape 4.x send Netscape 4.x or mozilla something?


--
JJ Harrison
[EMAIL PROTECTED]



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




RE: [PHP] netscape user agent name...

2002-10-16 Thread Jon Haworth

Hi,

 my question is does Netscape 4.x send Netscape 4.x 
 or mozilla something?

It sends Mozilla/4.7 [en] (WinNT; I) (varies with version, language and
OS, obviously).

I use this to sniff Netscape 4:

if (strstr($_SERVER[HTTP_USER_AGENT], Mozilla/4.) 
!strstr($_SERVER[HTTP_USER_AGENT], MSIE)) {
  echo pYou're using netscape 4./p;
}

Seems to work OK.

Cheers
Jon

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




Re: [PHP] netscape user agent name...

2002-10-16 Thread Duncan Hill

On Wed, Oct 16, 2002 at 09:50:06PM +1100, Noodle Snacks wrote:
 my question is does Netscape 4.x send Netscape 4.x or mozilla something?

Copy sent offlist, so here's a copy for the list.

Google returns:
http://www.psychedelix.com/agents.html

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




RE: [PHP] Installing PHP 4.2.3 with Apache 2.0.43 on WinXP Home Edition

2002-10-16 Thread Ford, Mike [LSS]

 -Original Message-
 From: Reginald Alex Mullin [mailto:[EMAIL PROTECTED]]
 Sent: 16 October 2002 05:27
 To: '[EMAIL PROTECTED]'
 
 LoadModule php4_module C:/PHP/sapi/php4apache.dll
 AddModule mod_php4.c

As you're trying to use Apache 2.0.43, this won't work -- there's a
different .dll for Apache 2.

Also, I don't believe PHP 4.2.3 will work with Apache 2.0.43 anyway -- you
probably need the latest development version from snaps.php.net.  I've seen
posters say that they've got PHP 4.2.3 working with Apache 2.0.39 or so, but
I believe internal changes in Apache mean later releases need the latest
development version of PHP.

In any case, the Apache2/PHP combo is still regarded as no better than
beta-quality, so caveat very definitely emptor!

Cheers!

Mike

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

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




[PHP] Trouble with \\ and form

2002-10-16 Thread Christian Ista

Hello,

I'm trying the example1 give in xml_parse_into_struct section here :
http://www.php.net/manual/en/function.xml-parse-into-struct.php

works fine.

But know I'm trying to change the file name moldb.xml by a file name 
come from a form input type=file .

I receive from the form something like that :
C:\\Directory1\\Directory2\\File.xml
That's not work( the code to parse the XML file)

But If you replace the the string by
C:\Directory1\Directory2\File.xml
That's work.

Is there an easy way to change \\ by \ or an another solution 

Christian,




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




RE: [PHP] $_SESSION

2002-10-16 Thread Ford, Mike [LSS]

 -Original Message-
 From: Paonarong Buachaiyo [mailto:[EMAIL PROTECTED]]
 Sent: 16 October 2002 09:04
 To: [EMAIL PROTECTED]
 
 Simple, how can we earse all $SESSION variable except one or 
 two variables.
 
 Any way to do it except
 
 unset($_SESSION['xx1']);
 unset($_SESSION['xx2']);
 unset($_SESSION['xx3']);
 .
 unset($_SESSION['xx10']);

Well, one quick'n'dirty solution would be:

  foreach (array('xx1', 'xx2', ..., 'xx10') as $x):
 unset $_SESSION[$x];
  endforeach;

Cheers!

Mike

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

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




Re: [PHP] Re: PHP XML

2002-10-16 Thread Stas Maximov

The benefit would be in dividing business logic from presentation layer.

Stas.

- Original Message -
From: Simon Taylor [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 16, 2002 7:35 AM
Subject: RE: [PHP] Re: PHP  XML


 To me this is a lot of work and processing for limited benefits, a simple
db
 abstraction layer provides you with a divide between you db queries and
the
 presentation of your site, what benefits do you see in doing this?
 Cheers
 Simon

 -Original Message-
 From: Alexandru COSTIN [mailto:[EMAIL PROTECTED]]
 Sent: 15 October 2002 18:50
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: PHP  XML


 Hello,

 Most of what you are looking for is already implemented and fully working
in

 our Krysalis Professional platform.

 We help you create dynamic XML files, we provide you reusable taglibs  to
 avoid rewriting similar code multiple times, wr provide various levels of
 caching and many more.

 Please se more details at : http://www.interakt.ro/products/

 Alexandru

  Let me preface this by saying that I know the benefits of using XML
  with regards to portability and extensibility. Here is the issue I
  face.  I have all of my data stored in a MySQL database.  I'm
  considering reworking my website so that it uses XML (after being
  converted from resultant records in my DB) to transmit  XSLT to
  transform and display the data to my end user. There are a few
  benifits I can see in sending XML messages as part of the back end
  processing.  However, that seems to be out- weighed by the amount of
  processing that's going to need to take place in actually serving the
  data to the user. First I have to query and pull the records from the
  database.  Then, I need to send those records to a function (or
  functions) to convert it to XML.  Then, I need to take that XML data
  and have PHP use an XSL stylesheet to transform it to HTML before it,
  finally, gets sent on to the browser.  So that's basically 2
  conversions that take place on the back end.
  How much experience have any of you had with doing that?  Does
  it take significantly longer to serve the pages; is there a noticible
  performance hit?  Do you realize more benifit for the back end
  processes when using XML that makes any additional time it takes
  to display a page to the user worth it?
  I'd love to hear about people's experience with this kind of thing so I
  can better make a decision wrt whether or not I should even go down
  this route.
 
  thnx,
  Chris


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

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




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




Re: [PHP] Random open_basedir -effection?

2002-10-16 Thread Marek Kilimajer

Don't you have any *auto_append_file* set?

Ville Mattila wrote:

Folks,

I've noticed that I got open_basedir restriction in effect warnings
randomly in a random situations. I've seen this error appearing whether the
script is using filesystem or not. And the weirdest thing: I don't have any
open_basedir restrictions set!

Just a second ago I got following error from PHP:

Warning: open_basedir restriction in effect. File is in wrong directory in
Unknown on line 0

Warning: Failed opening '/var/www/ank_myynti/www/ajoneuvot/index.php' for
inclusion (include_path='.:/usr/local/lib/php') in Unknown on line 0

a) I'm not trying to include that index.php mentioned above, I try to open
it!
b) The index.php script is not using filesystem at all

This effect is very rare but it happens sometimes anyway. And as I said
without any frequency but completely randomly.

My PHP is 4.2.3 ruinning as a Apache module for 1.3.26 in Linux RH7.3.

Thanks,
Ville


  



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




Re: [PHP] Trouble with \\ and form

2002-10-16 Thread Marek Kilimajer

Easy way is stripslashes(), just watch out you don't put stripslashed 
field input into the database

Christian Ista wrote:

Hello,

I'm trying the example1 give in xml_parse_into_struct section here :
http://www.php.net/manual/en/function.xml-parse-into-struct.php

works fine.

But know I'm trying to change the file name moldb.xml by a file name 
come from a form input type=file .

I receive from the form something like that :
C:\\Directory1\\Directory2\\File.xml
That's not work( the code to parse the XML file)

But If you replace the the string by
C:\Directory1\Directory2\File.xml
That's work.

Is there an easy way to change \\ by \ or an another solution 

Christian,




  



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




Re: [PHP] Re: PHP XML

2002-10-16 Thread Geoff Hankerson

Ultimately it's about flexibility and seperating content from 
presentation.Even if you don't have sites that need to be output into 
multiple formats you will almost cetainly need to redesign some or all 
of the presentation at some point even if it is only in html.  Have you 
ever had your boss/client say I want to give the Website a new look. 
 If you have content mixed in with presentation you will need to do a 
lot of work to mix your content into a new presentation layer.

It's also about writing code that is easy to maintain. You can make  a 
class to convert db content to xml and another to convert xml to html 
via xslt. Your pages suddenly become very easy to write (an have fewer 
lines of code) , they only differ in the sql statment and the name of 
the xsl file.

I am going to do all my sites like this now. I'm tired of the old way. 
it's too much work.

Joshua Alexander wrote:

 I still wouldn't use XML for this. I mean, all the articles are in the 
 database, and I'm already using PHP to pull them out and format them 
 into html, right? I can just as easily use PHP to put them into all 
 those other formats.

 So again, why waste time with XML unless I need to feed these articles 
 to others, like in a newsfeed situation?

 But if I were ever I would definitely invest the effort that is 
 required,
 but until then I will save myself from the extra work.


 Let's imagine you create a website of an online magazine, this magazine
 publishes in HTML, PDF, TXT, PS, etc, etc, etc. How would you do it?

 I would use XML to write the articles and then stylesheets to 
 transform the
 articles to the formats I want. Write once, publish anywhare ;-)






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




[PHP] fopen url problems

2002-10-16 Thread Karl Phillipson

Anyone know what the error means in this snippet?
 
I am attempting to check if a given .asf file exists on another server but get no 
further than this error. 
Not sure what 'message too long' refers to.
 
PHP version is 4.2.1/Apache 2/FreeBSD
 
Thanks.

Warning: fopen(http://bluestream/bband/testvideo-bband.asf;, r) - 
Message too long in /usr/local/www/livebrand.co.uk/www/builder/cstudies.php on line 32


-
Karl Phillipson
Tribal DDB - a BMP DDB Company
http://www. http://www.tribalddb.co.uk tribalddb.co.uk

-

The information given in the above email and / or attachment is provided without 
warranty of any kind, either expressed or implied on the part of the writer or the 
Agency.

 



[PHP] function to update mysql tables?

2002-10-16 Thread Simon De Deyne

Hi,

I'm not sure if this is entirely php related, but I was wondering if there
is a PHP function or a way to automatically update one table with values
from another more extended table (automatically checking the common
columns) and inserting new rows if they don't exist in the first table.

Furthermore, I'm having difficulty inserting rows in a static myisam
table  (because i'm a beginner i suppose). The system crashes when
I try to do this. According to mysql documentation it's because
i only use int column types. So: is there a way to insert rows in a
default static table?

cheers,
Simon


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




Re: [PHP] PHP XML

2002-10-16 Thread Chris Boget

   Do you realize more benifit for the back end
   processes when using XML that makes any additional time it takes
   to display a page to the user worth it?
 Just ask the user if they really want to wait longer for something they 
 can't even see, just so you can use the latest buzzword in describing 
 your site.
 I'm sure they'll say NO!

Hell, I would answer No, too.

But I'm not considering XML just because it's the latest buzzword.  I've
been part of the industry too long to be lulled by such things.  The reason
I'm considering XML is to allow things like themes and also to standardize
and optimize messages that would be sent to various services that I could
create and set up with a redesign.  It would also allow me to create external
companion software that could communicate with the website and allow some
of the daily work of the end user to take place offline.

Chris



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




[PHP] Creating a voting system.

2002-10-16 Thread Thomas Goeminne

Hello,

I am making a page where people can vote for their favourite image. People
can give points from 1 to 5. I want the votes counted in a table in my mysql
dbbase called votes. How do I make such a system?

thank you for helpfull hints.





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




[PHP] seeding using mt_srand();

2002-10-16 Thread Phil Schwarzmann

Let's say you have a simple PHP file that just displays a random number.
When the user hits the submit button, the page will reload and display
another random number.
 
How often do you need to call mt_srand(); ?  Just once?  Or each time
the page gets reloaded?



Re: [PHP] Creating a voting system.

2002-10-16 Thread bbonkosk

Have you by chance read any documents or tutorials?  I know there are many 
helpful ones at places like phpbuilder.com, and many others.  

This list is more helpful when you have a specific question to be answered, 
this is too open ended.  
-Brad


 Hello,
 
 I am making a page where people can vote for their favourite image. People
 can give points from 1 to 5. I want the votes counted in a table in my mysql
 dbbase called votes. How do I make such a system?
 
 thank you for helpfull hints.
 
 
 
 
 
 -- 
 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] seeding using mt_srand();

2002-10-16 Thread bbonkosk

What Version :-)

Check the manual, it has an interesting note:

Note: Since PHP 4.2.0 it's no longer necessary to seed the random number 
generator before using it. 

HTH
-Brad

 Let's say you have a simple PHP file that just displays a random number.
 When the user hits the submit button, the page will reload and display
 another random number.
  
 How often do you need to call mt_srand(); ?  Just once?  Or each time
 the page gets reloaded?
 





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




RE: [PHP] seeding using mt_srand();

2002-10-16 Thread Jon Haworth

Hi Phil,

 How often do you need to call mt_srand(); ?  

As of version 4.2.0 you don't have to call it at all. If your PHP
installation is an earlier version than that, call it once per script,
before generating any random numbers, e.g:

mt_srand($seed);
$randomA = mt_rand();
$randomB = mt_rand();
$randomC = mt_rand();

 Just once?  Or each time the page gets reloaded?

Uh... same thing, surely?

Cheers
Jon

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




[PHP] PHP from behind a proxy-server ??

2002-10-16 Thread Rob

hi,

i'm trying to get phpMySetiStats (phpmysetistats.sourceforge.net)
running on my NT4 box (Apache 2.0.39, PHP 4.2.3 and MySQL 3.23.52). 
problem is that i am behind a proxy server and can not get the 'file'
function to work to retrieve my stats from the Berkeley server ...
i've searched the net  groups and noticed that i'm not the first one
to run into this problem ; but could not find any answers ...

anybody here knows how to use 'file' thru a proxy ?

Rob

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




Re: [PHP] PHP from behind a proxy-server ??

2002-10-16 Thread Timothy Hitchens

Make a direct call using sockets... eg simulate being a web browser and
use the proxy..


Timothy Hitchens (HiTCHO)
[EMAIL PROTECTED]

Rob wrote:
 hi,
 
 i'm trying to get phpMySetiStats (phpmysetistats.sourceforge.net)
 running on my NT4 box (Apache 2.0.39, PHP 4.2.3 and MySQL 3.23.52). 
 problem is that i am behind a proxy server and can not get the 'file'
 function to work to retrieve my stats from the Berkeley server ...
 i've searched the net  groups and noticed that i'm not the first one
 to run into this problem ; but could not find any answers ...
 
 anybody here knows how to use 'file' thru a proxy ?
 
 Rob
 

-- 
Timothy Hitchens (HiTCHO)
Web Application Analyst and Developer
e-mail: [EMAIL PROTECTED]
mobile: 0419 521 440



-
HiTCHO Group - ABN: 85 816 540 110
Web Site: http://www.hitcho.com.au/
Snail Mail: PO Box 101 Arana Hills QLD 4054
Telephone: 07 3351 0951 - Facsimile: 07 3351 0952


IMPORTANT:
This email may be the view of the individual and
not that of the organisation. The contents of
this electronic mail (including attachments) may
be privileged and commercially confidential.

Any unauthorised use of the contents is expressly
prohibited. If you have received this document in
error, please advise us by telephone immediately
and then delete the document.



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




RE: [PHP] seeding using mt_srand();

2002-10-16 Thread Phil Schwarzmann

Yeah, I read that,I'm using PHP 4.04...so I do need to see the random
generator.



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, October 16, 2002 11:35 AM
To: Phil Schwarzmann; [EMAIL PROTECTED]
Subject: Re: [PHP] seeding using mt_srand();

What Version :-)

Check the manual, it has an interesting note:

Note: Since PHP 4.2.0 it's no longer necessary to seed the random number

generator before using it. 

HTH
-Brad

 Let's say you have a simple PHP file that just displays a random
number.
 When the user hits the submit button, the page will reload and display
 another random number.
  
 How often do you need to call mt_srand(); ?  Just once?  Or each time
 the page gets reloaded?
 





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


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




[PHP] Re: How to use imap?

2002-10-16 Thread Ns_Andy

please kill.



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




RE: [PHP] seeding using mt_srand();

2002-10-16 Thread Phil Schwarzmann

So I need to call it each time the page gets reloaded I guess

I can't just have the user load a file called generate.php which has the
mt_srandand then keep calling random.php (which has mt_rand) without
calling generate.php   right?

-Original Message-
From: Jon Haworth [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, October 16, 2002 3:40 PM
To: 'Phil Schwarzmann'; [EMAIL PROTECTED]
Subject: RE: [PHP] seeding using mt_srand();

Hi Phil,

 How often do you need to call mt_srand(); ?  

As of version 4.2.0 you don't have to call it at all. If your PHP
installation is an earlier version than that, call it once per script,
before generating any random numbers, e.g:

mt_srand($seed);
$randomA = mt_rand();
$randomB = mt_rand();
$randomC = mt_rand();

 Just once?  Or each time the page gets reloaded?

Uh... same thing, surely?

Cheers
Jon


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




Re: [PHP] seeding using mt_srand();

2002-10-16 Thread Jason Wong

On Wednesday 16 October 2002 20:46, Phil Schwarzmann wrote:
 So I need to call it each time the page gets reloaded I guess

 I can't just have the user load a file called generate.php which has the
 mt_srandand then keep calling random.php (which has mt_rand) without
 calling generate.php   right?

Right.

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
It would be illogical to assume that all conditions remain stable.
-- Spock, The Enterprise Incident, stardate 5027.3
*/


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




[PHP] Show indexes

2002-10-16 Thread Liam . Gibbs

Is there a way in PHP to list all of the indexes in an SQL database? Or is
it only through SQL that this can be done? (Or can it?)

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




RE: [PHP] seeding using mt_srand();

2002-10-16 Thread Jon Haworth

Hi Phil,

   How often do you need to call mt_srand(); ?  
  
  once per script, before generating any random 
  numbers
 
 I can't just have the user load a file called 
 generate.php which has the mt_srandand then 
 keep calling random.php (which has mt_rand) without
 calling generate.php   right?

Well, you can if it's in one script :-)

Let's say random.php looks like this:
  ?php
echo mt_rand();
  ?

and main.php looks like this:
  ?php
include (generate.php); // seed 
include (random.php);
include (random.php);
include (random.php);
  ?

You should be fine. AIUI the call to mt_srand() lasts for the lifecycle of
the script.

Was that what you meant?

Cheers
Jon



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




RE: [PHP] seeding using mt_srand();

2002-10-16 Thread Jon Haworth

Hi Phil,

 I'm doing everything correct, although my random 
 numbers don't seem totally random.  

There are two reasons for this.

Firstly, you might not be seeding mt_srand() with a sensible seed - if you
always use 23 as your seed, you'll always get the same sequence of random
numbers. You're better off seeding it with the current time or something -
if you haven't already, have a look at the manual page at
http://php.net/mt_srand, there's an example there.

Secondly, random numbers generated by a computer aren't random, they're
what's known as pseudo-random. To generate truly random numbers you need
something like a decaying radioactive material as your seed source -
http://www.fourmilab.ch/hotbits/ provides exactly this, so you could always
get your seeds via the web :-)

Cheers
Jon



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




[PHP] Blank PHP pages...

2002-10-16 Thread Angel Gabriel

... I've got PHP working, on my server, I know this because I used that
small PHP script that shows all the variables, and that worked fine. The
problem seems to be that every other script shows me a blank pages. I'm
using redhat 7.3,  and I installed PHP, MySQL and Apache from RPM's and they
are all up2date - I have no idea what I could have missed. Has anyone else
encountered a similar problem, and if so, how did you remedy it? I have
followed the install instructions to the letter, and I can't seem to find
what the problem is. Any suggestions, hints or tips, greatfully recieved!
Thanks in advance.

***
Not everyone is touched by an Angel..and those that are, never forget
the experience.
***
If you want guest list for bare club
nights.http://raw-talent.hopto.org/mailman/clubnights
***
Can you sing, dance, MC, DJ, do you have talent?Send an email to
[EMAIL PROTECTED]
***


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.404 / Virus Database: 228 - Release Date: 10/15/2002



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




Re: [PHP] Re: PHP XML

2002-10-16 Thread Adrian Slusarczyk


Using XML can also make sense for smaller projects where a 'real' DB just
isn´t available on the server.

I am developing a CMS for our student magazine. Over the last 16 months or
so, we used CGI /Perl for processing and stored the data in plain text
files.In these article files, I would use pseudo-tags like, __PICTURE_1__,
then get some data for this picture (URL, width  height, ALT-Text, longer
description, source  copyright) from a *seperate* text file, then create an
HTML table that contains the picture  a description and insert it into the
article.
This was way better than using static HTML, which we had used in the
beginning (wanne here a definition for *pain*? ;-). But it still didn´t
really seperate layout and content since basic HTML tags like H1, BR,
B, I etc. were used in the text files. This worked fine as long as we
were glad that minor changes in the footer of the page didn´t involve 48
hours of non-stop work, but it became unfeasible when our ambitions grew and
extended to having a (differently formatted) print version of each
article

The bottom line is: With XML, we now have a clear-cut DTD and thorough
seperation of code, content, and layout -- exactly what one would want to
achieve with a DB. The performance is ok, I´d say better than with the old
Perl script :) and will improve even further when we implement caching of
the HTML output (yes, I know, that´s not an option for everyone).

For us, XML is kinda a third way aside from SQL and plain text files.
Besides, we still have the option to set up a DB and create the XML files
automatically  cache the output if we ever grow big and important enough to
afford web hosting with a real DB :)

Unless you´re data are updated too frequently (and are needed to be
up-to-date immediately) to be cached, take a look at XML. Besides, once you
CAN exchange your stuff with others, you might come across new ideas to
improve your whole site!

Regards,

Adrian Slusarczyk


Simon Taylor [EMAIL PROTECTED] schrieb im Newsbeitrag
414B25821CCAD61181A90048543C810C03EDB4@EMAILSERVER">news:414B25821CCAD61181A90048543C810C03EDB4@EMAILSERVER...
Sure in this context I agree with you, but how often do you have a website
which needs to publish in many different formats? I have designed and built
websites for a while and have never come across such an application.
But if I were ever I would definitely invest the effort that is required,
but until then I will save myself from the extra work.
Cheers
Simon

-Original Message-
From: José León Serna [mailto:[EMAIL PROTECTED]]
Sent: 16 October 2002 10:40
To: Joshua Alexander
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Re: PHP  XML


El mié, 16-10-2002 a las 10:22, Joshua Alexander escribió:
 I have to agree with Simon. I am at a loss when it comes to seeing
 any benefit to XML that doesn't involve data exchange between at
 least two parties.

 I've spent the last two years building database-backed websites, so
 I'm constantly trying to improve how I build them in order to make
 design and maintenance easier... I used to rely heavily on SSI for
 this, and now I rely more on PHP... if XML would make things easier,
 believe me, I would LOVE to know how... but I just don't see it.
Let's imagine you create a website of an online magazine, this magazine
publishes in HTML, PDF, TXT, PS, etc, etc, etc. How would you do it?

I would use XML to write the articles and then stylesheets to transform the
articles to the formats I want. Write once, publish anywhare ;-)

Regards
--
XPde :: XP-like desktop environment (developed with Kylix ;-)
http://www.xpde.com





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




RE: [PHP] Blank PHP pages...

2002-10-16 Thread Jay Blanchard

[snip]
... I've got PHP working, on my server, I know this because I used that
small PHP script that shows all the variables, and that worked fine. The
problem seems to be that every other script shows me a blank pages. I'm
using redhat 7.3,  and I installed PHP, MySQL and Apache from RPM's and they
are all up2date - I have no idea what I could have missed. Has anyone else
encountered a similar problem, and if so, how did you remedy it? I have
followed the install instructions to the letter, and I can't seem to find
what the problem is. Any suggestions, hints or tips, greatfully recieved!
Thanks in advance.
[/snip]

Check register_globals in php.ini. It is probably set to off.

HTH!

Jay



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




Re: [PHP] Show indexes

2002-10-16 Thread Stas Maximov

First get all the table names in your db:
mysql_query(show tables from [your_db_name]);

Then crawl thru the table list and get index information for each of them:
mysql_query(show index from [your_table_name]);

HTH Stas
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 16, 2002 1:45 PM
Subject: [PHP] Show indexes


 Is there a way in PHP to list all of the indexes in an SQL database? Or is
 it only through SQL that this can be done? (Or can it?)

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




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




[PHP] Re: PHP from behind a proxy-server ??

2002-10-16 Thread J Wynia

You can use the CURL module to do this fairly easily as it has a proxy 
setting. Some example code available at:

http://www.phpgeek.com/articles.php?content_id=29

Rob wrote:
 hi,
 
 i'm trying to get phpMySetiStats (phpmysetistats.sourceforge.net)
 running on my NT4 box (Apache 2.0.39, PHP 4.2.3 and MySQL 3.23.52). 
 problem is that i am behind a proxy server and can not get the 'file'
 function to work to retrieve my stats from the Berkeley server ...
 i've searched the net  groups and noticed that i'm not the first one
 to run into this problem ; but could not find any answers ...
 
 anybody here knows how to use 'file' thru a proxy ?
 
 Rob


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




[PHP] $_FILES posting limited to 5?

2002-10-16 Thread Jason Young

I'm going to approach this question in a different way, in case some 
people were put off by the complexity of it yesterday.

For all those who don't know my question from yesterday, I have a form 
where I can upload up to 9 files at a time. Unfortunately, only the 
first 5 of those files are being uploaded at any given time.

As a test, I just created a simple form with only input type 'file's, 
and attempted to find out how many its attempting to parse. It is still 
only 5.

I have posted the full code below so people might be able to try it on 
their own systems... please let me know what you might find:

 loop-test.php -

?

if (isset($_GET['action']))
   $action = $_GET['action'];

while(list($key,$val)=each($_POST))
{
   $$key = $val;
}

?

html
head
titleFile Loop Test/title
/head
body

?php

if ($action == add) {

$current = 0;

while (list($key) = each($_FILES['picname'])) {

   echo $current;
   $current++;
}

} else { // Default
?
form enctype=multipart/form-data method=post name=slAdd 
action=?action=add
input type=hidden name=MAX_FILE_SIZE value=1000

input type=submit name=submit_button value=Add

brhr
table width=70%
tr
tdinput type=file name=picname[0]/td
tdinput type=file name=picname[1]/td
tdinput type=file name=picname[2]/td
/trtr
tdinput type=file name=picname[3]/td
tdinput type=file name=picname[4]/td
tdinput type=file name=picname[5]/td
/trtr
tdinput type=file name=picname[6]/td
tdinput type=file name=picname[7]/td
tdinput type=file name=picname[8]/td
/tr

/table
/form

? } ?

/body
/html

- End Code -

Thanks for everyone's time on this!
--Jason


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




[PHP] Re: $_FILES limited to 5? (Server versions)

2002-10-16 Thread Jason Young

Just wanted to let everyone know:

PHP version is 4.2.1
Apache is 1.3.24

Running WindowsXP Pro


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




Re: [PHP] Inserting a variable into a mysql_query() statement

2002-10-16 Thread Rick Emery

$query = DELETE FROM product WHERE manufacturer=\$hidden_manuf_id\;
mysql_query($query,$bb) or die(mysql_error());

or:

mysql_query(DELETE FROM product WHERE manufacturer=\$hidden_manuf_id\, $bb);

=
Phil Clark wrote:

I'm trying to insert the variable $hidden_manuf_id into a mysql_query()
statement.

If i do this:
mysql_query(DELETE FROM product WHERE manufacturer=$hidden_manuf_id,$bb)
or die(mysql_error());
PHP server doesn't see the variable because it is inside the string
quotes.

If I do this:
mysql_query(DELETE FROM product WHERE manufacturer=$hidden_manuf_id,$bb)
or die(mysql_error());
PHP server reports a parsing error.

What is the correct syntax?  ($bb is correctly defined.)




[PHP] Re: Creating a voting system.

2002-10-16 Thread Baroiller Pierre-Emmanuel

take a look on php website, there is a lot of scripts for this :
http://www.hotscripts.com   others.

Regards.
P.E.

Thomas Goeminne [EMAIL PROTECTED] a écrit dans le message de news:
[EMAIL PROTECTED]
 Hello,

 I am making a page where people can vote for their favourite image. People
 can give points from 1 to 5. I want the votes counted in a table in my
mysql
 dbbase called votes. How do I make such a system?

 thank you for helpfull hints.







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




Re: [PHP] $_FILES posting limited to 5?

2002-10-16 Thread Juhan Kundla

Ühel ilusal päeval [16-10-2002 16:48] kirjutas Jason Young:
 I'm going to approach this question in a different way, in case some 
 people were put off by the complexity of it yesterday.
 
 For all those who don't know my question from yesterday, I have a form 
 where I can upload up to 9 files at a time. Unfortunately, only the 
 first 5 of those files are being uploaded at any given time.
 
 As a test, I just created a simple form with only input type 'file's, 
 and attempted to find out how many its attempting to parse. It is still 
 only 5.

[cut]

Doesn't this have something to do with browser being able only to make
maximum 5 tcp connections at a time? Perhaps, a stupid idea, though...

Juhan

-- 
Vastus: Sest inimene loeb suunaga ülevalt alla.
Küsimus: Miks ülalpool vastamine on halb?

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




Re: [PHP] $_FILES posting limited to 5?

2002-10-16 Thread Timothy Hitchens

IE can only have two concurrent connections open... eg if you have a 
http 1.1 connection open for say a ongoing cgi/php call (ping or 
traceroute) then you make another call for the same script and then a 
further call to the server the last call will just sit there spinning 
it's wheeels until on of the others in finished... the same is for 
downloads using IE ..you can fix this with a reg hack.


Timothy Hitchens (HiTCHO)
Web Application Analyst and Developer
e-mail: [EMAIL PROTECTED]
mobile: 0419 521 440


Juhan Kundla wrote:
 Ühel ilusal päeval [16-10-2002 16:48] kirjutas Jason Young:
 
I'm going to approach this question in a different way, in case some 
people were put off by the complexity of it yesterday.

For all those who don't know my question from yesterday, I have a form 
where I can upload up to 9 files at a time. Unfortunately, only the 
first 5 of those files are being uploaded at any given time.

As a test, I just created a simple form with only input type 'file's, 
and attempted to find out how many its attempting to parse. It is still 
only 5.
 
 
 [cut]
 
 Doesn't this have something to do with browser being able only to make
 maximum 5 tcp connections at a time? Perhaps, a stupid idea, though...
 
 Juhan
 

-- 
Timothy Hitchens (HiTCHO)
Web Application Analyst and Developer
e-mail: [EMAIL PROTECTED]
mobile: 0419 521 440



-
HiTCHO Group - ABN: 85 816 540 110
Web Site: http://www.hitcho.com.au/
Snail Mail: PO Box 101 Arana Hills QLD 4054
Telephone: 07 3351 0951 - Facsimile: 07 3351 0952


IMPORTANT:
This email may be the view of the individual and
not that of the organisation. The contents of
this electronic mail (including attachments) may
be privileged and commercially confidential.

Any unauthorised use of the contents is expressly
prohibited. If you have received this document in
error, please advise us by telephone immediately
and then delete the document.



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




[PHP] Odd finding while researching $_FILES

2002-10-16 Thread Jason Young

Without going into the process of how I came to do this, I just wanted 
to throw out there that even if you only have 1 file input, it still 
seems to loop 5 times...

Is this something with my code...

--
$current = 0;

while (list($key) = each($_FILES['picname'])) {
   echo $current;
   $current++;
}
--

...or is there something freaky going on with the $_FILES array?

-J


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




Re: [PHP] Sessions: Trigger a new one, Expire an old one

2002-10-16 Thread Max Buvry


Hi,

I use php 4.2.3 with session.auto_start = 1 in php.ini


What I use with URL session :

  $_SESSION= array();
  unset($_GET[session_name()]);
  session_destroy();
  Header(Location: next_script.php);

with cookie session :

   $cook_param= session_get_cookie_params();
   $life_time= $cook_param['lifetime'];
   $path= $cook_param['path'];
   setcookie(session_name(),,$life_time,$path);
   $_SESSION= array(); 
   session_destroy();

mb



Jonathan Sharp wrote:
 
 Ok, here is my solution:
 
 I wanted this to be as self contained as possible:
 
 function clean()
 {
 /* get name of session  find session id */
 $name = ini_get('session.name');
 $sessid = ( !$_COOKIE[$name] ?
  ( !$_GET[$name] ?
  ( !$_POST[$name] ? false :  $_POST[$name] ) :
  $_GET[$name] ) :
  $_COOKIE[$name] );
 
 /* run query now to see if sesion is expired, if yes */
 unset( $_COOKIE[$name] );
 unset( $_GET[$name] );
 unset( $_POST[$name] );
 unset( $_REQUEST[$name] );
 }
 
 clean();
 session_start();
 
 Since _COOKIE/etc needs to be UNSET before session_start is called and
 re-calling session_start does sqat, the above code (not all of it but
 general idea) 'finds' the session id (session_id() has no effect until
 session_start is called) and tests to see if it's expired, if so, it
 'kills' all possible locations for session_start() to find an id.
 
 *simple*... (or something like that)
 
 -js
 
 Chris Shiflett wrote:
  Yeah, John hinted at the answer there.
 
  You just need to make the session ID go away prior to starting the
  session . Just unset it or set it to the empty string or whatever you
  want to do.
 
  It is probably either $_COOKIE[PHPSESSID] or $_GET[PHPSESSID].
 
  Chris
 
  John W. Holmes wrote:
 
  Simple question. If a users session expires or has timed out, how do
 
  I 'force' php to generate a new sessionId?
 
 
  Session_start() ??
 
  If there isn't a session id present, it'll create one.
 
  ---John Holmes...
 
 
 

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




RE: [PHP] Blank PHP pages..

2002-10-16 Thread Angel Gabriel

I checked and register_globals is set to on - so that can't be the
problem.

-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 16, 2002 2:33 PM
To: 'Angel Gabriel'; [EMAIL PROTECTED]
Subject: RE: [PHP] Blank PHP pages..


[snip]
 I've got PHP working, on my server, I know this because I used that
small PHP script that shows all the variables, and that worked fine. The
problem seems to be that every other script shows me a blank pages. I'm
using redhat 7.3,  and I installed PHP, MySQL and Apache from RPM's and they
are all up2date - I have no idea what I could have missed. Has anyone else
encountered a similar problem, and if so, how did you remedy it? I have
followed the install instructions to the letter, and I can't seem to find
what the problem is. Any suggestions, hints or tips, greatfully recieved!
Thanks in advance
[/snip]

Check register_globals in php.ini. It is probably set to off

HTH!

Jay




---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.404 / Virus Database: 228 - Release Date: 10/15/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.404 / Virus Database: 228 - Release Date: 10/15/2002



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




[PHP] windows specific: printer_ functions...

2002-10-16 Thread Brian McGarvie

I have a specific problem ;)

I have been asked if it is possible to write a 'simple' application that
will print onto Bank Cheques - they will be supplied on a continuous roll
aparently, so it'll be one cheque followed by another etc perferated
inbetween...

So my question is has anyone ever tried this or similar? or even if you
have'nt has anyone got any pointers to start me off?

Alternativley is there any software already out there?

I have been looking but can only find things like Sage, which ha all the
stock controll etc etc which is not required, the application will simple be
to take a series name's  ammount's and print the cheques...

Thanks in advance...

Brian M McGarvie ([EMAIL PROTECTED][EMAIL PROTECTED])
IT/Web Apps Specialist
www.anypurposeloans.co.uk -- www.mcgarvie.net



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




[PHP] Date formatting from a mySQL timestamp

2002-10-16 Thread Ricardo Fitzgerald

Hi,

I have the following query :
for($i = 0; $i =$num_results; $i++)
{
$row = mysql_fetch_object($result);
echo table width =\100%\ border =\0\ cellpadding = \3\\n
   .tr\n
   .td bgcolor = \#ee\ align = \left\$row-id/td\n
   .td bgcolor = \#ee\ align = \left\$row-Nombre/td\n
   .td bgcolor = \#ee\ align = \left\$row-Apellido/td\n
   .td bgcolor = \#ee\ align = \left\$row-Direccion/td\n
   .td bgcolor = \#ee\ align = \left\$row-Ciudad/td\n
   .td bgcolor = \#ee\ align = \left\$row-Telefono/td\n
   .td bgcolor = \#ee\ align = \left\$row-Mail/td\n
   .td bgcolor = \#ee\ align = \left\$row-Pais/td\n
   .td bgcolor = \#ee\ align = \left\.date(r,
$row-date).td\n
// My problem is it's getting the wrong date no matter what I do, every line
displays Jan 2038 !!!
   ./tr\n
   ./table\n;
If I try another strings i got errors the row $date is in MYSQL unix
timestamp. and i would like to format it.
BTW I would like a better alignment and format also ...

TIA

Regards,

Rick


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




Re: [PHP] $_FILES posting limited to 5?

2002-10-16 Thread Brent Baisley

I hadn't thought about that, but it does sound like a possibility. 
Although a browser isn't limited to 5 connections at a time. It is 
usually set by the user and in my experience defaults to 4 and can be 
set as high as 8. Most users (or even programmers) don't know about this 
simple setting. It helps when you have a fast pipe (set to 8) or slow 
pipe (set to 4). So perhaps it does have a hand in setting an upload 
limit.


On Wednesday, October 16, 2002, at 11:03 AM, Juhan Kundla wrote:

 Doesn't this have something to do with browser being able only to make
 maximum 5 tcp connections at a time? Perhaps, a stupid idea, though...
--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search  Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577


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




Re: [PHP] $_FILES limited to 5? (Server versions)

2002-10-16 Thread Juhan Kundla

Ühel ilusal päeval [16-10-2002 16:50] kirjutas Jason Young:
 Just wanted to let everyone know:
 
 PHP version is 4.2.1
 Apache is 1.3.24
 
 Running WindowsXP Pro

Running Windows? Hm. I remember something similar, when I was sysadmin
and I used Windows NT 4.0 Workstation as a file server. The workstation
release of Windows NT had the limitation of only 5 simultaneous network
connections. To allow more connections we had to upgrade to Windows NT
Server version. I haven't used Windows quite a long time and perhaps
this is irrelevant, but i wouldn't be surprised, if this is another
trick Bill uses to loot your wallet.

Juhan

-- 
Vastus: Sest inimene loeb suunaga ülevalt alla.
Küsimus: Miks ülalpool vastamine on halb?

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




Re: [PHP] $_FILES posting limited to 5?

2002-10-16 Thread Tom Rogers

Hi,

Wednesday, October 16, 2002, 11:49:04 PM, you wrote:
JY I'm going to approach this question in a different way, in case some 
JY people were put off by the complexity of it yesterday.

JY For all those who don't know my question from yesterday, I have a form 
JY where I can upload up to 9 files at a time. Unfortunately, only the 
JY first 5 of those files are being uploaded at any given time.

JY As a test, I just created a simple form with only input type 'file's, 
JY and attempted to find out how many its attempting to parse. It is still 
JY only 5.

JY I have posted the full code below so people might be able to try it on 
JY their own systems... please let me know what you might find:

picname has 5 sub arrays called:

name()
type()
tmp_name()
error()
size()

You need to loop through those sub arrays like:

while (list($key) = each($_FILES['picname'])) {
echo $key ;
while(list($key2,$val2) = each($_FILES['picname'][$key])){
echo [$key2] $val2 ;
}
echo 'br';
}

print_r($_FILES) will show you all.





-- 
regards,
Tom


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




Re[2]: [PHP] Blank PHP pages..

2002-10-16 Thread Tom Rogers

Hi,

Thursday, October 17, 2002, 12:58:02 AM, you wrote:
AG I checked and register_globals is set to on - so that can't be the
AG problem.

Stop teasing us and show us the code you have on those pages :)

-- 
regards,
Tom


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




Re: [PHP] Blank PHP pages..

2002-10-16 Thread Marek Kilimajer

Do you get at least any output, i.e. empty html document? Check in the 
logs if your server is not dying.

Angel Gabriel wrote:

I checked and register_globals is set to on - so that can't be the
problem.

-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 16, 2002 2:33 PM
To: 'Angel Gabriel'; [EMAIL PROTECTED]
Subject: RE: [PHP] Blank PHP pages..


[snip]
 I've got PHP working, on my server, I know this because I used that
small PHP script that shows all the variables, and that worked fine. The
problem seems to be that every other script shows me a blank pages. I'm
using redhat 7.3,  and I installed PHP, MySQL and Apache from RPM's and they
are all up2date - I have no idea what I could have missed. Has anyone else
encountered a similar problem, and if so, how did you remedy it? I have
followed the install instructions to the letter, and I can't seem to find
what the problem is. Any suggestions, hints or tips, greatfully recieved!
Thanks in advance
[/snip]

Check register_globals in php.ini. It is probably set to off

HTH!

Jay




---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.404 / Virus Database: 228 - Release Date: 10/15/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.404 / Virus Database: 228 - Release Date: 10/15/2002



  



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




Re: [PHP] Date formatting from a mySQL timestamp

2002-10-16 Thread 1LT John W. Holmes

 I have the following query :
 for($i = 0; $i =$num_results; $i++)
 {
 $row = mysql_fetch_object($result);
 echo table width =\100%\ border =\0\ cellpadding = \3\\n
.tr\n

You can save some typing if you just set the bgcolor in the tr, instead of
each td, FYI. Also, align defaults to left, doesn't it? So you can
probably leave that out, also.

.td bgcolor = \#ee\ align = \left\$row-id/td\n
.td bgcolor = \#ee\ align = \left\$row-Nombre/td\n
.td bgcolor = \#ee\ align = \left\$row-Apellido/td\n
.td bgcolor = \#ee\ align =
\left\$row-Direccion/td\n
.td bgcolor = \#ee\ align = \left\$row-Ciudad/td\n
.td bgcolor = \#ee\ align = \left\$row-Telefono/td\n
.td bgcolor = \#ee\ align = \left\$row-Mail/td\n
.td bgcolor = \#ee\ align = \left\$row-Pais/td\n
.td bgcolor = \#ee\ align = \left\.date(r,
 $row-date).td\n
 // My problem is it's getting the wrong date no matter what I do, every
line
 displays Jan 2038 !!!

I think you're confused here. MySQL uses a different style timestamp than a
Unix timestamp. Unix timestamps are the number of seconds since Jan 01,
1970. MySQL timestamps are in a MMDDHHMMSS format. If you've used a
TIMESTAMP, DATE, or DATETIME column in MySQL, then you have a MySQL
timestamp. The MySQL timestamp is not compatible with the PHP date()
function, it is expecting a Unix timestamp.

So...the solution is one of two things. You can use an INT column and store
the unix timestamp into it. You can create the unix timstamp in PHP with
time(), mktime(), or strtotime() (among others), and format it with the
date() function. Or, you can continue to use a MySQL type timestamp and use
the MySQL function DATE_FORMAT() to format the dates _in your query_.
DATE_FORMAT() is the MySQL equivilent of PHP's date() function. Or, as a
third option, you can use the MySQL UNIX_TIMESTAMP() function to create a
Unix timestamp from the MySQL timestamp and return that to PHP. You can then
use that in  your date() function.

Confusing, eh? If you have any questions, I can explain it further.

---John Holmes...


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




Re: [PHP] $_FILES posting limited to 5?

2002-10-16 Thread Jason Young

BEAUTIFUL!

This was the problem...  it wasn't that there was a limit of 5 maximum 
uploads, it was just that my 'while' statement was only counting as many 
fields as the first sub-array for $_FILES.. which is 5.

Tom, thanks a bunch!
-Jason

Tom Rogers wrote:

 Hi,

 Wednesday, October 16, 2002, 11:49:04 PM, you wrote:
 JY I'm going to approach this question in a different way, in case some
 JY people were put off by the complexity of it yesterday.

 JY For all those who don't know my question from yesterday, I have a 
 form
 JY where I can upload up to 9 files at a time. Unfortunately, only the
 JY first 5 of those files are being uploaded at any given time.

 JY As a test, I just created a simple form with only input type 'file's,
 JY and attempted to find out how many its attempting to parse. It is 
 still
 JY only 5.

 JY I have posted the full code below so people might be able to try 
 it on
 JY their own systems... please let me know what you might find:

 picname has 5 sub arrays called:

 name()
 type()
 tmp_name()
 error()
 size()

 You need to loop through those sub arrays like:

 while (list($key) = each($_FILES['picname'])) {
 echo $key ;
 while(list($key2,$val2) = each($_FILES['picname'][$key])){
 echo [$key2] $val2 ;
 }
 echo '
 ';
 }

 print_r($_FILES) will show you all.







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




Re: [PHP] Option value

2002-10-16 Thread 1LT John W. Holmes

   Is it possible to extract the value option which item name selected..for
 example i am having list of soap brand in the options..is it possible that
 to tell that the user seleced this brand of soap while in the submittion
 of the form..can any one please tell me how to do this..

Umm...that's what PHP does, isn't it?

form method=GET
select name=soap
option value=DoveDove/option
option value=ZestZest/option
/select
input type=submit
/form

When that form is submitted, you'll have a variable $_GET['soap'] that'll be
equal to either Zest or Dove, depending on what the user chose.

Maybe you are missing the value= in your option tags?

---John Holmes...


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




RE: [PHP] Re: PHP XML

2002-10-16 Thread .: B i g D o g :.

I am all for the power of XML, another benefit is the ability to have
many themes for your viewer.  Plus, if you are writing a CMS or portal
of some sort you can have your users create their own themes without
ever touching the data layers.

They just need to create some XSLT pages and that is it.  

Another benefit is RSS and allowing users to pull information from your
website.  Heaven knows that u want your users to frequent ur website. 
So you can allow them to pull info directly.

Also a great way to incorporate a cacheing system as well.


On Wed, 2002-10-16 at 00:35, Simon Taylor wrote:
 To me this is a lot of work and processing for limited benefits, a simple db
 abstraction layer provides you with a divide between you db queries and the
 presentation of your site, what benefits do you see in doing this?
 Cheers
 Simon
 
 -Original Message-
 From: Alexandru COSTIN [mailto:[EMAIL PROTECTED]] 
 Sent: 15 October 2002 18:50
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: PHP  XML
 
 
 Hello,
 
 Most of what you are looking for is already implemented and fully working in
 
 our Krysalis Professional platform.
 
 We help you create dynamic XML files, we provide you reusable taglibs  to 
 avoid rewriting similar code multiple times, wr provide various levels of 
 caching and many more.
 
 Please se more details at : http://www.interakt.ro/products/
 
 Alexandru
 
  Let me preface this by saying that I know the benefits of using XML 
  with regards to portability and extensibility. Here is the issue I 
  face.  I have all of my data stored in a MySQL database.  I'm 
  considering reworking my website so that it uses XML (after being 
  converted from resultant records in my DB) to transmit  XSLT to 
  transform and display the data to my end user. There are a few 
  benifits I can see in sending XML messages as part of the back end 
  processing.  However, that seems to be out- weighed by the amount of 
  processing that's going to need to take place in actually serving the 
  data to the user. First I have to query and pull the records from the 
  database.  Then, I need to send those records to a function (or 
  functions) to convert it to XML.  Then, I need to take that XML data 
  and have PHP use an XSL stylesheet to transform it to HTML before it, 
  finally, gets sent on to the browser.  So that's basically 2 
  conversions that take place on the back end.
  How much experience have any of you had with doing that?  Does
  it take significantly longer to serve the pages; is there a noticible
  performance hit?  Do you realize more benifit for the back end
  processes when using XML that makes any additional time it takes
  to display a page to the user worth it?
  I'd love to hear about people's experience with this kind of thing so I
  can better make a decision wrt whether or not I should even go down
  this route.
  
  thnx,
  Chris
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


-- 
.: B i g D o g :.


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




RE: [PHP] Blank PHP pages.

2002-10-16 Thread Angel Gabriel

I get absolutly NOTHING! I get the most basic HTML page, but blank, as in
the following

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN
HTMLHEAD
META content=text/html; charset=windows-1252
http-equiv=Content-Type/HEAD
BODY/BODY/HTML



-Original Message-
From: Marek Kilimajer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 16, 2002 4:26 PM
To: PHP
Subject: Re: [PHP] Blank PHP pages.


Do you get at least any output, i.e. empty html document? Check in the
logs if your server is not dying

Angel Gabriel wrote:

I checked and register_globals is set to on - so that can't be the
problem

-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 16, 2002 2:33 PM
To: 'Angel Gabriel'; [EMAIL PROTECTED]
Subject: RE: [PHP] Blank PHP pages.


[snip]
 I've got PHP working, on my server, I know this because I used that
small PHP script that shows all the variables, and that worked fine. The
problem seems to be that every other script shows me a blank pages. I'm
using redhat 7.3,  and I installed PHP, MySQL and Apache from RPM's and
they
are all up2date - I have no idea what I could have missed. Has anyone else
encountered a similar problem, and if so, how did you remedy it? I have
followed the install instructions to the letter, and I can't seem to find
what the problem is. Any suggestions, hints or tips, greatfully recieved!
Thanks in advance
[/snip]

Check register_globals in php.ini. It is probably set to off

HTH!

Jay




---
Incoming mail is certified Virus Free
Checked by AVG anti-virus system (http://www.grisoft.com)
Version: 6.0.404 / Virus Database: 228 - Release Date: 10/15/2002

---
Outgoing mail is certified Virus Free
Checked by AVG anti-virus system (http://www.grisoft.com)
Version: 6.0.404 / Virus Database: 228 - Release Date: 10/15/2002







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



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.404 / Virus Database: 228 - Release Date: 10/15/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.404 / Virus Database: 228 - Release Date: 10/15/2002



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




[PHP] Modulo eleven function?

2002-10-16 Thread Børge Strand


Is anyone of you aware of a modulo eleven function that is used to
calculate the checksum of a creditcard number?

I have a pretty crude code listing from a book, but what I look for is
a function that can append the checksum digit to a number. 

I have the spec for the algorithm behind the checksum already, so I
can surely write the function myself, I was just wondering if it was
already out there. 

And to any Norwegian readers (or whoever makes sense of this), is it
right that the modulo eleven is also used to generate the checksum of
KID numbers in payments?


Regards,
Børge

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




Re: [PHP] Blank PHP pages.

2002-10-16 Thread Jason Young

Make sure all of your code is executing properly.

I had this problem for a little bit, actually.
Edit your php settings to give you errors on the output, or just check 
your server logs.. there's gotta be something there.

Just one problem and my whole PHP page failed to print anything within 
? / ? tags.

Angel Gabriel wrote:

 I get absolutly NOTHING! I get the most basic HTML page, but blank, as in
 the following



 -Original Message-
 From: Marek Kilimajer [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, October 16, 2002 4:26 PM
 To: PHP
 Subject: Re: [PHP] Blank PHP pages.


 Do you get at least any output, i.e. empty html document? Check in the
 logs if your server is not dying

 Angel Gabriel wrote:


 I checked and register_globals is set to on - so that can't be the
 problem
 
 -Original Message-
 From: Jay Blanchard [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, October 16, 2002 2:33 PM
 To: 'Angel Gabriel'; [EMAIL PROTECTED]
 Subject: RE: [PHP] Blank PHP pages.
 
 
 [snip]
  I've got PHP working, on my server, I know this because I used that
 small PHP script that shows all the variables, and that worked fine. The
 problem seems to be that every other script shows me a blank pages. I'm
 using redhat 7.3,  and I installed PHP, MySQL and Apache from RPM's and

 they

 are all up2date - I have no idea what I could have missed. Has anyone 
 else
 encountered a similar problem, and if so, how did you remedy it? I have
 followed the install instructions to the letter, and I can't seem to find
 what the problem is. Any suggestions, hints or tips, greatfully recieved!
 Thanks in advance
 [/snip]
 
 Check register_globals in php.ini. It is probably set to off
 
 HTH!
 
 Jay
 
 
 
 
 ---
 Incoming mail is certified Virus Free
 Checked by AVG anti-virus system (http://www.grisoft.com)
 Version: 6.0.404 / Virus Database: 228 - Release Date: 10/15/2002
 
 ---
 Outgoing mail is certified Virus Free
 Checked by AVG anti-virus system (http://www.grisoft.com)
 Version: 6.0.404 / Virus Database: 228 - Release Date: 10/15/2002
 
 
 
 
 



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



 ---
 Incoming mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.404 / Virus Database: 228 - Release Date: 10/15/2002

 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.404 / Virus Database: 228 - Release Date: 10/15/2002




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




  1   2   >