Re: [PHP] Selecting what's for deletion

2002-12-27 Thread Marek Kilimajer
Make the "Delete" button a link with 
href="delcategory.php?catid=$catid", maybe with additional
information so you can redirect the browser back to where it has been 
(page #, parent category ...)

Cesar Aracena wrote:

Hi all,

I'm making the administration part of a site which handles categories,
sub categories and products. Inside the "Categories" part, there's a
"List categories" button which gives a list of the categories and sub
categories when pressed. Along with each category, there's a "Delete"
button that, when pressed, it's supposed to delete that category from
the DB. The problem here is that the lists is made dynamically using a
FOR loop and is being placed inside a FORM so the action is handled
through an ACTION="" tag.

Now, the ACTION tag points to a php file which deletes the desired row
in the DB. The question is how to tell that php file (through GET or
POST) which row to delete... My first shot was to name each "Delete" or
submit button inside form like "delcategory?catid=0001" but then the
POST wasn't reading that...

Any thoughts? Thanks in advance,

Cesar L. Aracena
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(0299) 156-356688
Neuquén (8300) Capital
Argentina




 



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




Re: [PHP] language internationalisation

2002-12-27 Thread Marek Kilimajer
Look at projects where it is done already (e.g. PhpNuke)
If the strings are static (simple translation of static strings), keep 
it in a file as variables or constants, for
dynamic content you may use separate table for language independent 
information and another table for
language dependent info, with corresponding id and language id.
Example:
table stocks: stock_id, price, quantity
table stock_description: stock_id, language_id, name, description

Html output: the user should have the necesery fonts installed, you just 
need to output the correct header
about the charset being used, e.g. header('Content-type: text/html; 
charset='. $charset); or  tag

Denis L. Menezes wrote:

Hello friends,

As the subject suggests I am looking for language capabilitie on my php webpages.

Can someone please tell me which is a good way? I thought that I could have a database, but if so, can MySQL: handle multiple languages in the fields(like chinese language)? if this is possible, what about the html output : does the user need to install some fonts etc ?

Thanks very much
Denis
 



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




RE: [PHP] Selecting what's for deletion

2002-12-27 Thread Cesar Aracena
Thanks John and Marek for your fast responses. I made the decision to
opt for the "hidden" tag option. Now, I'll show you the part of my code
that hangs when trying to make what I intend it to do.



$query1 = "DELETE * FROM maracat WHERE catid = $catid";
$result1 = mysql_query($query1) or die (mysql_errno());

$query2 = "DELETE * FROM marasubcat WHERE catid = $catid";
$result2 = mysql_query($query2) or die (mysql_errno());

$query3 = "DELETE * FROM maraprod WHERE catid = $catid";
$result3 = mysql_query($query3) or die (mysql_errno());

echo "Accion taken";
echo "Back";



I know that it's very tedious to write 1 query for each action taking
place, but I think this is easier for me to change in the future. Now,
the page gets stuck when reaching this level and doesn't process what I
ordered... Any thoughts? Thanks in advance,

Cesar L. Aracena
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(0299) 156-356688
Neuquén (8300) Capital
Argentina


-Mensaje original-
De: John W. Holmes [mailto:[EMAIL PROTECTED]] 
Enviado el: jueves, 26 de diciembre de 2002 18:32
Para: 'Cesar Aracena'; [EMAIL PROTECTED]
Asunto: RE: [PHP] Selecting what's for deletion

> I'm making the administration part of a site which handles categories,
> sub categories and products. Inside the "Categories" part, there's a
> "List categories" button which gives a list of the categories and sub
> categories when pressed. Along with each category, there's a "Delete"
> button that, when pressed, it's supposed to delete that category from
> the DB. The problem here is that the lists is made dynamically using a
> FOR loop and is being placed inside a FORM so the action is handled
> through an ACTION="" tag.
> 
> Now, the ACTION tag points to a php file which deletes the desired row
> in the DB. The question is how to tell that php file (through GET or
> POST) which row to delete... My first shot was to name each "Delete"
or
> submit button inside form like "delcategory?catid=0001" but then the
> POST wasn't reading that...
> 
> Any thoughts? Thanks in advance,

You could use a bunch of forms, if you want to use a button. Since
you're using a while() loop, it wouldn't be a big deal...

While(fetching_from_db)
{
  
  
  Other data
  
  
}

Then the delete button on each row is for it's own form with a hidden
cat_id element that you can use to tell which row to delete.

Even better would be to use checkboxes, so you can delete multiple rows
at one. Name them 

And when it's submitted all of the checked boxes will be in
$_POST['delete'], so you can do this:

$delete_ids = implode(",",$_POST['delete']);
$query = "DELETE FROM table WHERE ID IN ($delete_ids)";

Add in your own validation, of course...

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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


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




[PHP] CLI delay

2002-12-27 Thread Maciek Ruckgaber Bielecki
Hi guys !!
im starting on this list today so hello to everyone :-)
i have been programming in php for 2 years now, so i hope i may be
helpfull.
on the other hand im quite new to CLI PHP, an here my first question on
the list :

has anyone an idea of how can i do some kind of decent delay (instead of
some shell_exec doing pings)  :-P

thanks,
regards ...

--
"Few are those who see with their own eyes and feel with their own
hearts."
Albert Einstein
-
Maciek Ruckaber Bielecki




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




Re: [PHP] CLI delay

2002-12-27 Thread Marek Kilimajer
sleep();
usleep();

Maciek Ruckgaber Bielecki wrote:


Hi guys !!
im starting on this list today so hello to everyone :-)
i have been programming in php for 2 years now, so i hope i may be
helpfull.
on the other hand im quite new to CLI PHP, an here my first question on
the list :

has anyone an idea of how can i do some kind of decent delay (instead of
some shell_exec doing pings)  :-P

thanks,
regards ...

--
"Few are those who see with their own eyes and feel with their own
hearts."
Albert Einstein
-
Maciek Ruckaber Bielecki




 



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




Re: [PHP] CLI delay

2002-12-27 Thread Rick Widmer
At 03:55 AM 12/27/02 -0500, Maciek Ruckgaber Bielecki wrote:


has anyone an idea of how can i do some kind of decent delay (instead of
some shell_exec doing pings)  :-P



Have you tried sleep()?

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

Rick


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




RE: [PHP] Selecting what's for deletion

2002-12-27 Thread John W. Holmes
> Thanks John and Marek for your fast responses. I made the decision to
> opt for the "hidden" tag option. Now, I'll show you the part of my
code
> that hangs when trying to make what I intend it to do.
> 
> 
> 
> $query1 = "DELETE * FROM maracat WHERE catid = $catid";
> $result1 = mysql_query($query1) or die (mysql_errno());
> 
> $query2 = "DELETE * FROM marasubcat WHERE catid = $catid";
> $result2 = mysql_query($query2) or die (mysql_errno());
> 
> $query3 = "DELETE * FROM maraprod WHERE catid = $catid";
> $result3 = mysql_query($query3) or die (mysql_errno());
> 
> echo "Accion taken";
> echo "Back";
> 
> 
> 
> I know that it's very tedious to write 1 query for each action taking
> place, but I think this is easier for me to change in the future. Now,
> the page gets stuck when reaching this level and doesn't process what
I
> ordered... Any thoughts? Thanks in advance,

Do you get an errorno() or does it just not delete? It's better to echo
mysql_error() along with mysql_errno() in your die() statement.

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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




php-general Digest 27 Dec 2002 11:32:06 -0000 Issue 1787

2002-12-27 Thread php-general-digest-help

php-general Digest 27 Dec 2002 11:32:06 - Issue 1787

Topics (messages 129388 through 129423):

Re: Open HTTPS connection
129388 by: Sean Burlington

Re: Nested Arrays
129389 by: Weston Houghton
129390 by: Weston Houghton
129391 by: Wee Keat [Amorphosium]
129395 by: Beauford.2002
129402 by: Wee Keat [Amorphosium]
129414 by: Paul Reed

php+gd 2.0.7 problems take 2
129392 by: cj

str_replace
129393 by: Weston Houghton
129396 by: John W. Holmes
129397 by: Weston Houghton

Cheap Hosting
129394 by: Stephen
129398 by: Rick Emery
129405 by: Kyle Gibson
129407 by: Jason k Larson
129409 by: Daniel Kushner

Photos and logos in MySQL + PHP
129399 by: Denis L. Menezes
129400 by: Michael J. Pawlowsky
129401 by: Rick Widmer

include "problem"
129403 by: Pag
129404 by: Rasmus Lerdorf

odd results inquiry
129406 by: Tony Tzankoff
129408 by: Michael J. Pawlowsky
129410 by: Michael J. Pawlowsky

How To Use The next() and prev() functions on multi-dimensional arrays
129411 by: . Nilaab
129412 by: Jason k Larson

Re: Finding # of weekdays between 2 dates..
129413 by: Marek Kilimajer

Re: Installing PHP on XP
129415 by: Marek Kilimajer

Re: Unable to set permissions
129416 by: Marek Kilimajer

Re: Selecting what's for deletion
129417 by: Marek Kilimajer
129419 by: Cesar Aracena
129423 by: John W. Holmes

Re: language internationalisation
129418 by: Marek Kilimajer

CLI delay
129420 by: Maciek Ruckgaber Bielecki
129421 by: Marek Kilimajer
129422 by: Rick Widmer

Administrivia:

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

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

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


--

--- Begin Message ---
John W. Holmes wrote:

What are the different ways to open an HTTPS connection from within a
script and receive back the response into a variable? I know CURL can do
it, and PHP 4.3 with OpenSSL can use fopen() to do it. Can sockets be
used at all with PHP 4.2 to get the page or maybe a system call to a
simple program to do it? This is going to be on a Win2K machine. Thanks
for any info. 


you could try lynx

http://lynx.isc.org/

its a text browser commanly available on Linux stystems but also 
available for dos/win32

it can retieve and dump to stdout either the raw file or the formatted 
text - and supports https.

--

Sean

--- End Message ---
--- Begin Message ---

Sure... for the longwinded approach, just do this:

$row1 = array("col1", "col2", "col3", ...);
$row2 = array("col1", "col2", "col3", ...);
$row3 = array("col1", "col2", "col3", ...);
$row4 = array("col1", "col2", "col3", ...);
$row5 = array("col1", "col2", "col3", ...);

$main_array = array($row1, $row2, $row3, $row4, $row5);

Obviously these could include key-value pairs in the arrays as well. 
Then to prove it to yourself:

print_r($main_array);

Cheers,
Wes


On Thursday, December 26, 2002, at 06:14  PM, Beauford.2002 wrote:

Hi,

Is there anyway to do a nested array, I have looked at the various 
array
functions and can't figure this out (if possible).

I want to be able to put each field of  a row into an array, and then 
put
that entire row and into another array.

so when I display it, I would have:

row1 - col1  col2  col3 col4 col5
row2 - col1  col2  col3 col4 col5
row3 - col1  col2  col3 col4 col5
row4 - col1  col2  col3 col4 col5
row5 - col1  col2  col3 col4 col5

etc. (depending on how many rows there are).

TIA



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




--- End Message ---
--- Begin Message ---

Sure... for the longwinded approach, just do this:

$row1 = array("col1", "col2", "col3", ...);
$row2 = array("col1", "col2", "col3", ...);
$row3 = array("col1", "col2", "col3", ...);
$row4 = array("col1", "col2", "col3", ...);
$row5 = array("col1", "col2", "col3", ...);

$main_array = array($row1, $row2, $row3, $row4, $row5);

Obviously these could include key-value pairs in the arrays as well. 
Then to prove it to yourself:

print_r($main_array);

Cheers,
Wes



On Thursday, December 26, 2002, at 06:14  PM, Beauford.2002 wrote:

Hi,

Is there anyway to do a nested array, I have looked at the various 
array
functions and can't figure this out (if possible).

I want to be able to put each field of  a row into an array, and then 
put
that entire row and into another array.

so when I display it, I would have:

row1 - col1  col2  col3 col4 col5
row2 - col1  col2  col3 col4 col5
row3 - col1  col2  col3 col4 col5
row4 - col1  col2  col3 col4 col5
row5 - col1  col2  col3 col4 col5

etc. (depending on how many rows there are).

TIA



--
PHP General Mailing Lis

[PHP] Re: Cheap Hosting

2002-12-27 Thread Shashwat Nagpal
I can suggest u the best then.. 40$ annually will be fine with you??? then mail me 
back!

Cheers!

Shashwat
www.shashwat.com
  "Stephen" <[EMAIL PROTECTED]> wrote in message 
001e01c2ad42$b4ff1d20$0200a8c0@melchior">news:001e01c2ad42$b4ff1d20$0200a8c0@melchior...
  Hello,

  I need a nice, reliable host for my new website. It needs to be fast, reliable, 
needs a good uptime, and some features. PHP and MySQL are the two I really need. Does 
anyone recomend one that's really cheap? So far I've found on, $5 a month, but it's 
slower then what'd I like. If nothing else pops up, I'll go with it. I'd also like 
domain parking and/or domain registration (don't really need the registration though). 
Thanks in advance!

  Thanks,
  Stephen Craton
  http://www.melchior.us

  "What is a dreamer that cannot persevere?" -- http://www.melchior.us


Re: [PHP] php+gd 2.0.7 problems take 2

2002-12-27 Thread Marek Kilimajer
Check the gd library, you should likely install the one on the other machine

cj wrote:


Hi would any one know what the following error's are for/mean
I am using gd 2.0.7 with gif support built in and php4.2.3
I am using the exact same gd version and php version as I used on another
machine and it compiled with only minor problems, but these errors are
different to the errors I got on the other machine.

Thanks

gcc -I. -I/usr/local/src/php-4.2.3/ext/gd -I/usr/local/src/php-4.2.3/main -I
/usr/local/src/php-4.2.3 -I/usr/local/src/apache_1.3.26/src/include -I/usr/l
ocal/src/apache_1.3.26/src/os/unix -I/usr/local/src/php-4.2.3/Zend -I/usr/lo
cal/include -I/usr/local/src/gd-2.0.7gif/ -I/usr/local/src/php-4.2.3/ext/mys
ql/libmysql -I/usr/local/pgsql/include -I/usr/local/src/php-4.2.3/ext/xml/ex
pat  -I/usr/local/src/php-4.2.3/TSRM -g -O2  -c gd.c && touch gd.lo
gd.c: In function `zm_startup_gd':
gd.c:303: `gdArc' undeclared (first use in this function)
gd.c:303: (Each undeclared identifier is reported only once
gd.c:303: for each function it appears in.)
gd.c:304: `gdPie' undeclared (first use in this function)
gd.c:305: `gdChord' undeclared (first use in this function)
gd.c:306: `gdNoFill' undeclared (first use in this function)
gd.c:307: `gdEdged' undeclared (first use in this function)
gd.c: In function `zif_imagecreatetruecolor':
gd.c:588: warning: assignment makes pointer from integer without a cast
gd.c: In function `zif_imagecreatefromstring':
gd.c:1093: `gdImageCreateFromGifCtx' undeclared (first use in this function)
gd.c: In function `zif_imagecreatefromgif':
gd.c:1235: `gdImageCreateFromGif' undeclared (first use in this function)
gd.c:1235: `gdImageCreateFromGifCtx' undeclared (first use in this function)
gd.c: In function `zif_imagegif':
gd.c:1462: `gdImageGifCtx' undeclared (first use in this function)
gd.c: In function `zif_imagecolorat':
gd.c:1626: structure has no member named `tpixels'
gd.c: In function `_php_image_convert':
gd.c:3521: `gdImageCreateFromGif' used prior to declaration
gd.c:3521: warning: assignment makes pointer from integer without a cast
make[3]: *** [gd.lo] Error 1
make[3]: Leaving directory `/usr/local/src/php-4.2.3/ext/gd'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/php-4.2.3/ext/gd'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/php-4.2.3/ext'
make: *** [all-recursive] Error 1


 



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




Re: [PHP] Nested Arrays

2002-12-27 Thread Marek Kilimajer
Simple:

while($rows[]=mysql_fetch_array($res)) {}

($res is a mysql result resource)

Beauford.2002 wrote:


Thanks for the info, but maybe I didn't give enough info.

I have a mysql database with up to 10 rows and 5 fields in each row.. I have
been reading up on some of the array functions, but haven't been able to get
anything to work.

TIA

- Original Message -
From: "Weston Houghton" <[EMAIL PROTECTED]>
To: "Beauford.2002" <[EMAIL PROTECTED]>
Cc: "PHP General" <[EMAIL PROTECTED]>
Sent: Thursday, December 26, 2002 6:19 PM
Subject: Re: [PHP] Nested Arrays


 

Sure... for the longwinded approach, just do this:

$row1 = array("col1", "col2", "col3", ...);
$row2 = array("col1", "col2", "col3", ...);
$row3 = array("col1", "col2", "col3", ...);
$row4 = array("col1", "col2", "col3", ...);
$row5 = array("col1", "col2", "col3", ...);

$main_array = array($row1, $row2, $row3, $row4, $row5);

Obviously these could include key-value pairs in the arrays as well.
Then to prove it to yourself:

print_r($main_array);

Cheers,
Wes


On Thursday, December 26, 2002, at 06:14  PM, Beauford.2002 wrote:

   

Hi,

Is there anyway to do a nested array, I have looked at the various
array
functions and can't figure this out (if possible).

I want to be able to put each field of  a row into an array, and then
put
that entire row and into another array.

so when I display it, I would have:

row1 - col1  col2  col3 col4 col5
row2 - col1  col2  col3 col4 col5
row3 - col1  col2  col3 col4 col5
row4 - col1  col2  col3 col4 col5
row5 - col1  col2  col3 col4 col5

etc. (depending on how many rows there are).

TIA



--
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] Nested Arrays

2002-12-27 Thread Marek Kilimajer
Sorry, now I reminded myself this would cause a false element at the end 
of $rows, use this:
while($tmp=mysql_fetch_array($res)) {
   $rows[]=$tmp;
}

Marek Kilimajer wrote:

Simple:

while($rows[]=mysql_fetch_array($res)) {}

($res is a mysql result resource)

Beauford.2002 wrote:


Thanks for the info, but maybe I didn't give enough info.

I have a mysql database with up to 10 rows and 5 fields in each row.. 
I have
been reading up on some of the array functions, but haven't been able 
to get
anything to work.

TIA

- Original Message -
From: "Weston Houghton" <[EMAIL PROTECTED]>
To: "Beauford.2002" <[EMAIL PROTECTED]>
Cc: "PHP General" <[EMAIL PROTECTED]>
Sent: Thursday, December 26, 2002 6:19 PM
Subject: Re: [PHP] Nested Arrays


 

Sure... for the longwinded approach, just do this:

$row1 = array("col1", "col2", "col3", ...);
$row2 = array("col1", "col2", "col3", ...);
$row3 = array("col1", "col2", "col3", ...);
$row4 = array("col1", "col2", "col3", ...);
$row5 = array("col1", "col2", "col3", ...);

$main_array = array($row1, $row2, $row3, $row4, $row5);

Obviously these could include key-value pairs in the arrays as well.
Then to prove it to yourself:

print_r($main_array);

Cheers,
Wes


On Thursday, December 26, 2002, at 06:14  PM, Beauford.2002 wrote:

  

Hi,

Is there anyway to do a nested array, I have looked at the various
array
functions and can't figure this out (if possible).

I want to be able to put each field of  a row into an array, and then
put
that entire row and into another array.

so when I display it, I would have:

row1 - col1  col2  col3 col4 col5
row2 - col1  col2  col3 col4 col5
row3 - col1  col2  col3 col4 col5
row4 - col1  col2  col3 col4 col5
row5 - col1  col2  col3 col4 col5

etc. (depending on how many rows there are).

TIA



--
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] Cheap Hosting

2002-12-27 Thread David T-G
Stephen --

...and then Stephen said...
% 
% Hello,

Hi!


% 
% I need a nice, reliable host for my new website. It needs to be fast, reliable, 
needs a good uptime, and some features. PHP and MySQL are the two I really need. Does 
anyone recomend one that's really cheap? So far I've found on, $5 a month, but it's 
slower then what'd I like. If nothing else pops up, I'll go with it. I'd also like 
domain parking and/or domain registration (don't really need the registration though). 
Thanks in advance!

This question has come up a number of times before.  Check the archives
for even more suggestions.

That said...  I offer php, mysql, ftp, multiple mail boxes, mailing
lists, yourdomain hosting/parking, and more; my server is at DataPipe
with good bandwidth and all of the goodies of a more expensive hosting
package (since that's what *I* have).


% 
% Thanks,
% Stephen Craton
% http://www.melchior.us
% 
% "What is a dreamer that cannot persevere?" -- http://www.melchior.us
% -- 
% PHP General Mailing List (http://www.php.net/)
% To unsubscribe, visit: http://www.php.net/unsub.php


HTH & HAND & Happy Holidays

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!




msg90763/pgp0.pgp
Description: PGP signature


[PHP] executable

2002-12-27 Thread Edward Peloke
Hello all,

Can php call an executable on the users machine?  I have some divx movies
and I want the user to be able to click on a link and the php page will open
the divx player and start to stream the movie.  is this possible?

Thanks,
Eddie


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




Re: [PHP] executable

2002-12-27 Thread Marek Kilimajer
No, you cannot execute commands on the users machine. However, if you 
use the right content-type
header and the user browser is set up to open movie streams in a player, 
you don't need it.

Edward Peloke wrote:

Hello all,

Can php call an executable on the users machine?  I have some divx movies
and I want the user to be able to click on a link and the php page will open
the divx player and start to stream the movie.  is this possible?

Thanks,
Eddie


 



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




[PHP] Does PHP recognize multiple selections in a form?

2002-12-27 Thread Micah Bushouse
grrr... I am trying to get several values from a selection form field (using
multiple) into PHP.  Is this possible?  The code I'm using to test this is
below.  After running the code and selecting more than one field, the last
field (the greatest number) is the only one that shows up as the only input
from the selection part of the form!!  Is there any other way??

thanks,
Micah








[] @ 




Item
 
'.$i.''."\n";
 }

?>








';
var_dump($_POST);
echo '';

echo '';
highlight_file($phpFile);
?>





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




Re: [PHP] executable

2002-12-27 Thread Michael J. Pawlowsky
Sure... with the use of the proper MIME type and if they have that MIME type mapped to 
that application.
Think of a PDF.. it gets sent out with the header Content-type: application/pdf
Your browser has a reference for that MIME type to link it to acrobat reader...
so it opens up reader (or the plug-in) and you can view the PDF.




*** REPLY SEPARATOR  ***

On 27/12/2002 at 9:20 AM [EMAIL PROTECTED] wrote:

>Hello all,
>
>Can php call an executable on the users machine?  I have some divx movies
>and I want the user to be able to click on a link and the php page will
>open
>the divx player and start to stream the movie.  is this possible?
>
>Thanks,
>Eddie
>
>
>--
>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] Does PHP recognize multiple selections in a form?

2002-12-27 Thread Marco Tabini
Hello Micah--

Yes, PHP supports multiple selections, but you need to change the name
of the control from submitID to submitID[], so that it will become an
array once inside your script.

Hope this helps!


Marco
-- 

php|architect - The Magazine for PHP Professionals
The monthly magazine dedicated to the world of PHP programming

Check us out on the web at http://www.phparch.com!

--- Begin Message ---
grrr... I am trying to get several values from a selection form field (using
multiple) into PHP.  Is this possible?  The code I'm using to test this is
below.  After running the code and selecting more than one field, the last
field (the greatest number) is the only one that shows up as the only input
from the selection part of the form!!  Is there any other way??

thanks,
Micah








[] @ 




Item
 
'.$i.''."\n";
 }

?>








';
var_dump($_POST);
echo '';

echo '';
highlight_file($phpFile);
?>





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



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


Re: [PHP] Does PHP recognize multiple selections in a form?

2002-12-27 Thread Marek Kilimajer

 ^^
Then $_POST['submitID'] will be an array with selected options

Micah Bushouse wrote:

grrr... I am trying to get several values from a selection form field (using
multiple) into PHP.  Is this possible?  The code I'm using to test this is
below.  After running the code and selecting more than one field, the last
field (the greatest number) is the only one that shows up as the only input
from the selection part of the form!!  Is there any other way??

thanks,
Micah




$phpSelf = $_SERVER['SCRIPT_NAME'];
$phpFile = $_SERVER['SCRIPT_FILENAME'];
$phpName = 'Multiple Selection Test';
$phpTimeRan = date('H:i.s');
$a='a';
$b='b';
?>




[] @ 




bgcolor="#003300"
cellpadding="4"
cellspacing="0"
border="4"
bordercolor="#00"
style="color:#ff;">
Item
 


for ($i=0;$i<10;$i++) {
 echo ''.$i.''."\n";
}

?>










echo '';
var_dump($_POST);
echo '';

echo '';
highlight_file($phpFile);
?>





 



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




RE: [PHP] Finding # of weekdays between 2 dates..

2002-12-27 Thread Chad Day
I should have specified, those dates were in US form.. so:

$nowdate = mktime(0, 0, 0, 1, 4, 2002);
$futuredate = mktime(0, 0, 0, 2, 5, 2002);

$futuredate - $nowdate equals 2764800
((2764800 / 86400) / 7) = 4.57142

then when floored, comes out to 4.

The only thing I can think of possibly getting around it is setting
futuredate to mktime(23, 59, 59, $month, $day, $year), but I still come up
short .. those two timestamps, after all the math before the floor(), equals
4.71, which still results in a 4.  I've tried ceil and round, but with
similar inaccuracies in other dates (going 1 day too far in some cases with
ceil).

Perhaps this function I found is just not the right way to go about it, but
if anyone has any more insight, it's greatly appreciated.

Chad

-Original Message-
From: Marek Kilimajer [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 27, 2002 2:48 AM
To: Chad Day
Cc: php general
Subject: Re: [PHP] Finding # of weekdays between 2 dates..


WFM:

$nowdate = mktime(0, 0, 0, 4, 1, 2002);
$futuredate = mktime(0, 0, 0, 5, 2, 2002);

echo weekdaysBetween ($nowdate,$futuredate,2);

I get 5

Chad Day wrote:

>I found this function in the list archives while searching on how to find
>the number of a weekday (say, Tuesdays) between 2 dates..
>
>  function weekdaysBetween ($timestamp1, $timestamp2, $weekday)
>  {
>return floor(intval(($timestamp2 - $timestamp1) / 86400) / 7)
>  + ((date('w', $timestamp1) <= $weekday) ? 1 : 0);
>  }
>
>Sometimes it works, but I've come across a date while testing this that
>doesn't work, which makes me think there is some bug in the function that
>I'm not seeing.
>
>The 2 dates I am trying are:
>
>01-04-2002
>and
>02-05-2002
>
>There should be 5 Tuesdays:
>
>01-08-2002
>01-15-2002
>01-22-2002
>01-29-2002
>02-05-2002
>
>Yet the script only returns 4, leaving off 02-05-2002.
>
>   $nowdate = mktime(0, 0, 0, $STARTMONTH, $STARTDAY, $STARTYEAR);
>   $futuredate = mktime(0, 0, 0, $ENDMONTH, $ENDDAY, $ENDYEAR);
>
>That's how I'm generating the time stamps to pass to the function, and I've
>confirmed the dates I've entered are correct..
>
>   echo weekdaysBetween($nowdate, $futuredate, 2);
>
>Returns 4 ..
>
>
>can anyone assist?
>
>Thanks,
>Chad
>
>
>
>



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




[PHP] Re: Does PHP recognize multiple selections in a form?

2002-12-27 Thread Micah Bushouse
Sweet!  It worked.  Thanks a lot!

btw: php|architect is good stuff.  My dad was complaining about not being
able to convert doc to pdf cheaply, and the next day I coincidentally got
the first issue.  He now uses the pdf converter at work!  keep it up!

~Micah



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




[PHP] XML-Presentationsystem from the Conf2002

2002-12-27 Thread Tobias Schlitt
Hi folks!

I saw the nice-looking presentationsystem, written in PHP and using XML, on
the PHP-Conference this year. I liked that very much and think it's must for
every PHP-related presentation. So, can anyone tell me, where to download
the system? Has anyone got it at home and could send me a quick tar-ball of
it per mail??

Thanks for your help! Hope you all had merry X-Mas!

Regards,
Toby



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




Re: [PHP] XML-Presentationsystem from the Conf2002

2002-12-27 Thread Rasmus Lerdorf
Check it out of cvs.  It is in the pres2 directory.

On Fri, 27 Dec 2002, Tobias Schlitt wrote:

> Hi folks!
>
> I saw the nice-looking presentationsystem, written in PHP and using XML, on
> the PHP-Conference this year. I liked that very much and think it's must for
> every PHP-related presentation. So, can anyone tell me, where to download
> the system? Has anyone got it at home and could send me a quick tar-ball of
> it per mail??
>
> Thanks for your help! Hope you all had merry X-Mas!
>
> Regards,
> Toby
>
>
>
> --
> 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-DEV] XML-Presentationsystem from the Conf2002

2002-12-27 Thread Derick Rethans
On Fri, 27 Dec 2002, Tobias Schlitt wrote:

> I saw the nice-looking presentationsystem, written in PHP and using XML, on
> the PHP-Conference this year. I liked that very much and think it's must for
> every PHP-related presentation. So, can anyone tell me, where to download
> the system? Has anyone got it at home and could send me a quick tar-ball of
> it per mail??

It's in CVS under the modules 'pres' and 'presentations', feel free to 
have a look.

Derick

-- 

-
 Derick Rethans http://derickrethans.nl/ 
 PHP Magazine - PHP Magazine for Professionals   http://php-mag.net/
-


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




[PHP] Re: [PHP-DEV] XML-Presentationsystem from the Conf2002

2002-12-27 Thread Derick Rethans
On Fri, 27 Dec 2002, Derick Rethans wrote:

> On Fri, 27 Dec 2002, Tobias Schlitt wrote:
> 
> > I saw the nice-looking presentationsystem, written in PHP and using XML, on
> > the PHP-Conference this year. I liked that very much and think it's must for
> > every PHP-related presentation. So, can anyone tell me, where to download
> > the system? Has anyone got it at home and could send me a quick tar-ball of
> > it per mail??
> 
> It's in CVS under the modules 'pres' and 'presentations', feel free to 
  -> pres2 (as rasmus stated).

Derick

-- 

-
 Derick Rethans http://derickrethans.nl/ 
 PHP Magazine - PHP Magazine for Professionals   http://php-mag.net/
-


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




[PHP] Reg Ex for replacing or with \n

2002-12-27 Thread Tom Beddard
I'm new to using regular expressions so i'm struggling a bit in making an
expression to replace  or  with \n

$string = preg_replace( "/(|)/i" , "\n",$string);

which needless to say doesn't work. I'm sure its obvious, just need a bit of
a pointer!

Cheers
Tom



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




Re: [PHP] Cheap Hosting

2002-12-27 Thread Stephen
That is way to expensive for me. I'm only 13 with a $25 a day paying job...

- Original Message -
From: "Rick Emery" <[EMAIL PROTECTED]>
To: "Stephen" <[EMAIL PROTECTED]>; "PHP List"
<[EMAIL PROTECTED]>
Sent: Thursday, December 26, 2002 8:38 PM
Subject: Re: [PHP] Cheap Hosting


: www.nomonthlyfees.com
: $200 first year, $70 per year thereafter.
:
: I put all my clients with this service.
:
: rick
: "People will forget what you said. People will forget what you did.
: But people will never forget how you made them feel."
: - Original Message -
: From: Stephen
: To: PHP List
: Sent: Thursday, December 26, 2002 6:55 PM
: Subject: [PHP] Cheap Hosting
:
:
: Hello,
:
: I need a nice, reliable host for my new website. It needs to be fast,
reliable, needs a
: good uptime, and some features. PHP and MySQL are the two I really need.
Does anyone
: recomend one that's really cheap? So far I've found on, $5 a month, but
it's slower then
: what'd I like. If nothing else pops up, I'll go with it. I'd also like
domain parking
: and/or domain registration (don't really need the registration though).
Thanks in advance!
:
: Thanks,
: Stephen Craton
: http://www.melchior.us
:
: "What is a dreamer that cannot persevere?" -- http://www.melchior.us
:
:
:
: --
: 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] OOP and object references, not copies - how to do?

2002-12-27 Thread Rasmus Lerdorf
PHP can pass references to objects around exactly the same way you pass
references to normal variables.

-Rasmus

On Thu, 26 Dec 2002, Erik Franzén wrote:

> Say the you are going to create a simple forum and you want to have a number
> of classes:
>
> Class Sql - handles the DB interface
> Class User - handles users
> Class Messages - handles messages
>
> When you are writing the code, you first creates a new sql object in order
> to read or write data from or to the database.
>
> Secondly you create a user object in order to handle users, for an example,
> to authenticate the user which is going to write a new message in your
> forum.
>
> The user object have a method which reads user information from the
> database.
>  Since you alread have created a sql object, this method should use the sql
> object in order to fecth data from the database.
>
> I nice way to do this, would be to send the sql object as an reference to
> the user object constructor and store the object reference to the sql object
> in the user object.
>
> This is not working very well in PHP yet because PHP cannot treat objects as
> references. When you send the sql object to the user object constructor
> method, it will be a copy, not a reference!
>
> How do I get around this? There must be a way to handle this and create nice
> OOO PHP-code? I don't like using global variables as object handles.
>
> Best regards
> Erik
>
>
>
> --
> 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: Reg Ex for replacing or with \n

2002-12-27 Thread Tom Beddard
Yes, i thought it was simple, just wasn't escaping a forward slash

$string = preg_replace( "/(|)/i" , "\n",$string);


"Tom Beddard" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm new to using regular expressions so i'm struggling a bit in making an
> expression to replace  or  with \n
>
> $string = preg_replace( "/(|)/i" , "\n",$string);
>
> which needless to say doesn't work. I'm sure its obvious, just need a bit
of
> a pointer!
>
> Cheers
> Tom
>
>



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




Re: [PHP] Cheap Hosting

2002-12-27 Thread 1LT John W. Holmes
That's only 8 days of work for a whole year of hosting... come on! :)

John


- Original Message -
From: "Stephen" <[EMAIL PROTECTED]>
To: "Rick Emery" <[EMAIL PROTECTED]>
Cc: "PHP List" <[EMAIL PROTECTED]>
Sent: Friday, December 27, 2002 10:29 AM
Subject: Re: [PHP] Cheap Hosting


> That is way to expensive for me. I'm only 13 with a $25 a day paying
job...
>
> - Original Message -
> From: "Rick Emery" <[EMAIL PROTECTED]>
> To: "Stephen" <[EMAIL PROTECTED]>; "PHP List"
> <[EMAIL PROTECTED]>
> Sent: Thursday, December 26, 2002 8:38 PM
> Subject: Re: [PHP] Cheap Hosting
>
>
> : www.nomonthlyfees.com
> : $200 first year, $70 per year thereafter.
> :
> : I put all my clients with this service.
> :
> : rick
> : "People will forget what you said. People will forget what you did.
> : But people will never forget how you made them feel."
> : - Original Message -
> : From: Stephen
> : To: PHP List
> : Sent: Thursday, December 26, 2002 6:55 PM
> : Subject: [PHP] Cheap Hosting
> :
> :
> : Hello,
> :
> : I need a nice, reliable host for my new website. It needs to be fast,
> reliable, needs a
> : good uptime, and some features. PHP and MySQL are the two I really need.
> Does anyone
> : recomend one that's really cheap? So far I've found on, $5 a month, but
> it's slower then
> : what'd I like. If nothing else pops up, I'll go with it. I'd also like
> domain parking
> : and/or domain registration (don't really need the registration though).
> Thanks in advance!
> :
> : Thanks,
> : Stephen Craton
> : http://www.melchior.us
> :
> : "What is a dreamer that cannot persevere?" -- http://www.melchior.us
> :
> :
> :
> : --
> : 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] processform.php not found

2002-12-27 Thread Cerebrimbor
I'm reading "PHP and MySQL for Dummies", to try to develop a very small 
web database.  In the examples, I see many references to:
echo ""
and
echo ""
but I have no php scripts called processform.php or checkAll.php.
They seem to be fairly common scripts considering the number of Google 
hits I get when I do a search for them.

Does anyone have any idea where I can get these scripts?

Cerebrimbor


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



RE: [PHP] Cheap Hosting

2002-12-27 Thread Edward Peloke
I use www.ht-tech.net Very reliable and I currently pay $12.95 a month.

Eddie

-Original Message-
From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 27, 2002 10:43 AM
To: Stephen; Rick Emery
Cc: PHP List
Subject: Re: [PHP] Cheap Hosting


That's only 8 days of work for a whole year of hosting... come on! :)

John


- Original Message -
From: "Stephen" <[EMAIL PROTECTED]>
To: "Rick Emery" <[EMAIL PROTECTED]>
Cc: "PHP List" <[EMAIL PROTECTED]>
Sent: Friday, December 27, 2002 10:29 AM
Subject: Re: [PHP] Cheap Hosting


> That is way to expensive for me. I'm only 13 with a $25 a day paying
job...
>
> - Original Message -
> From: "Rick Emery" <[EMAIL PROTECTED]>
> To: "Stephen" <[EMAIL PROTECTED]>; "PHP List"
> <[EMAIL PROTECTED]>
> Sent: Thursday, December 26, 2002 8:38 PM
> Subject: Re: [PHP] Cheap Hosting
>
>
> : www.nomonthlyfees.com
> : $200 first year, $70 per year thereafter.
> :
> : I put all my clients with this service.
> :
> : rick
> : "People will forget what you said. People will forget what you did.
> : But people will never forget how you made them feel."
> : - Original Message -
> : From: Stephen
> : To: PHP List
> : Sent: Thursday, December 26, 2002 6:55 PM
> : Subject: [PHP] Cheap Hosting
> :
> :
> : Hello,
> :
> : I need a nice, reliable host for my new website. It needs to be fast,
> reliable, needs a
> : good uptime, and some features. PHP and MySQL are the two I really need.
> Does anyone
> : recomend one that's really cheap? So far I've found on, $5 a month, but
> it's slower then
> : what'd I like. If nothing else pops up, I'll go with it. I'd also like
> domain parking
> : and/or domain registration (don't really need the registration though).
> Thanks in advance!
> :
> : Thanks,
> : Stephen Craton
> : http://www.melchior.us
> :
> : "What is a dreamer that cannot persevere?" -- http://www.melchior.us
> :
> :
> :
> : --
> : 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] processform.php not found

2002-12-27 Thread Stephen
My guess is they are explained later in the book for on the CD if it came
with one. Most programming books do some with one now and days...


- Original Message -
From: "Cerebrimbor" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 27, 2002 8:38 AM
Subject: [PHP] processform.php not found


: I'm reading "PHP and MySQL for Dummies", to try to develop a very small
: web database.  In the examples, I see many references to:
: echo ""
: and
: echo ""
: but I have no php scripts called processform.php or checkAll.php.
: They seem to be fairly common scripts considering the number of Google
: hits I get when I do a search for them.
:
: Does anyone have any idea where I can get these scripts?
:
: Cerebrimbor
:
:
: --
: 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] CLI delay

2002-12-27 Thread Maciek Ruckgaber Bielecki

thanks guys sleep did the miracle for me :-)
--
"Few are those who see with their own eyes and feel with their own
hearts."
Albert Einstein
-
Maciek Ruckaber Bielecki





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




RE: [PHP] Cheap Hosting

2002-12-27 Thread Steve Jackson
Dotserv are high response and fairly cheap depending on what you need.
Or there's phpwebhosting.com
http://www.dotserv.com
http://www.phpwebhosting.com

> -Original Message-
> From: Edward Peloke [mailto:[EMAIL PROTECTED]]
> Sent: 27 December 2002 18:29
> To: PHP List
> Subject: RE: [PHP] Cheap Hosting
>
>
> I use www.ht-tech.net Very reliable and I currently pay $12.95 a month.
>
> Eddie
>
> -Original Message-
> From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 27, 2002 10:43 AM
> To: Stephen; Rick Emery
> Cc: PHP List
> Subject: Re: [PHP] Cheap Hosting
>
>
> That's only 8 days of work for a whole year of hosting... come on! :)
>
> John
>
>
> - Original Message -
> From: "Stephen" <[EMAIL PROTECTED]>
> To: "Rick Emery" <[EMAIL PROTECTED]>
> Cc: "PHP List" <[EMAIL PROTECTED]>
> Sent: Friday, December 27, 2002 10:29 AM
> Subject: Re: [PHP] Cheap Hosting
>
>
> > That is way to expensive for me. I'm only 13 with a $25 a day paying
> job...
> >
> > - Original Message -
> > From: "Rick Emery" <[EMAIL PROTECTED]>
> > To: "Stephen" <[EMAIL PROTECTED]>; "PHP List"
> > <[EMAIL PROTECTED]>
> > Sent: Thursday, December 26, 2002 8:38 PM
> > Subject: Re: [PHP] Cheap Hosting
> >
> >
> > : www.nomonthlyfees.com
> > : $200 first year, $70 per year thereafter.
> > :
> > : I put all my clients with this service.
> > :
> > : rick
> > : "People will forget what you said. People will forget what you did.
> > : But people will never forget how you made them feel."
> > : - Original Message -
> > : From: Stephen
> > : To: PHP List
> > : Sent: Thursday, December 26, 2002 6:55 PM
> > : Subject: [PHP] Cheap Hosting
> > :
> > :
> > : Hello,
> > :
> > : I need a nice, reliable host for my new website. It needs to be fast,
> > reliable, needs a
> > : good uptime, and some features. PHP and MySQL are the two I
> really need.
> > Does anyone
> > : recomend one that's really cheap? So far I've found on, $5 a
> month, but
> > it's slower then
> > : what'd I like. If nothing else pops up, I'll go with it. I'd also like
> > domain parking
> > : and/or domain registration (don't really need the
> registration though).
> > Thanks in advance!
> > :
> > : Thanks,
> > : Stephen Craton
> > : http://www.melchior.us
> > :
> > : "What is a dreamer that cannot persevere?" -- http://www.melchior.us
> > :
> > :
> > :
> > : --
> > : 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 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] Nested Arrays

2002-12-27 Thread Beauford.2002
Great. now can you explain why this works.  I'm confused at how PHP knows
this is a multidimensional array. I was trying something like $tmp[][]=???.

TIA

- Original Message -
From: "Marek Kilimajer" <[EMAIL PROTECTED]>
Cc: "Beauford.2002" <[EMAIL PROTECTED]>; "PHP General"
<[EMAIL PROTECTED]>
Sent: Friday, December 27, 2002 8:45 AM
Subject: Re: [PHP] Nested Arrays


> Sorry, now I reminded myself this would cause a false element at the end
> of $rows, use this:
> while($tmp=mysql_fetch_array($res)) {
> $rows[]=$tmp;
> }
>
> Marek Kilimajer wrote:
>
> > Simple:
> >
> > while($rows[]=mysql_fetch_array($res)) {}
> >
> > ($res is a mysql result resource)
> >
> > Beauford.2002 wrote:
> >
> >> Thanks for the info, but maybe I didn't give enough info.
> >>
> >> I have a mysql database with up to 10 rows and 5 fields in each row..
> >> I have
> >> been reading up on some of the array functions, but haven't been able
> >> to get
> >> anything to work.
> >>
> >> TIA
> >>
> >> - Original Message -
> >> From: "Weston Houghton" <[EMAIL PROTECTED]>
> >> To: "Beauford.2002" <[EMAIL PROTECTED]>
> >> Cc: "PHP General" <[EMAIL PROTECTED]>
> >> Sent: Thursday, December 26, 2002 6:19 PM
> >> Subject: Re: [PHP] Nested Arrays
> >>
> >>
> >>
> >>
> >>> Sure... for the longwinded approach, just do this:
> >>>
> >>> $row1 = array("col1", "col2", "col3", ...);
> >>> $row2 = array("col1", "col2", "col3", ...);
> >>> $row3 = array("col1", "col2", "col3", ...);
> >>> $row4 = array("col1", "col2", "col3", ...);
> >>> $row5 = array("col1", "col2", "col3", ...);
> >>>
> >>> $main_array = array($row1, $row2, $row3, $row4, $row5);
> >>>
> >>> Obviously these could include key-value pairs in the arrays as well.
> >>> Then to prove it to yourself:
> >>>
> >>> print_r($main_array);
> >>>
> >>> Cheers,
> >>> Wes
> >>>
> >>>
> >>> On Thursday, December 26, 2002, at 06:14  PM, Beauford.2002 wrote:
> >>>
> >>>
> >>>
>  Hi,
> 
>  Is there anyway to do a nested array, I have looked at the various
>  array
>  functions and can't figure this out (if possible).
> 
>  I want to be able to put each field of  a row into an array, and then
>  put
>  that entire row and into another array.
> 
>  so when I display it, I would have:
> 
>  row1 - col1  col2  col3 col4 col5
>  row2 - col1  col2  col3 col4 col5
>  row3 - col1  col2  col3 col4 col5
>  row4 - col1  col2  col3 col4 col5
>  row5 - col1  col2  col3 col4 col5
> 
>  etc. (depending on how many rows there are).
> 
>  TIA
> 
> 
> 
>  --
>  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] processform.php not found

2002-12-27 Thread Maciek Ruckgaber Bielecki
i gess it is just a small example of how control your program flux using
the propertie ACTION of the  tag, if the code is not included on the
CD as Stephen points, it will be explained later, so at this point in the
book you probably should be paying attention to the order in which scripts
are executed and probably how the variables are past :-)

regards,

--
"Few are those who see with their own eyes and feel with their own
hearts."
Albert Einstein
-
Maciek Ruckaber Bielecki



On Fri, 27 Dec 2002, Cerebrimbor wrote:

> I'm reading "PHP and MySQL for Dummies", to try to develop a very small
> web database.  In the examples, I see many references to:
> echo ""
> and
> echo ""
> but I have no php scripts called processform.php or checkAll.php.
> They seem to be fairly common scripts considering the number of Google
> hits I get when I do a search for them.
>
> Does anyone have any idea where I can get these scripts?
>
> Cerebrimbor
>
>
> --
> 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] Nested Arrays

2002-12-27 Thread Marek Kilimajer
while($tmp=mysql_fetch_array($res)) { // now $tmp is now an array (as the function name suggests)
   $rows[]=$tmp; // by assigning to $rows[], we make $rows an array, adding array $tmp as the last element
}

and this makes it multidimensional



Beauford.2002 wrote:


Great. now can you explain why this works.  I'm confused at how PHP knows
this is a multidimensional array. I was trying something like $tmp[][]=???.

TIA

- Original Message -
From: "Marek Kilimajer" <[EMAIL PROTECTED]>
Cc: "Beauford.2002" <[EMAIL PROTECTED]>; "PHP General"
<[EMAIL PROTECTED]>
Sent: Friday, December 27, 2002 8:45 AM
Subject: Re: [PHP] Nested Arrays


 

Sorry, now I reminded myself this would cause a false element at the end
of $rows, use this:
while($tmp=mysql_fetch_array($res)) {
   $rows[]=$tmp;
}

Marek Kilimajer wrote:

   

Simple:

while($rows[]=mysql_fetch_array($res)) {}

($res is a mysql result resource)
 



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




Re: [PHP] Nested Arrays

2002-12-27 Thread Michael J. Pawlowsky


Stop thinking of it as a multidimesional array.
It is simply an two dimensional array of two dimensional arrays.







*** REPLY SEPARATOR  ***

On 27/12/2002 at 11:29 AM Beauford.2002 wrote:

>Great. now can you explain why this works.  I'm confused at how PHP knows
>this is a multidimensional array. I was trying something like $tmp[][]=???.
>
>TIA
>
>- Original Message -
>From: "Marek Kilimajer" <[EMAIL PROTECTED]>
>Cc: "Beauford.2002" <[EMAIL PROTECTED]>; "PHP General"
><[EMAIL PROTECTED]>
>Sent: Friday, December 27, 2002 8:45 AM
>Subject: Re: [PHP] Nested Arrays
>
>
>> Sorry, now I reminded myself this would cause a false element at the end
>> of $rows, use this:
>> while($tmp=mysql_fetch_array($res)) {
>> $rows[]=$tmp;
>> }
>>
>> Marek Kilimajer wrote:
>>
>> > Simple:
>> >
>> > while($rows[]=mysql_fetch_array($res)) {}
>> >
>> > ($res is a mysql result resource)
>> >
>> > Beauford.2002 wrote:
>> >
>> >> Thanks for the info, but maybe I didn't give enough info.
>> >>
>> >> I have a mysql database with up to 10 rows and 5 fields in each row..
>> >> I have
>> >> been reading up on some of the array functions, but haven't been able
>> >> to get
>> >> anything to work.
>> >>
>> >> TIA
>> >>
>> >> - Original Message -
>> >> From: "Weston Houghton" <[EMAIL PROTECTED]>
>> >> To: "Beauford.2002" <[EMAIL PROTECTED]>
>> >> Cc: "PHP General" <[EMAIL PROTECTED]>
>> >> Sent: Thursday, December 26, 2002 6:19 PM
>> >> Subject: Re: [PHP] Nested Arrays
>> >>
>> >>
>> >>
>> >>
>> >>> Sure... for the longwinded approach, just do this:
>> >>>
>> >>> $row1 = array("col1", "col2", "col3", ...);
>> >>> $row2 = array("col1", "col2", "col3", ...);
>> >>> $row3 = array("col1", "col2", "col3", ...);
>> >>> $row4 = array("col1", "col2", "col3", ...);
>> >>> $row5 = array("col1", "col2", "col3", ...);
>> >>>
>> >>> $main_array = array($row1, $row2, $row3, $row4, $row5);
>> >>>
>> >>> Obviously these could include key-value pairs in the arrays as well.
>> >>> Then to prove it to yourself:
>> >>>
>> >>> print_r($main_array);
>> >>>
>> >>> Cheers,
>> >>> Wes
>> >>>
>> >>>
>> >>> On Thursday, December 26, 2002, at 06:14  PM, Beauford.2002 wrote:
>> >>>
>> >>>
>> >>>
>>  Hi,
>> 
>>  Is there anyway to do a nested array, I have looked at the various
>>  array
>>  functions and can't figure this out (if possible).
>> 
>>  I want to be able to put each field of  a row into an array, and
>then
>>  put
>>  that entire row and into another array.
>> 
>>  so when I display it, I would have:
>> 
>>  row1 - col1  col2  col3 col4 col5
>>  row2 - col1  col2  col3 col4 col5
>>  row3 - col1  col2  col3 col4 col5
>>  row4 - col1  col2  col3 col4 col5
>>  row5 - col1  col2  col3 col4 col5
>> 
>>  etc. (depending on how many rows there are).
>> 
>>  TIA
>> 
>> 
>> 
>>  --
>>  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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PHP 4.3.0 released

2002-12-27 Thread Andrei Zmievski
The PHP developers are pleased to announce the immediate availability of
PHP 4.3.0, the latest and greatest version of this extremely popular and
widely used scripting language.

This release contains a multitude of changes, bug fixes and improvements
over the previous one, PHP 4.2.3. It further elevates PHP's standing as
a serious contender in the general purpose scripting language arena. The
highlights of this release are listed below:

 Command line interface

 This version finalizes the separate command line interface (CLI) that
 can be used for developing shell and desktop applications (with
 PHP-GTK). The CLI is always built, but installed automatically only if
 CGI version is disabled via --disable-cgi switch during configuration.
 Alternatively, one can use make install-cli target. On Windows CLI can
 be found in cli folder.

 CLI has a number of differences compared to other server APIs. More
 information can be found here:

 * PHP Manual: Using PHP from the command line
   http://www.php.net/manual/en/features.commandline.php


 Streams

 A very important "under the hood" feature is the streams API. It
 introduces a unified approach to the handling of files, pipes, sockets,
 and other I/O resources in the PHP core and extensions.

 What this means for users is that any I/O function that works with
 streams (and that is almost all of them) can access built-in protocols,
 such as HTTP/HTTPS and FTP/FTPS, as well as custom protocols registered
 from PHP scripts. For more information please see:

 * List of Supported Protocols/Wrappers
   http://www.php.net/manual/en/wrappers.php

 * Streams API
   http://www.php.net/manual/en/streams.php


 New build system

 This iteration of the build system, among other things, replaces the
 slow recursive make with one global Makefile and eases the integration
 of proper dependencies. Automake is only needed for its aclocal tool.
 The build process is now more portable and less resource-consuming.


 PHP 4.3.0 has many improvements and enhancements:

 * GD library is now bundled with the distribution and it is
   recommended to always use the bundled version
 * vpopmail and cybermut extensions are moved to PECL
 * several deprecated extensions (aspell, ccvs, cybercash, icap) and
   SAPIs (fastcgi, fhttpd) are removed
 * speed improvements in a variety of string functions
 * Apache2  filter is improved, but is still considered experimental
   (use with PHP in prefork and not worker (thread) model since many
   extensions based on external libraries are not thread safe)
 * various security fixes (imap, mysql, mcrypt, file upload, gd, etc)
 * new SAPI for embedding PHP in other applications (experimental)
 * much better test suite
 * significant improvements in dba, gd, pcntl, sybase, and xslt
   extensions
 * debug_backtrace() should help with debugging
 * error messages now contain URLs linking to pages describing the
   error or function in question
 * Zend Engine has some fixes and minor performance enhancements
 * and TONS of other fixes, updates, new functions, etc

For the full list of changes in PHP 4.3.0, see the NEWS file
(http://www.php.net/ChangeLog-4.php).

Thank you to all who coded, tested, and documented this release!

-Andrei   http://www.gravitonic.com/

"It's an emergent property of connected human minds that
they create things for one another's pleasure and to conquer
their uneasy sense of being too alone." -- Eben Moglen


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




[PHP] Just need a link ;)

2002-12-27 Thread Brian J. Celenza
Hello!

I'm looking for a link that contains a list/description of all the built in
$PHP_ variables (the ones that show browser type, etc.). Can't seem to
locate them, if the page exists.

Thanks!

--
---
Brian J. Celenza
[EMAIL PROTECTED]
ICQ: 110942424
AIM: BJCKnight



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




Re: [PHP] Just need a link ;)

2002-12-27 Thread Jason Sheets
You might look at the PHP manual, also create a page that executes the
phpinfo() function, this will a lot of the variables you may be looking
for.

Jason

On Fri, 2002-12-27 at 10:27, Brian J. Celenza wrote:
> Hello!
> 
> I'm looking for a link that contains a list/description of all the built in
> $PHP_ variables (the ones that show browser type, etc.). Can't seem to
> locate them, if the page exists.
> 
> Thanks!
> 
> --
> ---
> Brian J. Celenza
> [EMAIL PROTECTED]
> ICQ: 110942424
> AIM: BJCKnight
> 
> 
> 
> -- 
> 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] Just need a link ;)

2002-12-27 Thread Michael J. Pawlowsky

Just make a php file with:


\n";

echo "\n\n_SERVER\n";
print_r ($_SERVER);

echo "\n\n_ENV\n";
print_r ($_ENV);

echo "\n\n_COOKIE\n";
print_r ($_COOKIE);

echo "\n\n_GET\n";
print_r ($_GET);

echo "\n\n_POST\n";
print_r ($_POST);

echo "\n\n_FILES\n";
print_r ($_FILES);

echo "\n\n_REQUEST\n";
print_r ($_REQUEST);

echo "\n\n_SESSION\n";
print_r ($_SESSION);


// Pre 4.0.1 PHP
//  echo "\n\nHTTP_SESSION_VARS\n";
//  print_r ($HTTP_SESSION_VARS);

echo "\n\nphp_errormsg\n";
echo "$php_errormsg\n";

echo "";

phpinfo();

?>



*** REPLY SEPARATOR  ***

On 27/12/2002 at 12:27 PM Brian J. Celenza wrote:

>Hello!
>
>I'm looking for a link that contains a list/description of all the built in
>$PHP_ variables (the ones that show browser type, etc.). Can't seem to
>locate them, if the page exists.
>
>Thanks!
>
>--
>---
>Brian J. Celenza
>[EMAIL PROTECTED]
>ICQ: 110942424
>AIM: BJCKnight
>
>
>
>--
>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] uploading + downloading Large files ...

2002-12-27 Thread Jimmy Brake
Hi!

My users need to upload and download large files (100 + megs). Right now
I only allow 100k to be uploaded. Will I need to do anything to
php/apache to make sure things continue to be reliable? 

My google search only found threads with bad endings and they had much
smaller files. Should i just make em use ftp or scp? The problem with
using one of those protocols is that it makes it difficult for the users
to link the files to the proper account/relation/incident and anything
that is a problem for users is usually a problem for me. 

Thanks!

Jimmy 


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




Re: [PHP] uploading + downloading Large files ...

2002-12-27 Thread Andrew Brampton
There is a limit in the php.ini saying how big a upload can be.
Also I beleive there might be a limit in apache, but I'm not sure.

But uploading 100mb files over HTTP is a very dodgy thing to be doing, if
anything goes wrong the user has to start again. Downloading 100mb is no
problem, but uploading I would advise you to use FTP or SCP. If you have
problems with them uploading in the wrong place, well how about you have PHP
Script that tells them how to upload, and exactly where to place it,
something as simple as saying upload to ftp://blah.com/yourName/

Hope this helps
Andrew
- Original Message -
From: "Jimmy Brake" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 27, 2002 6:30 PM
Subject: [PHP] uploading + downloading Large files ...


> Hi!
>
> My users need to upload and download large files (100 + megs). Right now
> I only allow 100k to be uploaded. Will I need to do anything to
> php/apache to make sure things continue to be reliable?
>
> My google search only found threads with bad endings and they had much
> smaller files. Should i just make em use ftp or scp? The problem with
> using one of those protocols is that it makes it difficult for the users
> to link the files to the proper account/relation/incident and anything
> that is a problem for users is usually a problem for me.
>
> Thanks!
>
> Jimmy
>
>
> --
> 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] mysql_escape_string is deprecated?

2002-12-27 Thread Leif K-Brooks
I was looking at the PHP 4.3 changelog, and it said that 
mysql_escape_string is deprecated.  Is this true, and if so, what should 
I be using instead?

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.



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



RE: [PHP] uploading + downloading Large files ...

2002-12-27 Thread James E Hicks III
This might be your answer.

http://www.phpbuilder.com/columns/florian19991014.php3

James

-Original Message-
From: Jimmy Brake [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 27, 2002 1:31 PM
To: [EMAIL PROTECTED]
Subject: [PHP] uploading + downloading Large files ...


Hi!

My users need to upload and download large files (100 + megs). Right now
I only allow 100k to be uploaded. Will I need to do anything to
php/apache to make sure things continue to be reliable? 

My google search only found threads with bad endings and they had much
smaller files. Should i just make em use ftp or scp? The problem with
using one of those protocols is that it makes it difficult for the users
to link the files to the proper account/relation/incident and anything
that is a problem for users is usually a problem for me. 

Thanks!

Jimmy 


-- 
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] Nested Arrays

2002-12-27 Thread Beauford.2002
OK, little bit of a brain cramp here. I wasn't clueing in that
$tmp=mysql_fetch_array($res) was an array and was trying to do something
again that was already there.

Thanks for the help.

Beauford

- Original Message -
From: "Marek Kilimajer" <[EMAIL PROTECTED]>
To: "Beauford.2002" <[EMAIL PROTECTED]>
Cc: "PHP General" <[EMAIL PROTECTED]>
Sent: Friday, December 27, 2002 11:41 AM
Subject: Re: [PHP] Nested Arrays


> while($tmp=mysql_fetch_array($res)) { // now $tmp is now an array (as the
function name suggests)
> $rows[]=$tmp; // by assigning to $rows[], we make $rows an array,
adding array $tmp as the last element
> }
>
> and this makes it multidimensional
>
>
>
> Beauford.2002 wrote:
>
> >Great. now can you explain why this works.  I'm confused at how PHP knows
> >this is a multidimensional array. I was trying something like
$tmp[][]=???.
> >
> >TIA
> >
> >- Original Message -
> >From: "Marek Kilimajer" <[EMAIL PROTECTED]>
> >Cc: "Beauford.2002" <[EMAIL PROTECTED]>; "PHP General"
> ><[EMAIL PROTECTED]>
> >Sent: Friday, December 27, 2002 8:45 AM
> >Subject: Re: [PHP] Nested Arrays
> >
> >
> >
> >
> >>Sorry, now I reminded myself this would cause a false element at the end
> >>of $rows, use this:
> >>while($tmp=mysql_fetch_array($res)) {
> >>$rows[]=$tmp;
> >>}
> >>
> >>Marek Kilimajer wrote:
> >>
> >>
> >>
> >>>Simple:
> >>>
> >>>while($rows[]=mysql_fetch_array($res)) {}
> >>>
> >>>($res is a mysql result resource)
> >>>
> >>>
>
>
> --
> 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] directory list function?

2002-12-27 Thread Dade Register
A question for you all. Is there a php function that
could count the number of files in a dir? Using
FreeBSD and php4.2.2 and Apache. Thanx.
-Dade

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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




Re: [PHP] directory list function?

2002-12-27 Thread Kevin Stone
There is no builtin function to do this  in one step but it's not in anyway
difficult..
http://www.php.net/manual/en/function.opendir.php
-Kevin

- Original Message -
From: "Dade Register" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 27, 2002 1:34 PM
Subject: [PHP] directory list function?


> A question for you all. Is there a php function that
> could count the number of files in a dir? Using
> FreeBSD and php4.2.2 and Apache. Thanx.
> -Dade
>
> __
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



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




Re: [PHP] directory list function?

2002-12-27 Thread Maciek Ruckgaber Bielecki

depending on what you need, sometimes this does the trick for me :-)

   exec("ls path/",$files);

foreach($files as $value)
{
  $elem .= $value."\n";
}

   echo $elem;



--
"Few are those who see with their own eyes and feel with their own
hearts."
Albert Einstein
-
Maciek Ruckaber Bielecki



On Fri, 27 Dec 2002, Dade Register wrote:

> A question for you all. Is there a php function that
> could count the number of files in a dir? Using
> FreeBSD and php4.2.2 and Apache. Thanx.
> -Dade
>
> __
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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




[PHP] php app frameworks?

2002-12-27 Thread Jeff D. Hamann
What application frameworks are avail for php?

Jeff.

--
Jeff D. Hamann
Hamann, Donald & Associates, Inc.
PO Box 1421
Corvallis, Oregon USA 97339-1421
Bus. 541-753-7333
Cell. 541-740-5988
[EMAIL PROTECTED]
www.hamanndonald.com




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




[PHP] monster form and compression?

2002-12-27 Thread Jeff D. Hamann
I have a monster form (really a funky grid - hey the client is always right)
that does not display entirely each time the form is displayed. Some times,
quite repeatably, the bottom half of the form's select boxes will be blank
(not good). Is there a way to compress the web page before it gets sent, or
any method to ensure the page will display correctly?

Jeff.

--
Jeff D. Hamann
Hamann, Donald & Associates, Inc.
PO Box 1421
Corvallis, Oregon USA 97339-1421
Bus. 541-753-7333
Cell. 541-740-5988
[EMAIL PROTECTED]
www.hamanndonald.com




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




Re: [PHP] monster form and compression?

2002-12-27 Thread Maciek Ruckgaber Bielecki

hi there !!!
check your HTML code, probably you miss something, it may be why the
form does not display properly always, have a look on
WWW: http://www.w3c.org/People/Raggett/tidy/

:-)
--
"Few are those who see with their own eyes and feel with their own
hearts."
Albert Einstein
-
Maciek Ruckaber Bielecki



On Fri, 27 Dec 2002, Jeff D. Hamann wrote:

> I have a monster form (really a funky grid - hey the client is always right)
> that does not display entirely each time the form is displayed. Some times,
> quite repeatably, the bottom half of the form's select boxes will be blank
> (not good). Is there a way to compress the web page before it gets sent, or
> any method to ensure the page will display correctly?
>
> Jeff.
>
> --
> Jeff D. Hamann
> Hamann, Donald & Associates, Inc.
> PO Box 1421
> Corvallis, Oregon USA 97339-1421
> Bus. 541-753-7333
> Cell. 541-740-5988
> [EMAIL PROTECTED]
> www.hamanndonald.com
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



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




RE: [PHP] mysql_escape_string is deprecated?

2002-12-27 Thread John W. Holmes
> I was looking at the PHP 4.3 changelog, and it said that
> mysql_escape_string is deprecated.  Is this true, and if so, what
should
> I be using instead?

Probably addslashes() or magic_quotes_gpc...

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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




Re: [PHP] directory list function?

2002-12-27 Thread Maciek Ruckgaber Bielecki

o of course !!
mine won't work in !UNIX ;-)

On Fri, 27 Dec 2002, Johannes Schlueter wrote:

> On Friday 27 December 2002 21:46, Maciek Ruckgaber Bielecki wrote:
> > depending on what you need, sometimes this does the trick for me :-)
> >
> >exec("ls path/",$files);
> >
> > foreach($files as $value)
> > {
> >   $elem .= $value."\n";
> > }
> >
> >echo $elem;
>
> This should
>
>$i=0;
>   if ($dir = opendir('/insert/directory/name/here')) {
> while (($file = readdir($dir)) !== false) {
>   $i++;
> }
> closedir($dir);
>   }
> ?>
> (ok, this one counts even . and ..)
> johannes
>
>


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




[PHP] exec, system , backtick

2002-12-27 Thread gamin
Hello,

   Im running PHP 4.0.6 on Red Hat 7.2

I tried a simple command line script, in all cases no_file does not exist. I
do not want the command line script to show the error on the screen but to
deliver it in the variable $r. But alas, in all 3 cases i get 'rm: canoot
remove `no_file': No such file or directory'

#! /usr/bin/php -q


What should i do ?

thank you

gamin.



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




Re: [PHP] Flow diagrams.-- Resending

2002-12-27 Thread Jimmy Brake
can you give us some examples of the data ...

the example I would like to see is: based on this information this is
what should be displayed



On Fri, 2002-12-27 at 11:48, Sridhar Moparthy wrote:
> Hi Every one,
> 
> I have information about some processes in the database that tells different
> process dependencies. I need to display that information as a process flow
> diagram. Do you know how to prepare and display process flow diagrams
> dynamically. Do you know anything like JPGraph or Java script or java applet
> that can do this? If so Please help me.
> 
> I am using PHP 4.xx and IIS on Win NT platform. Please help me if you know
> how to do.
> 
> Thank You,
> Sridhar Moparthy



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




Re: [PHP] exec, system , backtick

2002-12-27 Thread Maciek Ruckgaber Bielecki
try :


--
"Few are those who see with their own eyes and feel with their own
hearts."
Albert Einstein
-
Maciek Ruckaber Bielecki



On Sat, 28 Dec 2002, gamin wrote:

> Hello,
>
>Im running PHP 4.0.6 on Red Hat 7.2
>
> I tried a simple command line script, in all cases no_file does not exist. I
> do not want the command line script to show the error on the screen but to
> deliver it in the variable $r. But alas, in all 3 cases i get 'rm: canoot
> remove `no_file': No such file or directory'
>
> #! /usr/bin/php -q
>  $r = `rm no_file`;  \\ or $r = system("rm no_file") or exec("rm no_file");
> echo "the value in r is $r";
> ?>
>
> What should i do ?
>
> thank you
>
> gamin.
>
>
>
> --
> 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] exec, system , backtick

2002-12-27 Thread gamin

"Maciek Ruckgaber Bielecki" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> try :
>  $message = shell_exec('rm file');
> ?>


Tried that too, :-( no success

gamin



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




[PHP] Re: php app frameworks?

2002-12-27 Thread Javier
The only one I know is FuseBox www.fusebox.org.


[EMAIL PROTECTED] (Jeff D. Hamann) wrote in 
[EMAIL PROTECTED]:">news:[EMAIL PROTECTED]:

> What application frameworks are avail for php?
> 
> Jeff.
> 


-- 
*** s2r - public key: (http://leeloo.mine.nu/s2r-gmx.sig)

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




Re: [PHP] exec, system , backtick

2002-12-27 Thread Maciek Ruckgaber Bielecki
how about :
#!/usr/local/bin/php -q


regards,
Maciek Ruckaber Bielecki



On Sat, 28 Dec 2002, gamin wrote:

>
> "Maciek Ruckgaber Bielecki" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > try :
> >  > $message = shell_exec('rm file');
> > ?>
>
>
> Tried that too, :-( no success
>
> gamin
>
>
>
> --
> 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] [PHP-WIN] ftp_rawlist working as Admin and not working as normal user

2002-12-27 Thread Paul Menard
All,

Seasons greeting to all.

I'm running PHP version
C:\>php-cgi.exe -v
PHP 4.3.0RC2 (cgi-fcgi), Copyright (c) 1997-2002 The
PHP Group
Zend Engine v1.4.0, Copyright (c) 1998-2002 Zend
Technologies

under windows 2000 server for production and windows
2000 prof for development. I am using IIS 5 as the Web
server and have tried the following under both the
php-cgi.exe and the isapi.dll (php4isapi.dll)
versions.

I have written a Web page that will allow an
authenticated user to FTP to a remote server and
upload/download files etc. This is very loosly based
on the WebFTP PHP application I had found last year. 

My PHP script works when calling 'ftp_rawlist()' and
'ftp_nlist()' only if I authenticate as an
Administrator level account. If I connect as a normal
user the 2 functions return nothing. 

It is obviously a permission issue, right? I have PHP
installed on systems as 'D:\PHP' for this folder and
all sub-folders I have added any and all users and
groups. Still the functions fail. 

I tried moving all dll files to the
'C:\WINNT\System32' folder and still nothing. 

I've verified the TMP and TEMP environment variables
are pointing to valid folders, and that these folders
also have full open permissions.

At this point I am stuck and am looking for some help
on how to dig into this issue an arrive at a solution.

Any takers?




__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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




Re: [PHP] monster form and compression?

2002-12-27 Thread Jimmy Brake
IE has some bugs when you have big forms when using []  

test with mozilla or netscape

if thats the case -- then errr well umm use what works

On Fri, 2002-12-27 at 12:50, Jeff D. Hamann wrote:
> I have a monster form (really a funky grid - hey the client is always right)
> that does not display entirely each time the form is displayed. Some times,
> quite repeatably, the bottom half of the form's select boxes will be blank
> (not good). Is there a way to compress the web page before it gets sent, or
> any method to ensure the page will display correctly?
> 
> Jeff.
> 
> --
> Jeff D. Hamann
> Hamann, Donald & Associates, Inc.
> PO Box 1421
> Corvallis, Oregon USA 97339-1421
> Bus. 541-753-7333
> Cell. 541-740-5988
> [EMAIL PROTECTED]
> www.hamanndonald.com
> 



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




[PHP] Re: Flow diagrams

2002-12-27 Thread Manuel Lemos
Hello,

On 12/27/2002 06:00 PM, Sridhar Moparthy wrote:

I have information about some processes in the database that tells different
process dependencies. I need to display that information as a process flow
diagram. Do you know how to prepare and display process flow diagrams
dynamically. Do you know anything like JPGraph or Java script or java applet
that can do this? If so Please help me.


As I explained before, you may want to take a look at Metastorage. Among 
other things it generates graphs in UML that represent a diagram of 
classes that are mapped to database tables.

http://www.meta-language.net/news-2002-12-09-metastorage.html

http://www.meta-language.net/metastorage.html

Metastorage generates the graphs that can be rendered in many common 
image formats using AT&T GraphViz package. GraphViz takes a description 
of the nodes and the edges of the graphs and renders them in target 
image format.

In the pages above there are some links to the relevant GraphViz pages.


--

Regards,
Manuel Lemos


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



php-general Digest 28 Dec 2002 00:13:54 -0000 Issue 1788

2002-12-27 Thread php-general-digest-help

php-general Digest 28 Dec 2002 00:13:54 - Issue 1788

Topics (messages 129424 through 129481):

Re: Cheap Hosting
129424 by: Shashwat Nagpal
129428 by: David T-G
129442 by: Stephen
129445 by: 1LT John W. Holmes
129447 by: Edward Peloke
129451 by: Steve Jackson

Re: php+gd 2.0.7 problems take 2
129425 by: Marek Kilimajer

Re: Nested Arrays
129426 by: Marek Kilimajer
129427 by: Marek Kilimajer
129452 by: Beauford.2002
129454 by: Marek Kilimajer
129455 by: Michael J. Pawlowsky
129464 by: Beauford.2002

executable
129429 by: Edward Peloke
129430 by: Marek Kilimajer
129432 by: Michael J. Pawlowsky

Does PHP recognize multiple selections in a form?
129431 by: Micah Bushouse
129433 by: Marco Tabini
129434 by: Marek Kilimajer
129440 by: Micah Bushouse

XML-Presentationsystem from the Conf2002
129435 by: Tobias Schlitt
129436 by: Rasmus Lerdorf

Re: [PHP-DEV] XML-Presentationsystem from the Conf2002
129437 by: Derick Rethans
129438 by: Derick Rethans

Re: Finding # of weekdays between 2 dates..
129439 by: Chad Day

Reg Ex for replacing  or  with \n
129441 by: Tom Beddard
129444 by: Tom Beddard

Re: OOP and object references, not copies - how to do?
129443 by: Rasmus Lerdorf

processform.php not found
129446 by: Cerebrimbor
129448 by: Stephen
129453 by: Maciek Ruckgaber Bielecki

PHP 4.3.0 released
129449 by: Andrei Zmievski

Re: CLI delay
129450 by: Maciek Ruckgaber Bielecki

Just need a link ;)
129456 by: Brian J. Celenza
129457 by: Jason Sheets
129458 by: Michael J. Pawlowsky

uploading + downloading Large files ...
129459 by: Jimmy Brake
129460 by: Andrew Brampton
129462 by: James E Hicks III

mysql_escape_string is deprecated?
129461 by: Leif K-Brooks
129471 by: 1LT John W. Holmes

Flow diagrams.-- Resending
129463 by: Sridhar Moparthy
129475 by: Jimmy Brake

directory list function?
129465 by: Dade Register
129466 by: Kevin Stone
129467 by: Maciek Ruckgaber Bielecki
129473 by: Maciek Ruckgaber Bielecki

monster form and compression?
129468 by: Jeff D. Hamann
129470 by: Maciek Ruckgaber Bielecki
129477 by: Jimmy Brake

php app frameworks?
129469 by: Jeff D. Hamann
129479 by: Javier

[PHP-WIN] ftp_rawlist working as Admin and not working as normal user
129472 by: Paul Menard

exec, system , backtick
129474 by: gamin
129476 by: Maciek Ruckgaber Bielecki
129478 by: gamin
129480 by: Maciek Ruckgaber Bielecki

Re: Flow diagrams
129481 by: Manuel Lemos

Administrivia:

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

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

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


--

--- Begin Message ---
I can suggest u the best then.. 40$ annually will be fine with you??? then mail me 
back!

Cheers!

Shashwat
www.shashwat.com
  "Stephen" <[EMAIL PROTECTED]> wrote in message 
001e01c2ad42$b4ff1d20$0200a8c0@melchior">news:001e01c2ad42$b4ff1d20$0200a8c0@melchior...
  Hello,

  I need a nice, reliable host for my new website. It needs to be fast, reliable, 
needs a good uptime, and some features. PHP and MySQL are the two I really need. Does 
anyone recomend one that's really cheap? So far I've found on, $5 a month, but it's 
slower then what'd I like. If nothing else pops up, I'll go with it. I'd also like 
domain parking and/or domain registration (don't really need the registration though). 
Thanks in advance!

  Thanks,
  Stephen Craton
  http://www.melchior.us

  "What is a dreamer that cannot persevere?" -- http://www.melchior.us
--- End Message ---
--- Begin Message ---
Stephen --

...and then Stephen said...
% 
% Hello,

Hi!


% 
% I need a nice, reliable host for my new website. It needs to be fast, reliable, 
needs a good uptime, and some features. PHP and MySQL are the two I really need. Does 
anyone recomend one that's really cheap? So far I've found on, $5 a month, but it's 
slower then what'd I like. If nothing else pops up, I'll go with it. I'd also like 
domain parking and/or domain registration (don't really need the registration though). 
Thanks in advance!

This question has come up a number of times before.  Check the archives
for even more suggestions.

That said...  I offer php, mysql, ftp, multiple mail boxes, mailing
lists, yourdomain hosting/parking, and more; my server is at DataPipe
with good bandwidth and all of the goodies of a more expensive hosting
package (since that's what *I* have).


% 
% Thanks,
% Stephen Craton
% http://www.melchior.us
% 
% "What is a dreamer that cannot persevere?"

Re: [PHP] php app frameworks?

2002-12-27 Thread Jason Sheets
If you go to www.hotscripts.com they have several PHP application
frameworks listed.

I've investigated PHPLIB, and horde (http://www.horde.org) but wound up
creating my own framework because I have not yet found a well documented
framework that does what I need it to do.

Jason

On Fri, 2002-12-27 at 13:51, Jeff D. Hamann wrote:
> What application frameworks are avail for php?
> 
> Jeff.
> 
> --
> Jeff D. Hamann
> Hamann, Donald & Associates, Inc.
> PO Box 1421
> Corvallis, Oregon USA 97339-1421
> Bus. 541-753-7333
> Cell. 541-740-5988
> [EMAIL PROTECTED]
> www.hamanndonald.com
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


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




Re: [PHP] exec, system , backtick

2002-12-27 Thread Michael Sims
On Sat, 28 Dec 2002 02:55:44 +0530, you wrote:

>I tried a simple command line script, in all cases no_file does not exist. I
>do not want the command line script to show the error on the screen but to
>deliver it in the variable $r. But alas, in all 3 cases i get 'rm: canoot
>remove `no_file': No such file or directory'
[script snipped]

I think this is because your error is being sent to stderr but PHP is
only capturing what is sent to stdout.  I was able to acheive your
desired results by redirecting stderr to stdout via the shell.  Try
the following, it worked for me:

#! /usr/bin/php -q
&1`;
echo "the value in r is $r";
?>

If you need more info on the "2>&1" part, consult the Advanced Bash
Scripting Guide here:

http://www.digitaltoad.net/docs/guide/advshell/io-redirection.html

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




[PHP] object vs functions

2002-12-27 Thread Mat Harris
if i have a php script containing some functions, then all i have to do is
include() the file and then call the functions.

if i had an object (taking the example from php.net):

do_foo();
?>
 
what is the point of having the object, when i could just call the
functions?

what are the uses of objects over functions/groups of functions?

sorry if this is an innane or frequently asked question.

-- 
Mat Harris  OpenGPG Public Key ID: C37D57D9
[EMAIL PROTECTED]www.genestate.com   



msg90819/pgp0.pgp
Description: PGP signature


Re: [PHP] PHP 4.3.0 released

2002-12-27 Thread The Doctor
On Fri, Dec 27, 2002 at 11:12:22AM -0500, Andrei Zmievski wrote:
> The PHP developers are pleased to announce the immediate availability of
> PHP 4.3.0, the latest and greatest version of this extremely popular and
> widely used scripting language.
> 
> This release contains a multitude of changes, bug fixes and improvements
> over the previous one, PHP 4.2.3. It further elevates PHP's standing as
> a serious contender in the general purpose scripting language arena. The
> highlights of this release are listed below:
> 
>  Command line interface
> 
>  This version finalizes the separate command line interface (CLI) that
>  can be used for developing shell and desktop applications (with
>  PHP-GTK). The CLI is always built, but installed automatically only if
>  CGI version is disabled via --disable-cgi switch during configuration.
>  Alternatively, one can use make install-cli target. On Windows CLI can
>  be found in cli folder.
> 
>  CLI has a number of differences compared to other server APIs. More
>  information can be found here:
> 
>  * PHP Manual: Using PHP from the command line
>http://www.php.net/manual/en/features.commandline.php
> 
> 
>  Streams
> 
>  A very important "under the hood" feature is the streams API. It
>  introduces a unified approach to the handling of files, pipes, sockets,
>  and other I/O resources in the PHP core and extensions.
> 
>  What this means for users is that any I/O function that works with
>  streams (and that is almost all of them) can access built-in protocols,
>  such as HTTP/HTTPS and FTP/FTPS, as well as custom protocols registered
>  from PHP scripts. For more information please see:
> 
>  * List of Supported Protocols/Wrappers
>http://www.php.net/manual/en/wrappers.php
> 
>  * Streams API
>http://www.php.net/manual/en/streams.php
> 
> 
>  New build system
> 
>  This iteration of the build system, among other things, replaces the
>  slow recursive make with one global Makefile and eases the integration
>  of proper dependencies. Automake is only needed for its aclocal tool.
>  The build process is now more portable and less resource-consuming.
> 
> 
>  PHP 4.3.0 has many improvements and enhancements:
> 
>  * GD library is now bundled with the distribution and it is
>recommended to always use the bundled version
>  * vpopmail and cybermut extensions are moved to PECL
>  * several deprecated extensions (aspell, ccvs, cybercash, icap) and
>SAPIs (fastcgi, fhttpd) are removed
>  * speed improvements in a variety of string functions
>  * Apache2  filter is improved, but is still considered experimental
>(use with PHP in prefork and not worker (thread) model since many
>extensions based on external libraries are not thread safe)
>  * various security fixes (imap, mysql, mcrypt, file upload, gd, etc)
>  * new SAPI for embedding PHP in other applications (experimental)
>  * much better test suite
>  * significant improvements in dba, gd, pcntl, sybase, and xslt
>extensions
>  * debug_backtrace() should help with debugging
>  * error messages now contain URLs linking to pages describing the
>error or function in question
>  * Zend Engine has some fixes and minor performance enhancements
>  * and TONS of other fixes, updates, new functions, etc
> 
> For the full list of changes in PHP 4.3.0, see the NEWS file
> (http://www.php.net/ChangeLog-4.php).
> 
> Thank you to all who coded, tested, and documented this release!
> 
> -Andrei   http://www.gravitonic.com/
> 
> "It's an emergent property of connected human minds that
> they create things for one another's pleasure and to conquer
> their uneasy sense of being too alone." -- Eben Moglen
>

Is it just my or are there problems with static Aapche 1.3.27 compiles?

 
Script started on Fri Dec 27 20:34:45 2002
nl2k.ca//usr/source/php-4.3.0$ cat configphp
configure --prefix=/usr/contrib --localstatedir=/var --infodir=/usr/share/info 
--mandir=/usr/share/man --with-low-memory --with-elf --with-x   --with-mysql 
--with-zlib --enable-track-vars --enable-debug  --enable-versioning 
--with-config-file-path=/usr/local/lib --with-iconv=/usr --with-openssl=/usr/contrib  
--enable-ftp --with-gd=/usr --enable-imap --with-bz2 
--with-apache=/usr/source/apache_1.3.27_nonSSL/  --with-pgsql=/usr/contrib/pgsql 
--enable-gd-native-ttf --with-jpeg-dir=/usr --with-png-dir=/usr 
--with-freetype-dir=/usr  --with-xpm-dir=/usr/X11/lib 
nl2k.ca//usr/source/php-4.3.0$ make
nl2k.ca//usr/source/php-4.3.0$ make install
Installing PHP CLI binary:/usr/contrib/bin/
Installing PHP SAPI module
Installing shared extensions: 
/usr/contrib/lib/php/extensions/debug-non-zts-20020429/
Installing PEAR environment:  /usr/contrib/lib/php/
[PEAR] Archive_Tar- already installed: 0.9
[PEAR] Console_Getopt - already installed: 1.0
[PEAR] PEAR   - already installe

Re: [PHP] php app frameworks?

2002-12-27 Thread michael kimsal
Jason Sheets wrote:

If you go to www.hotscripts.com they have several PHP application
frameworks listed.

I've investigated PHPLIB, and horde (http://www.horde.org) but wound up
creating my own framework because I have not yet found a well documented
framework that does what I need it to do.



What were you looking for that you couldn't find in other products/projects?

Thanks.



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




Re: [PHP] php app frameworks?

2002-12-27 Thread Javier
[EMAIL PROTECTED] (Jason Sheets) wrote in 
[EMAIL PROTECTED]:">news:[EMAIL PROTECTED]:

Have you got any documentation of it to share?

> If you go to www.hotscripts.com they have several PHP application
> frameworks listed.
> 
> I've investigated PHPLIB, and horde (http://www.horde.org) but wound
> up creating my own framework because I have not yet found a well
> documented framework that does what I need it to do.
> 
> Jason
> 
> On Fri, 2002-12-27 at 13:51, Jeff D. Hamann wrote:
>> What application frameworks are avail for php?
>> 
>> Jeff.


-- 
*** s2r - public key: (http://leeloo.mine.nu/s2r-gmx.sig)

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




[PHP] some multiple array problems...

2002-12-27 Thread Victor
I am trying to make a calculator that figures out the total price
(calculates tax sums up price for print size times quantity etc.) and
the mechanism all works fine - but only when the user checks
SEQUENTIALLY from their list of available picture. 

The user should be able to select from their list of pictures at random,
and the script should be able to calculate the total price, but after
one image is skipped, if any pictures after the skipped one is selected
the script thinks that the user chose size 4x6 and quantity of 1 for
those (those are default values) 

note that I am also using arrays and that may be what is causing
problem, - bad array data input. Please help if u can and it doesn't
take u too much time.

The page that gives me trouble is order_form.php

This is what calculated the total value:

(don't get overwhelmed by the code, at the bottom there is clearer
explanation)



# calculate pricing
if (isset($_POST['check_price']) && isset($_SESSION['f_username']) &&
isset($quantity) && isset($size)) {
# if no picture checked but update submitted, then lets thell
the user how stupid they are
if (empty($check))
{   
echo ('One or more pictures must be checked in order to
verify price.');
exit;
}

# let us do some math, like taxes, discounts, etc.
for ($i=0; $i= '51' &&
$ins_quantity <= '100')
{
$price = '0.45';
}

# 101 to 150
if ($ins_size == '4x6' && $ins_quantity >= '101' &&
$ins_quantity <= '150')
{
$price = '0.40';
}

# 151 to infinity
if ($ins_size == '4x6' && $ins_quantity >= '151')
{
$price = '$0.30';
}

##
# 2.5x3.5 pricing matrix #
##

# less than or equal to 50
if ($ins_size == '2.5x3.5' && $ins_quantity <= '50')
{
$price = '0.49';
}

# 51 to 100
if ($ins_size == '2.5x3.5' && $ins_quantity >= '51' &&
$ins_quantity <= '100')
{
$price = '0.45';
}

# 101 to 150
if ($ins_size == '2.5x3.5' && $ins_quantity >= '101' &&
$ins_quantity <= '150')
{
$price = '0.40';
}

# 151 to infinity
if ($ins_size == '2.5x3.5' && $ins_quantity >= '151')
{
$price = '0.30';
}


# 3.5x5 pricing matrix #


# less than or equal to 50
if ($ins_size == '3.5x5' && $ins_quantity <= '50')
{
$price = '0.49';
}

# 51 to 100
if ($ins_size == '3.5x5' && $ins_quantity >= '51' &&
$ins_quantity <= '100')
{
$price = '0.45';
}

# 101 to 150
if ($ins_size == '3.5x5' && $ins_quantity >= '101' &&
$ins_quantity <= '150')
{
$price = '0.40';
}

# 151 to infinity
if ($ins_size == '3.5x5' && $ins_quantity >= '151')
{
$price = '0.30';
}

##
# 5x7 pricing matrix #
##

# less than or equal to 50
if ($ins_size == '5x7' && $ins_quantity <= '50')
{
$price = '1.99';
}

# 51 to 100
if ($ins_size == '5x7' && $ins_quantity >= '51' &&
$ins_quantity <= '100')
{
$price = '1.99';
}

# 101 to 150
if ($ins_size == '5x7' && $ins_quantity >= '101' &&
$ins_quantity <= '150')
{
$price = '1.99';
}

# 151 to infinity
if ($ins_size == '5x7' && $ins_quantity >= '151')
{
$price = '1.99';
}

###
# 8x10 pricing matrix #
#

Re: [PHP] exec, system , backtick

2002-12-27 Thread gamin

"Maciek Ruckgaber Bielecki" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> how about :
> #!/usr/local/bin/php -q
>
>  $file = 'no_file';
>
> if(!is_file($file))
>   $mess =  "no such file";
> else
>   $mess = shell_exec("ls $file");
>
> echo $mess."\n";
> ?>
> regards,
> Maciek Ruckaber Bielecki
>

Hi Maciek,

   I used rm as an example to illustrate what i want to do, basically i need
to catch an error if it occurs and STOP the script from going ahead and
include the error in a file for later examination. I would be using 'rm,
unzip, tar, rpm' etc commands from inside a PHP script. Micheal Sims' post
has something interesting.

gamin



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




Re: [PHP] exec, system , backtick

2002-12-27 Thread gamin

"Michael Sims" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
On Sat, 28 Dec 2002 02:55:44 +0530, you wrote:
<--sniped -->

#! /usr/bin/php -q
&1`;
echo "the value in r is $r";
?>

If you need more info on the "2>&1" part, consult the Advanced Bash
Scripting Guide here:

http://www.digitaltoad.net/docs/guide/advshell/io-redirection.html

Thx Michael,

   I tested what you prescribed and it works like a charm. Thanks for the
link to ABSG, a very useful Guide indeed.

Im running a linux system so i have no problem, but how would one redirect
stderr to stdout on a Win machine, if it is possible at all 

Have a good day

gamin.



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