[PHP] Array cookie

2003-07-21 Thread Shantanu Oak
Hi, 
I have written a feed reader for my personal use. The
php code given below does work. But it works only with
a single feed. How can I save multiple cookies
(array?) and display a few more RSS feeds. The example
page can be found at...
http://shantanuoak.com/test1.php 


&align=left&width=300&frameColor=black&titleBarColor=%23add8e6&titleBarTextColor=

black&boxFillColor=white&textColor=black&fontFace=&maxItems=7&compact=&xmlButton=&j

avascript=true">





Delete
CookiePlease referesh the page







Delete
CookiePlease refresh the page

Thanks
Shantanu Oak


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



[PHP] feof() problem

2003-07-21 Thread chandrakant Reddy

Hi
   My Code : 

";

 if
(move_uploaded_file($_FILES['userfile']['tmp_name'],
$uploaddir . $_FILES['userfile']['name'])) {

 print "File is valid, and was successfully
uploaded.  Here's some more debugging info:\n";
 print_r($_FILES);
   $filename = $uploaddir .
$FILES['userfile']['name'] ;
 
   $filehandle = fopen($filename,"r");
 
if(! $filehandle) { echo (" file opening
error "); }
else { echo (" file opened in read mode ");
  $count=0;
  ini_set('auto_detect_line_endings',
true);
  while( (!feof($filehandle) )  && $count
< 100 ) {
  $line = fgets($filehandle,4096);
 #$line =
explode(":",fgets($filehandle,100) ) ;
 echo " line = " . $line ;
#print_r($line);
 $count++;
 if($count > 90 ) echo " some problem
";
 echo ("");
 }

 fclose($filehandle);

  }

} else {
 print "Possible file upload attack!  Here's some
debugging info:\n";
 print_r($_FILES);
  } ?>


The output that I am getting : 


File is valid, and was successfully uploaded.  Here's
some more debugging info:
Array
(
[userfile] => Array
(
[name] => filename.txt
[type] => text/plain
[tmp_name] => /tmp/phpq8YmxN
[error] => 0
[size] => 466
) )
 file opened in read mode  line =
 line = 
 line = 
# 90 lines then it is printing 

line = someproblem
 # ten lines  


 My question is why it is going into infite loop ,what
is problem with the above code.


regards
CVR


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



RE: [PHP] controlling winamp with COM

2003-07-21 Thread Joseph Blythe
I know nothing about using php and COM under windows but a good place to
start would be:

http://www.php.net/manual/en/ref.com.php

regards,

Joseph

> -Original Message-
> From: Diego Fulgueira [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, 22 July 2003 1:10 PM
> To: John Herren; [EMAIL PROTECTED]
> Subject: Re: [PHP] controlling winamp with COM
>
>
> Look, i don't know if you already received a reply for your
> message, but i
> can tell you i know a lot about PHP and i have absolutely no
> idea how to do
> this.
>
> I will just remind you that PHP is intended to be used as a
> server to client
> technology and that it might have some indirect interaction
> with winamp, but
> only on the server.
>
> What you need is a lower level techonolgy. To do this, i would try to
> approach the problem with C/C++ or VisualBasic and then build
> an interface
> to make it work from PHP. But this would be kinda messy.
>
> Good luck. I really hope you don't give up on this, because i
> think noone
> has ever done anything like it, and is always good to know
> that we people on
> this mailing list, are each day more powerful.
>
> CHEERS.
> Diego.
>
> - Original Message -
> From: "John Herren" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, July 21, 2003 9:25 PM
> Subject: [PHP] controlling winamp with COM
>
>
> > Is there any way to control an open winamp application in
> php? I want to
> > use php as a scheduler to play Winamp. The API has system
> calls to do
> > so, but I don't know how to implement the windows calls.
> >
> >
> > --
> > 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] controlling winamp with COM

2003-07-21 Thread Robert Cummings
Depending on exactly how you intend to use this technology there are
several ways to go about it. One is to create a PHP C extension that you
compile into the PHP engine itself -- this I imagine can hook into the
API to control the open application. Then you can choose to use these
new extension functions in either a shell script to control the winamp
program from the current computer (or shell-script on a remote computer
that you SSH or telnet into), or you can create a PHP-based Web front
end to control the winamp application. The other alternative, is to just
have the PHP script call existing programs than can access the API on
the OS via the backtick or system(), etc... functions (this solution was
mentioned below :). It might even be possible that Winamp itself
provides hooks to a running instance of itself via command line
parameters (one can hope) which would simplify the task greatly.

Cheers,
Rob.


On Mon, 2003-07-21 at 23:40, Diego Fulgueira wrote:
> Look, i don't know if you already received a reply for your message, but i
> can tell you i know a lot about PHP and i have absolutely no idea how to do
> this.
> 
> I will just remind you that PHP is intended to be used as a server to client
> technology and that it might have some indirect interaction with winamp, but
> only on the server.
> 
> What you need is a lower level techonolgy. To do this, i would try to
> approach the problem with C/C++ or VisualBasic and then build an interface
> to make it work from PHP. But this would be kinda messy.
> 
> Good luck. I really hope you don't give up on this, because i think noone
> has ever done anything like it, and is always good to know that we people on
> this mailing list, are each day more powerful.
> 
> CHEERS.
> Diego.
> 
> - Original Message -
> From: "John Herren" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, July 21, 2003 9:25 PM
> Subject: [PHP] controlling winamp with COM
> 
> 
> > Is there any way to control an open winamp application in php? I want to
> > use php as a scheduler to play Winamp. The API has system calls to do
> > so, but I don't know how to implement the windows calls.
> >
> >
> > --
> > 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
> 
> 

-- 
.-.
| Worlds of Carnage - http://www.wocmud.org   |
:-:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the  |
| stuff of nightmares grasp for your soul.|
`-'

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



Re: [PHP] controlling winamp with COM

2003-07-21 Thread Diego Fulgueira
Look, i don't know if you already received a reply for your message, but i
can tell you i know a lot about PHP and i have absolutely no idea how to do
this.

I will just remind you that PHP is intended to be used as a server to client
technology and that it might have some indirect interaction with winamp, but
only on the server.

What you need is a lower level techonolgy. To do this, i would try to
approach the problem with C/C++ or VisualBasic and then build an interface
to make it work from PHP. But this would be kinda messy.

Good luck. I really hope you don't give up on this, because i think noone
has ever done anything like it, and is always good to know that we people on
this mailing list, are each day more powerful.

CHEERS.
Diego.

- Original Message -
From: "John Herren" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 21, 2003 9:25 PM
Subject: [PHP] controlling winamp with COM


> Is there any way to control an open winamp application in php? I want to
> use php as a scheduler to play Winamp. The API has system calls to do
> so, but I don't know how to implement the windows calls.
>
>
> --
> 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] controlling winamp with COM

2003-07-21 Thread John Herren
Is there any way to control an open winamp application in php? I want to 
use php as a scheduler to play Winamp. The API has system calls to do 
so, but I don't know how to implement the windows calls.

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


Re: [PHP] Socket programming with PHP risky?

2003-07-21 Thread Curt Zirzow
* Thus wrote Chris Shiflett ([EMAIL PROTECTED]):
> 
> Disclaimer: Things listed as experimental should always be treated as such and
> never relied upon to have a consistent API or not break.
> 
> That said, I recall that the current sockets extension maintainer desires to
> label the extension stable as soon as possible. This means that it is highly
> unlikely that the API will change. In addition, I have used it extensively and
> have found it to be very stable under a number of conditions. I treat it as a
> stable extension myself.

Thats good to hear.. thanks.



Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] Socket programming with PHP risky?

2003-07-21 Thread Chris Shiflett
--- Curt Zirzow <[EMAIL PROTECTED]> wrote:
> > On the other hand, I've found a lot of tutorials extolling PHP's
> > socket functions, and since I know PHP a bit now I would rather
> > use it for my TCP socket application than learn C and implement
> > it there.
> > 
> > What do you think?
> 
> if you plan on using it, it might be wise to get on the php-dev
> mailing list and watch stuff there too. And maybe talk to the
> people who are writing the socket extension.

Disclaimer: Things listed as experimental should always be treated as such and
never relied upon to have a consistent API or not break.

That said, I recall that the current sockets extension maintainer desires to
label the extension stable as soon as possible. This means that it is highly
unlikely that the API will change. In addition, I have used it extensively and
have found it to be very stable under a number of conditions. I treat it as a
stable extension myself.

Chris

=
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/

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



Re: [PHP] Socket programming with PHP risky?

2003-07-21 Thread Curt Zirzow
* Thus wrote René Fournier ([EMAIL PROTECTED]):
> I've noticed in the PHP docs "EXPERIMENTAL" is marked over all the 
> socket functions. Would it be risky to develop a PHP socket app using 
> those functions? It seems they could change with the next release and 
> my app would instantly stop working.

I wouldn't use it on any live site.

> 
> On the other hand, I've found a lot of tutorials extolling PHP's socket 
> functions, and since I know PHP a bit now I would rather use it for my 
> TCP socket application than learn C and implement it there.
> 
> What do you think?

if you plan on using it, it might be wise to get on the php-dev mailing
list and watch stuff there too.  And maybe talk to the people who are
writing the socket extension.


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



[PHP] Re: replacing everything between 2 strings

2003-07-21 Thread Lee Doolan
> "Matt" == Matt Palermo <[EMAIL PROTECTED]> writes:

Matt> Is there a way to replace everything between 2 given strings
Matt> if it exists?  Say I have:
 
Matt> $str = "replace anything and everything in here.";
 
Matt> Now I want to replace everything between the word "replace"
Matt> and "here.", so the new string could read something like
Matt> this:
 
Matt> $str = "replace NOTHING here.";

how about something like this (untested)
$newStr= preg_replace("/^(replace).*(here)$/", "${1} NOTHING ${2}", $str);

sort of  like in the manual:
http://www.php.net/manual/en/function.preg-replace.php 

-- 

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



Re: [PHP] fsockopen

2003-07-21 Thread Curt Zirzow
* Thus wrote Doug La Farge ([EMAIL PROTECTED]):
> Is there a way to get fsockopen to suppress the header information it 
> returns.  I have no use for the crap, have no idea how to use a regexp 
> to get it out of there (nor does anyone on this list it would seem 
> either).

I have plenty of use for the so called 'crap'. I know how to use a
regex  to strip it out of there, and your using the *wrong* function.

RTFM...
(no link provided)

> 
> 
> I'd like to be able to grab a web page as it is presented to the 
> browsers (as seen in view source).

That is not how it is presented to the browser. The browser presents to
you something entirely different.

> 
> HTTP/1.1 200 OK
> Date: Tue, 22 Jul 2003 05:14:41 GMT
> Server: Apache/1.3.27 (Unix) mod_jk/1.1.0 mod_ssl/2.8.12 OpenSSL/0.9.6g
> Set-Cookie: JSESSIONID=jwjesefa81;Path=/Interface
> Connection: close
> Content-Type: text/html;charset=ISO-8859-1
> 
> The above crap needs to not be returned.

Yes it does.

> 
> Any ideas?

Of course.


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



[PHP] Re: Running PHP as CGI

2003-07-21 Thread David Robley
In article <[EMAIL PROTECTED]>, 
[EMAIL PROTECTED] says...
> Can someone direct me as to how to install PHP on a linux system as CGI?  I
> wish to attempt to use posix_setuid() functions.
> 
> Thanks

If you are compiling from source, use your normal configure but without 
reference to --with-apxs and a binary executable will be created. If you 
are using 4.3 I think there is a php-cli which should do what you want.

-- 
Quod subigo farinam

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



[PHP] Re: same operation to multiple files

2003-07-21 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] 
says...
> I've built a CSV parser that I want to run on every file in a folder.  How
> do I do this?

Get the filenames with opendir() and readdir() and go from there.

Cheers
-- 
Quod subigo farinam


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



Re: [PHP] same operation to multiple files

2003-07-21 Thread Curt Zirzow
* Thus wrote jwulff ([EMAIL PROTECTED]):
> I've built a CSV parser that I want to run on every file in a folder.  How
> do I do this?

For starters, no sense in re-inventing the wheel:
  http://php.net/fgetcsv

Second :
  http://php.net/dir


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] replacing everything between 2 strings

2003-07-21 Thread Curt Zirzow
* Thus wrote Matt Palermo ([EMAIL PROTECTED]):
> Is there a way to replace everything between 2 given strings if it
> exists?  Say I have:
>  
> $str = "replace anything and everything in here.";
>  
> Now I want to replace everything between the word "replace" and "here.",
> so the new string could read something like this:
>  
> $str = "replace NOTHING here.";
>  
> So it keeps the two end points but just replaces everything in the
> middle with a new specified string.  Please help me if you can.  Thanks.

Your looking for ereg_replace:
 ereg_replace('(keep value1).*(keep value2)', '\1\2', $str);

(not tested) 

Of course ereg's get more complicated than that and is probably somthing
worth your while learning. 

then there is preg, more complicate, more powerful, more faster... more
complicated!

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



[PHP] Re: News Reader

2003-07-21 Thread David Robley
In article <[EMAIL PROTECTED]>, 
[EMAIL PROTECTED] says...
> Could someone advise me of a good news reader. I'm using MS Outlook at the
> moment, and if I reply to any post it sends it to the users email and not to
> the news server. Plus, its not that great in general terms.
> 
> Thanks
> 
> Dave

For Win, I find Gravity to be quite nice.

http://lightning.prohosting.com/~tbates/gravity/

-- 
Quod subigo farinam


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



Re: [PHP] Register Globals

2003-07-21 Thread Justin French
What is your aim?

a) to have the site *work* on a server with rg off, or;

b) to re-engineer your site to be safer and more secure, taking 
advantage of the REASONS rg was turned off by default?

If it's a, then look at my example on weberdev, or just switch them 
back on with something like a .htaccess file.

http://www.weberdev.com/get_example.php3?count=3639

If it's b, then I hope your code is well organised and documented, 
because it's a lot of work... I've done it on a few of my sites, but 
they were all < 200 scripts.

1. you need to recognise which GET variables are being used in which 
scripts, then perform a search & replace.  Eg replace all instances of 
$page with $_GET['page'], then test test test to see if everything 
still works.

2. do the same for POST variables (little easier, because you can view 
the contents of your forms to get a list -- if you haven't got it all 
documented somewhere).

3. review your session code (hopefully it's one include file, not 100's 
of files), replacing your old style code:


with


Then find all occurrences of $foo and replace it with $_SESSION['foo'], 
etc etc.

Test test test.

4. Review your cookies implementation (if any), and replace all your 
$cookieVars with $_COOKIE['cookieVars'].

Test test test.



That's the four biggest areas to worry about.  I ended up re-writing my 
session code from scratch, and wasn't using cookies (other than session 
ones), so it was a relatively pain-free job, especially with a good 
search/replace text editor doing most o the work for me.

I can also recommend doing a back-up of the entire site first, and 
turning off register globals before you start.  So that you're testing 
the 'broken' code from day 1.

Good luck!

Justin



On Monday, July 21, 2003, at 10:17  PM, Daryl Meese wrote:

I would like to rewrite my scripts to work when register globals is 
off.
The problem is that my scripts encompass several thousand files.  Does
anyone have any suggestions for an effective tool to help in this 
process?

Daryl Meese

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
---
[This E-mail scanned for viruses]



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


Re: [PHP] Converting a MySQL result into a complex array

2003-07-21 Thread Curt Zirzow
* Thus wrote jwulff ([EMAIL PROTECTED]):
> How would I take the results of the following MySQL statement and put it
> into an array as follows?
> 
> SELECT * FROM numbers WHERE type=`1`;
> SELECT * FROM numbers WHERE type=`2`;
> 
> $example_data = array(
>  array("1",25,8),
>  array("2",10,8)
> );

Do you mean:
$example_data = array (
  1 => array(25,8),
  2 => array(10,8)
)

So thus you can access the data like


$example_data[1]; //access type 1 records.
$example_data[2]; //access type 2 records.

Now of course what and how you store the items in there is another
thing, is it just an array of one value? or an array of array's?

if its the first then you can just do something like

select type, number_field from numbers

for each row in the database:
  $example_data[$row['type']][] = $row['number_field'];


HTH,

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



RE: [PHP] replacing everything between 2 strings

2003-07-21 Thread Matt Palermo
That doesn't really help much...  I think you just replied to the wrong
post.  That answer really doesn't have anything to do with my question,
I don't think...  Thanks anyway.

Matt

-Original Message-
From: Daryl Meese [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 21, 2003 8:09 PM
To: Matt Palermo; [EMAIL PROTECTED]
Subject: RE: [PHP] replacing everything between 2 strings

look into opendir and readdir

with opendir you can open a handle to a directory and use readdir in a
loop
to look at every file (fopen or whatever to load each file) then parse
your
files.  readdir may help you verify the files you are working on at
least
have the right extension.

Daryl

-Original Message-
From: Matt Palermo [mailto:[EMAIL PROTECTED]
Sent: Monday, July 21, 2003 6:52 PM
To: [EMAIL PROTECTED]
Subject: [PHP] replacing everything between 2 strings


Is there a way to replace everything between 2 given strings if it
exists?  Say I have:

$str = "replace anything and everything in here.";

Now I want to replace everything between the word "replace" and "here.",
so the new string could read something like this:

$str = "replace NOTHING here.";

So it keeps the two end points but just replaces everything in the
middle with a new specified string.  Please help me if you can.  Thanks.

Matt




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



RE: [PHP] replacing everything between 2 strings

2003-07-21 Thread Daryl Meese
look into opendir and readdir

with opendir you can open a handle to a directory and use readdir in a loop
to look at every file (fopen or whatever to load each file) then parse your
files.  readdir may help you verify the files you are working on at least
have the right extension.

Daryl

-Original Message-
From: Matt Palermo [mailto:[EMAIL PROTECTED]
Sent: Monday, July 21, 2003 6:52 PM
To: [EMAIL PROTECTED]
Subject: [PHP] replacing everything between 2 strings


Is there a way to replace everything between 2 given strings if it
exists?  Say I have:

$str = "replace anything and everything in here.";

Now I want to replace everything between the word "replace" and "here.",
so the new string could read something like this:

$str = "replace NOTHING here.";

So it keeps the two end points but just replaces everything in the
middle with a new specified string.  Please help me if you can.  Thanks.

Matt


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



[PHP] replacing everything between 2 strings

2003-07-21 Thread Matt Palermo
Is there a way to replace everything between 2 given strings if it
exists?  Say I have:
 
$str = "replace anything and everything in here.";
 
Now I want to replace everything between the word "replace" and "here.",
so the new string could read something like this:
 
$str = "replace NOTHING here.";
 
So it keeps the two end points but just replaces everything in the
middle with a new specified string.  Please help me if you can.  Thanks.
 
Matt


[PHP] Converting a MySQL result into a complex array

2003-07-21 Thread jwulff
How would I take the results of the following MySQL statement and put it
into an array as follows?

SELECT * FROM numbers WHERE type=`1`;
SELECT * FROM numbers WHERE type=`2`;

$example_data = array(
 array("1",25,8),
 array("2",10,8)
);

All the results of type=`1` would be in the first nested array and all the
results of type=`2` would be in the second and so on.



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



[PHP] same operation to multiple files

2003-07-21 Thread jwulff
I've built a CSV parser that I want to run on every file in a folder.  How
do I do this?



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



[PHP] backtick operator and zombie processes

2003-07-21 Thread jeff
When using the backtick operator:

$rsh = split("\n", `rsh 10.0.0.2 sysstat -c 5 -xs 5 2>&1 /dev/null 2>&1
nagios1484  0.7  1.2  6416 3176 ?S15:44   0:00  \_
/usr/local/bin/php /home/jeff/at.php
nagios1537  0.0  0.3  1952  848 ?S15:44   0:00
 \_ sh -c rsh 10.0.0.2 sysstat -c 5 -xs 5 2>&1 ]


Any thoughts?
Jeff
[EMAIL PROTECTED]



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



[PHP] fsockopen

2003-07-21 Thread Doug La Farge
Is there a way to get fsockopen to suppress the header information it 
returns.  I have no use for the crap, have no idea how to use a regexp 
to get it out of there (nor does anyone on this list it would seem 
either).

I'd like to be able to grab a web page as it is presented to the 
browsers (as seen in view source).

HTTP/1.1 200 OK
Date: Tue, 22 Jul 2003 05:14:41 GMT
Server: Apache/1.3.27 (Unix) mod_jk/1.1.0 mod_ssl/2.8.12 OpenSSL/0.9.6g
Set-Cookie: JSESSIONID=jwjesefa81;Path=/Interface
Connection: close
Content-Type: text/html;charset=ISO-8859-1
The above crap needs to not be returned.

Any ideas?

[PHP] Running PHP as CGI

2003-07-21 Thread David Goodchild
Can someone direct me as to how to install PHP on a linux system as CGI?  I
wish to attempt to use posix_setuid() functions.

Thanks



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



[PHP] Socket programming with PHP risky?

2003-07-21 Thread René Fournier
I've noticed in the PHP docs "EXPERIMENTAL" is marked over all the 
socket functions. Would it be risky to develop a PHP socket app using 
those functions? It seems they could change with the next release and 
my app would instantly stop working.

On the other hand, I've found a lot of tutorials extolling PHP's socket 
functions, and since I know PHP a bit now I would rather use it for my 
TCP socket application than learn C and implement it there.

What do you think?

...Rene

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


Re: [PHP] Auto session timeout

2003-07-21 Thread John W. Holmes
Hardik Doshi wrote:
 > There is still one problem. On so many forms on my
education intranet application, students are
submitting the final projects with the supporting
documents and images. Once they submit the final
project, my script is performing serveral error
checking for the file size, extension etc. What should
i have to do for those kind of stuff? Because if
someone submits a very large file then my script won't
be able to upload the file (because of PHP file upload
limit set into the php.ini)
Well, you can't do anything about a very large file except increasing 
the size in php.ini.

As for them being logged off and then submitting a file, you'll handle 
it the same way. Upon realizing the session is invalid, but a file has 
been submitted, you save that file in another temp folder and save the 
information in the session. Upon correct revalidation, you load the 
information for the file back into $_FILES, the form information back 
into $_POST, and then run the original page that was reqested.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

PHP|Architect: A magazine for PHP Professionals – www.phparch.com





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


RE: [PHP] Changing numbers

2003-07-21 Thread Roger B.A Klorese
> From: Brad Pauly [mailto:[EMAIL PROTECTED] 
> Sent: Monday, July 21, 2003 2:45 PM
> To: Roger B.A Klorese
> Cc: 'justin gruenberg'; 'Curt Zirzow'; 'PHP-General'
> Subject: Re: [PHP] Changing numbers
> 
> 
> I am not sure what he is after, but I don't think it has to do with 
> significant figures (if that is what you meant). If that was 
> the case, 
> 12.400 should remain 12.400. Trailing zeros to the right of a decimal 
> are significant.

Perhaps.  But he's saying that, for his purposes, they're not -- if anything
to the right of the last shown zero existed, it would be reflected in the
output.


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



[PHP] Re: MIME decoder for use as the target of an Alias?

2003-07-21 Thread James Rodenkirch
There are classes built into PEAR that handle that

Larry Rosenman wrote:

I've got a strange request, maybe one of the experts here can help?

I need to be able to take a mail message on stdin, bust it up into 
headers, and the constituent mime-parts if any, and be able to parse the 
headers, and get at any
text/plain (or only) part, and shove the headers and
text/plain into a database.

I really don't feel like reinventing the wheel on the mime side.

PHP 4.3.x, if it matters.

Thanks!

LER




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


Re: [PHP] Changing numbers

2003-07-21 Thread Brad Pauly
Roger B.A Klorese wrote:

* Thus wrote zavaboy ([EMAIL PROTECTED]):



I have the following numbers:

12.400
666.75
23
369.2
3.234
How can I make them have at least 2 decimal places?
So, they will output:
12.40
666.75
23.00
269.20
3.234
What's so hard about this?

He wants two or more *significant* positions preserved.  Show to at least
two decimal places, trailing zeroes truncated beyond the 2nd decimal place.
I am not sure what he is after, but I don't think it has to do with 
significant figures (if that is what you meant). If that was the case, 
12.400 should remain 12.400. Trailing zeros to the right of a decimal 
are significant.

- Brad



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


[PHP] MIME decoder for use as the target of an Alias?

2003-07-21 Thread Larry Rosenman
I've got a strange request, maybe one of the experts here can help?

I need to be able to take a mail message on stdin, bust it up into headers, 
and the constituent mime-parts if any, and be able to parse the headers, 
and get at any
text/plain (or only) part, and shove the headers and
text/plain into a database.

I really don't feel like reinventing the wheel on the mime side.

PHP 4.3.x, if it matters.

Thanks!

LER

--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED]
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Trouble connection to Postgres DB

2003-07-21 Thread Nelson Ferreira Jr
   Hi,

   I have PHP 4.3.1 and PostgreSQL 7.3 running in a Mandrake 9.1 
workstation.  When trying to connect to the DB, the PHP execution just 
blocks in pg_connect() call, and it remain blocked for several minutes - 
until I cancel the request.  Sometimes the call completes, but I am not 
sure it connected sucessfully (did not execute any query).
   Postmaster is running with "-i" option and acess permitions are OK. 
There is no error message at all.

 Any 
help?

  Nelson

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

[PHP] Oracle Odbc Connection Problem

2003-07-21 Thread angel
I'm trying to connect to a oracle database using the " Microsoft ODBC for
Oracle " driver with the
followin script:

";
exit;
}
if ($result = odbc_Exec($conn, $query))
{  print  "Query returned : " . odbc_num_rows($result) . " rows";
odbc_result_all($result, "border = 1");}
  ?>

And received the following error:
Warning: SQL error: [Microsoft][ODBC driver for Oracle][Oracle]ORA-12154:
TNS:could not resolve
service name, SQL state 08001 in SQLConnect in c:\php\files\p.php on line 6


Can any body help With this error.

Wha i have to set for connecting with oracle using odbc?

Regards,

Angel M.S.F.






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



RE: [PHP] Changing numbers

2003-07-21 Thread Roger B.A Klorese
> From: justin gruenberg [mailto:[EMAIL PROTECTED] 
> Subject: Re: [PHP] Changing numbers
> 
> 
> Curt Zirzow wrote:
> 
> >* Thus wrote zavaboy ([EMAIL PROTECTED]):
> >  
> >
> >>I have the following numbers:
> >>
> >>12.400
> >>666.75
> >>23
> >>369.2
> >>3.234
> >>
> >>How can I make them have at least 2 decimal places?
> >>So, they will output:
> >>
> >>12.40
> >>666.75
> >>23.00
> >>269.20
> >>3.234
> >>
> >>Thanks in advance!
> >>
> 
> What I dont understand is that your examples are not consitant.  You 
> want 2 or more decimal positions, so as if there are more than 2, to 
> leave what exists.  But your first example, you truncate the 
> last 0.  Is 
> that a typo, or intentional?

What's so hard about this?

He wants two or more *significant* positions preserved.  Show to at least
two decimal places, trailing zeroes truncated beyond the 2nd decimal place.


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



Re: [PHP] Re: How to..

2003-07-21 Thread Doug La Farge
<[EMAIL PROTECTED]>
Haseeb:
hi,
i have heard a lot of people commenting about the coding style of
other programmers. i think everyone has his own style.


but i also say
that there should be a standard that should be followed by everyone.
A nice idea that can never fly.  It might work for basic programming 
but you have to realize there are many ways and styles that people 
develop - often times based on their idea of "proper" coding 
philosophy.  OO code is a perfect case in point.  Pure OO coders (the 
ones that realize Small Talk is the ideal OO model *shrug*) will have a 
different style and implementation.  This thread talks about using 
include files (and thus classes) as a good way to split up code.  The 
problem is, the code i've seen, the reason for using the classes isn't 
to write any object code at all (where is the inheritance?) but rather 
to keep thing organized.  PHP suffers from the fact that there is a 
huge difference between the most basic of programming skills (it's an 
easy language to pick up) and the folks that have been writing OO code 
all their life (C++, Perl, Java, etc.).  I've seen it in Perl - I 
cannot code in the same style as a friend of mine (Randal Schwartz).  
He simply thinks on a much higher level than I ever will and thus his 
coding style will always be more sophisticated.

Just my two cents...

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


Re: [PHP] can't restart session

2003-07-21 Thread CPT John W. Holmes
> In my first post I showed that one of the versions of the logout page
> that I used had this line in it.
>
> setcookie("user_info","",(time()-3600),"/");
>
> Shouldn't that take care of the cookie?

Like someone else said, that'll take care of a cookie called "user_info".
Your session cookie is named something else, usually PHPSESSID, IIRC.

---John Holmes...


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



Re: [PHP] Problem with Adding info into an array

2003-07-21 Thread CPT John W. Holmes
> I have 7 checkboxes, which make up the array information. I currently use
> implode to make the array, however that array only consists of the
> information that it checked.
>
> What I need to do now is make it so the array will always be 7 items, but
if
> there isnt a checkbox for the item, I want inserted to be a 0.

You could name the checkboxes such as



etc...

Then, since you know you have 7 boxes

for($x=0;$x<7;$x++)
{ $final_array[$x] = isset($_GET['item'][$x]) ? $_GET['item'][$x] : 0; }

or

$ar = array_fill(0,7,0);
$final_array = $_GET['item'] + $ar;

---John Holmes...


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



Re: [PHP] Re: How to..

2003-07-21 Thread Comex
<[EMAIL PROTECTED]>
Chris W. Parker:
> ComexEP 
> on Monday, July 21, 2003 1:48 PM said:
>
>>> this is the problem, i have thought of the solution i.e. divide the
>>> functions into files. and then include only that file that has the
>>> function. but i thought i would ask you people how you handle this.
>>> may be i would find something that suits me more then this solution.
>
> Hey sorry I just joined this list and I don't think I have seen the
> original post so I'm just responding to a response.


_hi,
i have heard a lot of people commenting about the coding style of other
programmers. i think everyone has his own style. but i also say that there
should be a standard that should be followed by everyone. i know that there
are many good tutorials that explain how to code. anyway i have my own
style. i like keeping all the functions in one file and the include the file
whenever i need any function. now there are few problems  in that. i prefer
writing functions for almost everything sometimes the functions file grows
to over 5,000 lines. now this is not good. when ever i need one simple
function i had to include all the file. now i also don't like keeping
functions in every file that uses it. this is becoming a big problem for me.
also i have seen some programmer that prefer to use only one file as front
end and place switch or if conditions and include other files depending on
the condition. i think its good way of doing things but when the magnitude
of the projects grows i find it very difficult for me to keep working. i
find it very hard to concentrate.

this is the problem, i have thought of the solution i.e. divide the
functions into files. and then include only that file that has the function.
but i thought i would ask you people how you handle this. may be i would
find something that suits me more then this solution.

thanx in advance.
Haseeb


___


>
> Haseeb,
>
> Certain things have to do with programming style, other things are
> just bad practice.
>
> Here is an example of coding style:
>
> V1:
> function additself($number) {
> return $number += $number;
> }
>
> V2:
> function additself($number)
> {
> return $number += $number;
> }

Or just return $number + $number;

>
> Personally I prefer V4.

??

>
> Now let's talk about bad practice.
>
> It's bad practice to do what you used to do. That is, to have one huge
> file that contains ALL your functions and objects/classes that will
> ever be used in your program. To find out just *how* bad it is you
> can test the time it takes to include that file using microtime().
>
> Then, after you've split up the file, do the same test and see how
> much quicker it is to include three small files than it is to include
> one huge file.
>
> You should split up your files by purpose and not by which page they
> are included in.
>
> For example, let's say your building an ecommerce store from the
> ground up. You'll likely have some functions that perform certain
> tasks. i.e. accessing the database, managing your cart, managing
> users.
>
> Don't be tempted to create different include files for all the
> different pages in your cart. Just group them by function/purpose and
> include only the files necessary.
>
> Sure it may cause a litle more overhead than if you created include
> files specific to each page, but in the long run it will be much less
> overhead than if you included everything in every page.
>
> Hope this helps,
>
>
> Chris.
>
> p.s. I'd appreciate any comments on what I've said that can help
> improve my method.




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



Re: [PHP] Changing numbers

2003-07-21 Thread justin gruenberg
Curt Zirzow wrote:

* Thus wrote zavaboy ([EMAIL PROTECTED]):
 

I have the following numbers:

12.400
666.75
23
369.2
3.234
How can I make them have at least 2 decimal places?
So, they will output:
12.40
666.75
23.00
269.20
3.234
Thanks in advance!

What I dont understand is that your examples are not consitant.  You 
want 2 or more decimal positions, so as if there are more than 2, to 
leave what exists.  But your first example, you truncate the last 0.  Is 
that a typo, or intentional?

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


RE: [PHP] Re: How to..

2003-07-21 Thread Chris W. Parker
ComexEP 
on Monday, July 21, 2003 1:48 PM said:

>> this is the problem, i have thought of the solution i.e. divide the
>> functions into files. and then include only that file that has the
>> function. but i thought i would ask you people how you handle this.
>> may be i would find something that suits me more then this solution.

Hey sorry I just joined this list and I don't think I have seen the
original post so I'm just responding to a response.

Haseeb,

Certain things have to do with programming style, other things are just
bad practice.

Here is an example of coding style:

V1:
function additself($number) {
return $number += $number;
}

V2:
function additself($number)
{
return $number += $number;
}

Personally I prefer V4.

Now let's talk about bad practice.

It's bad practice to do what you used to do. That is, to have one huge
file that contains ALL your functions and objects/classes that will ever
be used in your program. To find out just *how* bad it is you can test
the time it takes to include that file using microtime().

Then, after you've split up the file, do the same test and see how much
quicker it is to include three small files than it is to include one
huge file.

You should split up your files by purpose and not by which page they are
included in.

For example, let's say your building an ecommerce store from the ground
up. You'll likely have some functions that perform certain tasks. i.e.
accessing the database, managing your cart, managing users.

Don't be tempted to create different include files for all the different
pages in your cart. Just group them by function/purpose and include only
the files necessary.

Sure it may cause a litle more overhead than if you created include
files specific to each page, but in the long run it will be much less
overhead than if you included everything in every page.

Hope this helps,


Chris.

p.s. I'd appreciate any comments on what I've said that can help improve
my method.

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



Re: [PHP] IE Issues

2003-07-21 Thread Curt Zirzow
* Thus wrote Stephen ([EMAIL PROTECTED]):
> Hello,
> 
> This is a little off topic but I do need some help. I have had IE 6 for
> about a month now (just got a new computer in June and have been using IE6
> since). When I first started running it, it was fine. A few weeks ago,
> though, all my fonts have greatly increased and I have done nothing that
> would cause this.
> 
> If I make a webpage that has  then IE will display the font

Dont use the font tag.. they are evil... and besides depricated.

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] Changing numbers

2003-07-21 Thread Curt Zirzow
* Thus wrote zavaboy ([EMAIL PROTECTED]):
> I have the following numbers:
> 
> 12.400
> 666.75
> 23
> 369.2
> 3.234
> 
> How can I make them have at least 2 decimal places?
> So, they will output:
> 
> 12.40
> 666.75
> 23.00
> 269.20
> 3.234
> 
> Thanks in advance!

http://php.net/number_format
or
http://php.net/printf



Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] CSV import

2003-07-21 Thread Curt Zirzow
* Thus wrote jwulff ([EMAIL PROTECTED]):
> When using something like this:
> LOAD DATA LOCAL INFILE '/tmp/phpKBjUWb' INTO TABLE `indoma` FIELDS
> TERMINATED BY ',' LINES TERMINATED BY '\r\n'
> 
> How do I also insert a field not in the CSV.  For example there are 8 fields
> in the CSV and 9 in the table.  I want the ninth field to be the name of the
> CSV file.  How do I do this?  Can't find any mention of it on mysql.com.
My suggestion is to go here:

http://www.mysql.com/documentation/lists.html
 

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



[PHP] Problem with Adding info into an array

2003-07-21 Thread Phillip Blancher
In making an array:

I have 7 checkboxes, which make up the array information. I currently use
implode to make the array, however that array only consists of the
information that it checked.

What I need to do now is make it so the array will always be 7 items, but if
there isnt a checkbox for the item, I want inserted to be a 0.

Example

item1[x]
item2[x]
item3[ ]
item4[x]
item5[ ]
item6[x]
item7[ ]

would return = 1,2,0,4,0,6,0

instead of what it does now. 1,2,4,6

I tried placing in the lines before the implode command, saying that:

if($array[0]=="") { $array[0]="0"; } else { }
if($array[1]=="") { $array[1]="0"; } else { }
if($array[2]=="") { $array[2]="0"; } else { }
if($array[3]=="") { $array[3]="0"; } else { }
if($array[4]=="") { $array[4]="0"; } else { }
if($array[5]=="") { $array[5]="0"; } else { }
if($array[6]=="") { $array[6]="0"; } else { }

But this just made the values of the array become blank.

Any suggestions?


Thanks in advance,

Phillip


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.501 / Virus Database: 299 - Release Date: 7/14/2003


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



[PHP] Re: How to..

2003-07-21 Thread ComexEP
... I agree with everyone else... if you want, you can make a function with
switch... but there's no point really...

<[EMAIL PROTECTED]>
Haseeb:
> hi,
> i have heard a lot of people commenting about the coding style of
> other programmers. i think everyone has his own style. but i also say
> that there should be a standard that should be followed by everyone.
> i know that there are many good tutorials that explain how to code.
> anyway i have my own style. i like keeping all the functions in one
> file and the include the file whenever i need any function. now there
> are few problems  in that. i prefer writing functions for almost
> everything sometimes the functions file grows to over 5,000 lines.
> now this is not good. when ever i need one simple function i had to
> include all the file. now i also don't like keeping functions in
> every file that uses it. this is becoming a big problem for me. also
> i have seen some programmer that prefer to use only one file as front
> end and place switch or if conditions and include other files
> depending on the condition. i think its good way of doing things but
> when the magnitude of the projects grows i find it very difficult for
> me to keep working. i find it very hard to concentrate.
>
> this is the problem, i have thought of the solution i.e. divide the
> functions into files. and then include only that file that has the
> function. but i thought i would ask you people how you handle this.
> may be i would find something that suits me more then this solution.
>
> thanx in advance.
> Haseeb
>
>
> 
>   IncrediMail - Email has finally evolved - Click Here



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



RE: [PHP] can't restart session

2003-07-21 Thread Chris W. Parker
CPT John W. Holmes 
on Monday, July 21, 2003 1:32 PM said:

> Well, it can, and it does. I guess it's all in how you use it. If my
> session id is "abcd", then when I log out, your program should erase
> all of the data in the session and forget that it ever knew about a
> session called "abcd". That way, even if I log in with the same
> session (since the cookie wasn't deleted, probably, which is probably
> the cause of this whole problem), then I will be a new user and not
> related to the old user/session in any  matter. 

Ok that makes sense. Then in this case, what can you see that I'm doing
wrong that isn't deleting the cookie?

In my first post I showed that one of the versions of the logout page
that I used had this line in it.

setcookie("user_info","",(time()-3600),"/");

Shouldn't that take care of the cookie?


c.

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



Re: [PHP] Help with Date

2003-07-21 Thread Curt Zirzow
* Thus wrote Adam Voigt ([EMAIL PROTECTED]):
> Umm.
> 
> echo(date('U',strtotime('next Friday')));

I prefer:

while(1) echo(date('U', strtotime('Saturday'));
 

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] Help with Date

2003-07-21 Thread Curt Zirzow
* Thus wrote Ford, Mike   [LSS] ([EMAIL PROTECTED]):
> > -Original Message-
> > From: Adam Voigt [mailto:[EMAIL PROTECTED]
> > Sent: 21 July 2003 14:29
> > 
> > echo(date('U',strtotime('next Friday')));
> 
> Actually, for this upcoming Friday, that'd just be
> 
>echo(date('U',strtotime('Friday')));
> 
> Slightly confusingly, 'next Friday' would be the Friday after that (because
> 'next' is defined to be equivalent to '2nd' -- no, I don't understand why
> either, I just know it is!!)

Its like when someone tells you to 'take the next exit'.. is it this exit
comming up or the one after that

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] Register Globals

2003-07-21 Thread Curt Zirzow
* Thus wrote stfmoreau ([EMAIL PROTECTED]):
> (ii) Even better:
> 
>   // _GET
>   if (isset($_GET))
>   extract($_GET);

Cool.. ya learn somthing every day... thanks..

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] help with ad serving

2003-07-21 Thread Curt Zirzow
* Thus wrote electroteque ([EMAIL PROTECTED]):
> hi there my next project at work is to build an ad server for both image and
> flash , i am storing each ad entry into a banner_ads table then another
> table media to store each of the banners into which links to the banner ,
> although in the created admin tool i allow for multiple uploads so a flash
> file can be uploaded for the banner entry and a animated gif version can
> also be uploaded for the banner entry , or just an animated gif banner
> version , ok so when i select for a banner with a start and end date range
> which is valid and is to be shown on a selected site id i grab the files
> associated with it which are the flash and image, so in my while loop i end
> up with to rows of results how would it be possible to display this and how
> am i able to tell if the banner is a flash file with the animated gif
> version of if the banner is just an animated gif and display it differently
> ? let me know thankyou

I have no clue what you just said.


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] SQL select

2003-07-21 Thread Curt Zirzow
* Thus wrote Jiøí Nìmec ([EMAIL PROTECTED]):
> 
> and I need only first row of each component order by type. so:
> 
> cooler aa1317 f
> cpu cpu177 f
> gk NULL i
> mb mb f
> ram me1112 f
> 
> has somebody some idea hot to select?

Suggestion: invest in a SQL book.

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] Re: Help?

2003-07-21 Thread Curt Zirzow
* Thus wrote Ivo Fokkema ([EMAIL PROTECTED]):
> I want to warn you though, PHP depricates the use of register_globals = On,
> so it would be recommendable to use your modified script and keep coding
> using $_POST, $_GET and these kind of global variables.

So php is removing that feature? 
 

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] can't restart session

2003-07-21 Thread CPT John W. Holmes
> What is the point of having a unique ID for each session if the only
> thing that matters is the data stored within it? Why have a session id
> at all if it can't be used to uniquely track a user?

Well, it can, and it does. I guess it's all in how you use it. If my session
id is "abcd", then when I log out, your program should erase all of the data
in the session and forget that it ever knew about a session called "abcd".
That way, even if I log in with the same session (since the cookie wasn't
deleted, probably, which is probably the cause of this whole problem), then
I will be a new user and not related to the old user/session in any  matter.

> p.s. I'm new to this list as you may have noticed and so far this is the
> only list that I've been on that doesn't use the list's address as the
> return address. Do I have to manually put it in the To box each time?

Yeah, the topic of discussion quite a bit in the past few days. Just use the
Reply-All button, please.

---John Holmes...


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



RE: [PHP] can't restart session

2003-07-21 Thread Gabriel Guzman
> p.s. I'm new to this list as you may have noticed and so far this is the
> only list that I've been on that doesn't use the list's address as the
> return address. Do I have to manually put it in the To box each time?

not at all, just use the "reply-all" feature of your mail client.

gabe. 


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



Re: [PHP] filesize comparison for upload

2003-07-21 Thread CPT John W. Holmes
> I have an upload form that will be used for some really large files. I
need to ask a couple of questions about the ways of improving the success
rate that I have using it.
>
> (1) what is the best and most stable method for uploading a large file.
Sometimes the transfer peters out.
>
> (2) how can I get the status of this process? I need to display a
percentage uploaded, or a ASCII progress bar, or a progress of some sort.
The current form just leaves a user wondering if his browser has crashed or
something. Will I need to trigger a repeat loop in a pop-up that checks
filesize and displays it?

Use FTP. You don't get any features with HTML upload.

---John Holmes...


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



[PHP] filesize comparison for upload

2003-07-21 Thread mac-robots

Hello,

I have an upload form that will be used for some really large files. I need to ask a 
couple of questions about the ways of improving the success rate that I have using it.

(1) what is the best and most stable method for uploading a large file. Sometimes the 
transfer peters out.

(2) how can I get the status of this process? I need to display a percentage uploaded, 
or a ASCII progress bar, or a progress of some sort. The current form just leaves a 
user wondering if his browser has crashed or something. Will I need to trigger a 
repeat loop in a pop-up that checks filesize and displays it?

comments, snippets, ideas?  TIA


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



RE: [PHP] can't restart session

2003-07-21 Thread Chris W. Parker
CPT John W. Holmes 
on Monday, July 21, 2003 1:05 PM said:

> Then something is wrong in your code. If you properly clear the
> session of all of it's contents, then even if I pass the same session
> id on the next page request, it should see me as a new user since
> there is no data in the session.

Ok, then maybe I'm misunderstanding how sessions work and/or how they
are supposed to be used.

What is the point of having a unique ID for each session if the only
thing that matters is the data stored within it? Why have a session id
at all if it can't be used to uniquely track a user?

Just for the sake of example, let's say I write the session id to a
database each time someone hits the login page and successfully
authenticates. If the session id doesn't change between each user (using
the same computer, let's say in a public school library) then it would
appear that I've got much less use than I realy do.

Granted someone wouldn't really do it this way but I'm just trying to
make a point.

Chris.


p.s. I'm new to this list as you may have noticed and so far this is the
only list that I've been on that doesn't use the list's address as the
return address. Do I have to manually put it in the To box each time?

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



Re: [PHP] POSIX seteuid and similar

2003-07-21 Thread Doug La Farge
You guys can correct me if I'm wrong but I believe what is referred to 
here is SUEXEC.

This allows a virtual domain instance to run as any specified username 
and group.

You are not setting the UID of the script but rather any script fun for 
that domain.  This way you don't have to chmod 777 or chgrp apache 
files.  The virtual server instance is set to run as you (usually) and 
thus has the same permissions you do.

You may have to compile or recompile apache to get this to work for 
your set up (requires you specify a path where SUEXEC files exist) 
among other things.

hope this helps...

now... any regexp's response out there? :-)

On Monday, July 21, 2003, at 12:56 PM, David Goodchild wrote:

Curt, thanks for that, I didnt see that in the notes.

A question that I havent been able to work out since reading this is...

When both you and the person in the contributed notes say: "make your 
php
cgi setuid" and "that is ran in cgi mode that is setuid'd" ...

How do I setuid a CGI script? ...surely if i access it through the 
browser
it will still execute as apache?

Cheers

- Original Message -
From: "Curt Zirzow" <[EMAIL PROTECTED]>
Newsgroups: php.general
To: <[EMAIL PROTECTED]>
Sent: Monday, July 21, 2003 5:08 AM
Subject: Re: [PHP] POSIX seteuid and similar

* Thus wrote David Goodchild ([EMAIL PROTECTED]):
Hi,

I am trying to create a small php program where I can control users
processes.  As far as I see I require Apache to run as root in order 
to
do
this (Note: I wish to access it via a webpage run through a 
browser). At
the moment all pages are executed as user 'apache' (UID #48 in this
case).
Other than giving apache root access which i hear is a very bad 
thing to
do,
what other ways can i use the posix_seteuid() functions and the like.

Any help at all will be really appreciated.
There is an example in the contributed notes on the site under the
posix_setuid. Baically it is a perl script that is ran in cgi mode 
that
is setuid'd. then opens a php script that runs the setuid script.

I dont see why, if you choose this method is to just bypass the perl 
cgi
and just make your php cgi setuid.

I'm not sure of any security issues in doing that but it seems better
than running your whole apache server as root.
Curt
--
"I used to think I was indecisive, but now I'm not so sure."


--
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] can't restart session

2003-07-21 Thread CPT John W. Holmes
From: "Chris W. Parker" <[EMAIL PROTECTED]>
> > CPT John W. Holmes 
> > on Monday, July 21, 2003 12:39 PM said:
> >
> > You should still consider the user logged out since the
> > session is empty, right?
>
> Right, but the server isn't thinking of it this way.

Then something is wrong in your code. If you properly clear the session of
all of it's contents, then even if I pass the same session id on the next
page request, it should see me as a new user since there is no data in the
session.

---John Holmes...


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



Re: [PHP] POSIX seteuid and similar

2003-07-21 Thread David Goodchild
Curt, thanks for that, I didnt see that in the notes.

A question that I havent been able to work out since reading this is...

When both you and the person in the contributed notes say: "make your php
cgi setuid" and "that is ran in cgi mode that is setuid'd" ...

How do I setuid a CGI script? ...surely if i access it through the browser
it will still execute as apache?

Cheers


- Original Message - 
From: "Curt Zirzow" <[EMAIL PROTECTED]>
Newsgroups: php.general
To: <[EMAIL PROTECTED]>
Sent: Monday, July 21, 2003 5:08 AM
Subject: Re: [PHP] POSIX seteuid and similar


> * Thus wrote David Goodchild ([EMAIL PROTECTED]):
> > Hi,
> >
> > I am trying to create a small php program where I can control users
> > processes.  As far as I see I require Apache to run as root in order to
do
> > this (Note: I wish to access it via a webpage run through a browser). At
> > the moment all pages are executed as user 'apache' (UID #48 in this
case).
> > Other than giving apache root access which i hear is a very bad thing to
do,
> > what other ways can i use the posix_seteuid() functions and the like.
> >
> > Any help at all will be really appreciated.
>
> There is an example in the contributed notes on the site under the
> posix_setuid. Baically it is a perl script that is ran in cgi mode that
> is setuid'd. then opens a php script that runs the setuid script.
>
> I dont see why, if you choose this method is to just bypass the perl cgi
> and just make your php cgi setuid.
>
> I'm not sure of any security issues in doing that but it seems better
> than running your whole apache server as root.
>
> Curt
> -- 
> "I used to think I was indecisive, but now I'm not so sure."



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



[PHP] Re: IE Issues

2003-07-21 Thread David Goodchild
You need to open IE6 and do this:
Goto View -> Text Size -> Medium

Sometimes this can accidently change

"Stephen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello,
>
> This is a little off topic but I do need some help. I have had IE 6 for
> about a month now (just got a new computer in June and have been using IE6
> since). When I first started running it, it was fine. A few weeks ago,
> though, all my fonts have greatly increased and I have done nothing that
> would cause this.
>
> If I make a webpage that has  then IE will display the font
> at size 3 or 4. I have no idea why either. I have put a default style
sheet
> on IE to make all the fonts a certain size but this is getting annoying
> since only some are getting resized.
>
> I have run the Accessibilty wizard on Windows XP Pro but it did nothing.
For
> reference, here is my accessibility settings in IE6:
>
> http://www.melchior.us/ieissues/acc.gif
>
> If I turn off the style sheet option, then here is what all the fonts look
> like:
>
> http://www.melchior.us/ieissues/font_big.gif
>
> Now if I turn on the style sheet, this is what the fonts look like:
>
> http://www.melchior.us/ieissues/font_small.gif
>
> If anyone has any ideas how to fix this, please let me know! I've already
> tried uninstalling and reinstalling IE but there was no luck. Please reply
> soon.
>
> Thank you,
> Stephen Craton
> Senior Executive Web Developer
> Mophus.com, Inc.
> Lead Programmer/Webmaster
> WiredPHP (http://php.melchior.us)
>
>



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



RE: [PHP] can't restart session

2003-07-21 Thread Chris W. Parker
CPT John W. Holmes 
on Monday, July 21, 2003 12:39 PM said:

> You have the same session id, but there is no data in it, so what's
> the problem?

The problem is that the server is still regarding it as the same session
even if a different user comes along and logs in.

> You should still consider the user logged out since the
> session is empty, right?

Right, but the server isn't thinking of it this way.

> If you really want, upon logout, make a new session id with
> session_id(), md5() and uniqid().

This might actually work quite well.



Chris.

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



RE: [PHP] can't restart session

2003-07-21 Thread Adrian Portsmouth
In order to use the set_cookie method to kill a session_id you need to
specify the name of the session, you have used 'user_info' but nowhere in
your code do you specify the session_name("user_info") as the sessions name.

HTH
Ade

-Original Message-
From: Chris W. Parker [mailto:[EMAIL PROTECTED] 
Sent: 21 July 2003 20:29
To: [EMAIL PROTECTED]
Subject: [PHP] can't restart session


Hello,

PHP 4.2.2

I'm working on a cart program right now and I can't properly log the user
out. The only way I've been able to get a different session id is by closing
all browser windows and reloading the site.

Scenario:

I go the site I'm working on and click the login page. I have 'echo
session_id();' in the login page so I can see the session id. I fill in my
username and password and click "login". I'm then sent to a processing page
that actually fills in the session variable with some data (i.e. username,
session id, security level, etc.). I then redirect back to the login page
with header("Location: login.php");.

Now that I'm back at the login page I still see my session id (and as
expected it is the same). Then I click "logout" and am taken to a logout
page. The logout page is as follows:



Here is another version of the same file that I've tried using:




As far as I have been able to find out (by surveying other people and
RTFM'ing) I'm doing it correctly, but for some it's just not working.

After I click logout I would expect to be sent back to the login page and
see a different session id displayed, but instead I'm presented with the
same session id. The only way I can get a different session id is by closing
all the browser windows and starting over.


Anyone have any ideas?


Thanks,
Chris.

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


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



[PHP] Re: can't restart session

2003-07-21 Thread James Rodenkirch
you need to specify what session variables to unset - usually I write a 
foreach loop to unset every session variable (unless you are using 
certain variables for other parts of the site)

Like This

foreach ($_SESSION as $key => $value){
session_unregister($key);
}
Chris W. Parker wrote:

Hello,

PHP 4.2.2

I'm working on a cart program right now and I can't properly log the
user out. The only way I've been able to get a different session id is
by closing all browser windows and reloading the site.
Scenario:

I go the site I'm working on and click the login page. I have 'echo
session_id();' in the login page so I can see the session id. I fill in
my username and password and click "login". I'm then sent to a
processing page that actually fills in the session variable with some
data (i.e. username, session id, security level, etc.). I then redirect
back to the login page with header("Location: login.php");.
Now that I'm back at the login page I still see my session id (and as
expected it is the same). Then I click "logout" and am taken to a logout
page. The logout page is as follows:

session_destroy();
setcookie("user_info","",(time()-3600),"/");
header("Location: {$_SERVER["HTTP_REFERER"]}");
exit;
?>
Here is another version of the same file that I've tried using:


session_unset();
session_destroy();
header("Location: {$_SERVER["HTTP_REFERER"]}");
exit;
?>
As far as I have been able to find out (by surveying other people and
RTFM'ing) I'm doing it correctly, but for some it's just not working.
After I click logout I would expect to be sent back to the login page
and see a different session id displayed, but instead I'm presented with
the same session id. The only way I can get a different session id is by
closing all the browser windows and starting over.
Anyone have any ideas?

Thanks,
Chris.


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


Re: [PHP] can't restart session

2003-07-21 Thread CPT John W. Holmes
You have the same session id, but there is no data in it, so what's the
problem? You should still consider the user logged out since the session is
empty, right?

If you really want, upon logout, make a new session id with session_id(),
md5() and uniqid().

---John Holmes...

- Original Message - 
From: "Chris W. Parker" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 21, 2003 3:28 PM
Subject: [PHP] can't restart session


Hello,

PHP 4.2.2

I'm working on a cart program right now and I can't properly log the
user out. The only way I've been able to get a different session id is
by closing all browser windows and reloading the site.

Scenario:

I go the site I'm working on and click the login page. I have 'echo
session_id();' in the login page so I can see the session id. I fill in
my username and password and click "login". I'm then sent to a
processing page that actually fills in the session variable with some
data (i.e. username, session id, security level, etc.). I then redirect
back to the login page with header("Location: login.php");.

Now that I'm back at the login page I still see my session id (and as
expected it is the same). Then I click "logout" and am taken to a logout
page. The logout page is as follows:



Here is another version of the same file that I've tried using:




As far as I have been able to find out (by surveying other people and
RTFM'ing) I'm doing it correctly, but for some it's just not working.

After I click logout I would expect to be sent back to the login page
and see a different session id displayed, but instead I'm presented with
the same session id. The only way I can get a different session id is by
closing all the browser windows and starting over.


Anyone have any ideas?


Thanks,
Chris.

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


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



[PHP] can't restart session

2003-07-21 Thread Chris W. Parker
Hello,

PHP 4.2.2

I'm working on a cart program right now and I can't properly log the
user out. The only way I've been able to get a different session id is
by closing all browser windows and reloading the site.

Scenario:

I go the site I'm working on and click the login page. I have 'echo
session_id();' in the login page so I can see the session id. I fill in
my username and password and click "login". I'm then sent to a
processing page that actually fills in the session variable with some
data (i.e. username, session id, security level, etc.). I then redirect
back to the login page with header("Location: login.php");.

Now that I'm back at the login page I still see my session id (and as
expected it is the same). Then I click "logout" and am taken to a logout
page. The logout page is as follows:



Here is another version of the same file that I've tried using:




As far as I have been able to find out (by surveying other people and
RTFM'ing) I'm doing it correctly, but for some it's just not working.

After I click logout I would expect to be sent back to the login page
and see a different session id displayed, but instead I'm presented with
the same session id. The only way I can get a different session id is by
closing all the browser windows and starting over.


Anyone have any ideas?


Thanks,
Chris.

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



Re: [PHP] IE Issues

2003-07-21 Thread Stephen
Hmm, yeah, you're probably right. I probably did push CTRL+MouseWheel since
I use it a lot and CTRL+C. Thanks for the info.

The power surge did do a lot of funky stuff to my files. I found bits of
messed up code here and there and my date was set to 2069. Thank goodness
for System Restore. ^_^ Thanks again!

Thank you,
Stephen Craton
Senior Executive Web Developer
Mophus.com, Inc.
Lead Programmer/Webmaster
WiredPHP (http://php.melchior.us)


- Original Message - 
From: "Chris W. Parker" <[EMAIL PROTECTED]>
To: "Stephen" <[EMAIL PROTECTED]>
Sent: Monday, July 21, 2003 1:29 PM
Subject: RE: [PHP] IE Issues


Stephen 
on Monday, July 21, 2003 11:21 AM said:

> Thank you so much! I now have to wonder how it got set to that.
> Probably my brothers or that power surge a while back. Anyway, thanks
> again!

Maybe it was your brothers but definitely not a power surge. If a power
surge were to interfere with your computer in a negative way it wouldn't
change the size of your font in IE.

Do you have a scroll wheel on your mouse? Is it possible you pressed
Ctrl-Scroll up/down at the same time at any point? Probably. That's the
most likely situation. It's really a handy tool, try it out.


c.





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



Re: [PHP] Changing numbers

2003-07-21 Thread John Nichel
bob parker wrote:
On Tue, 22 Jul 2003 04:03, zavaboy wrote:

*Sigh*, lets say I have:

2.65
3.3
5.2670
12.030
I would like it at least 2 decimal places.. So, 5.2670 would be 5.267 not
5.27:


5.267 is 3 decimal places - count them

He said "at least 2 decimal places", not "exactally two decimal places".

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


Re: [PHP] Changing numbers

2003-07-21 Thread bob parker
On Tue, 22 Jul 2003 04:03, zavaboy wrote:
> *Sigh*, lets say I have:
>
> 2.65
> 3.3
> 5.2670
> 12.030
>
> I would like it at least 2 decimal places.. So, 5.2670 would be 5.267 not
> 5.27:
>

5.267 is 3 decimal places - count them

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



Re: [PHP] regexp help...

2003-07-21 Thread Doug La Farge
I guess I should point out that the line i want is the XML line 
'

On Monday, July 21, 2003, at 11:44 AM, Doug La Farge wrote:

Hi all,

I have a string that for all practical purposes should probably be a 
list (array).  I need one line from the string and need to send the 
rest to /dev/null.

The string starts:
HTTP/1.1 200 OK
Date: Tue, 22 Jul 2003 01:34:12 GMT
Server: Apache/1.3.27 (Unix) mod_jk/1.1.0 mod_ssl/2.8.12 OpenSSL/0.9.6g
Set-Cookie: JSESSIONID=mngtpma6i1;Path=/Interface
Connection: close
Content-Type: text/html;charset=ISO-8859-1








 blah blah blah  



The String ends on the line above (white space line).

If I'm not mistaken the blank lines are actually a combo of unix and 
dos line returns.

any help is much appreciated.

thanks,


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


Re: [PHP] Changing numbers

2003-07-21 Thread John Nichel
zavaboy wrote:
*Sigh*, lets say I have:

2.65
3.3
5.2670
12.030
I would like it at least 2 decimal places.. So, 5.2670 would be 5.267 not
5.27:
2.65
3.30
5.267
12.03
"James Rodenkirch" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
try rounding it first

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

Zavaboy wrote:


What about if I had 2.856 that function will make it 2.86.

"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
[snip]
How can I make them have at least 2 decimal places?
[/snip]
RTFM at http://www.php.net/number_format

HTH!




*Sigh*

RTFM - http://us4.php.net/sprintf

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


[PHP] regexp help...

2003-07-21 Thread Doug La Farge
Hi all,

I have a string that for all practical purposes should probably be a 
list (array).  I need one line from the string and need to send the 
rest to /dev/null.

The string starts:
HTTP/1.1 200 OK
Date: Tue, 22 Jul 2003 01:34:12 GMT
Server: Apache/1.3.27 (Unix) mod_jk/1.1.0 mod_ssl/2.8.12 OpenSSL/0.9.6g
Set-Cookie: JSESSIONID=mngtpma6i1;Path=/Interface
Connection: close
Content-Type: text/html;charset=ISO-8859-1








 blah blah blah  



The String ends on the line above (white space line).

If I'm not mistaken the blank lines are actually a combo of unix and 
dos line returns.

any help is much appreciated.

thanks,

RE: [PHP] IE Issues

2003-07-21 Thread Jaime Bozza
Ctrl-MouseWheel will increase or decrease the text size in an IE browser
window.  I've found that I've accidentally increased the font size since I
use the Mouse Wheel quite a bit.  (As well as CTRL-W to close an IE window
if one pops up)


Jaime Bozza


> -Original Message-
> From: Stephen [mailto:[EMAIL PROTECTED] 
> Sent: Monday, July 21, 2003 1:21 PM
> To: Chris W. Parker
> Cc: PHP List
> Subject: Re: [PHP] IE Issues
> 
> 
> Thank you so much! I now have to wonder how it got set to 
> that. Probably my
> brothers or that power surge a while back. Anyway, thanks again!
> 
> Thank you,
> Stephen Craton
> Senior Executive Web Developer
> Mophus.com, Inc.
> Lead Programmer/Webmaster
> WiredPHP (http://php.melchior.us)
> 
> 
> - Original Message - 
> From: "Chris W. Parker" <[EMAIL PROTECTED]>
> To: "Stephen" <[EMAIL PROTECTED]>
> Sent: Monday, July 21, 2003 1:13 PM
> Subject: RE: [PHP] IE Issues
> 
> 
> Stephen 
> on Monday, July 21, 2003 11:11 AM said:
> 
> > If I make a webpage that has  then IE will 
> display the
> > font at size 3 or 4. I have no idea why either. I have put a default
> > style sheet on IE to make all the fonts a certain size but this is
> > getting annoying since only some are getting resized.
> 
> Is your text scaled? That's the only reason I think of.
> 
> View > Text Size > Medium (default)
> 
> You might be on Larger or Largest.
> 
> 
> c.
> 
> p.s. FIRST POST!!
> 
> 
> 
> 
> 
> -- 
> 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] IE Issues

2003-07-21 Thread Stephen
Thank you so much! I now have to wonder how it got set to that. Probably my
brothers or that power surge a while back. Anyway, thanks again!

Thank you,
Stephen Craton
Senior Executive Web Developer
Mophus.com, Inc.
Lead Programmer/Webmaster
WiredPHP (http://php.melchior.us)


- Original Message - 
From: "Chris W. Parker" <[EMAIL PROTECTED]>
To: "Stephen" <[EMAIL PROTECTED]>
Sent: Monday, July 21, 2003 1:13 PM
Subject: RE: [PHP] IE Issues


Stephen 
on Monday, July 21, 2003 11:11 AM said:

> If I make a webpage that has  then IE will display the
> font at size 3 or 4. I have no idea why either. I have put a default
> style sheet on IE to make all the fonts a certain size but this is
> getting annoying since only some are getting resized.

Is your text scaled? That's the only reason I think of.

View > Text Size > Medium (default)

You might be on Larger or Largest.


c.

p.s. FIRST POST!!





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



Re: [PHP] Passing Serialized Array via Hidden field

2003-07-21 Thread Chris Shiflett
--- John Manko <[EMAIL PROTECTED]> wrote:
> Just a small point, you can have both GET and POST.
> 
> -- search.html -
>  action='page.php?...

Notice your form method is POST, not both GET and POST. The HTTP request sent
after a user submits this form will be a POST request, even though you do have
GET variables. Try not to confuse GET/POST variables with GET/POST request
methods.

Chris

=
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/

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



RE: [PHP] Changing numbers

2003-07-21 Thread Jay Blanchard
[snip]
I would like it at least 2 decimal places.. So, 5.2670 would be 5.267
not
5.27:
[/snip]

RTFM for formatted string http://us3.php.net/sprintf or
http://us3.php.net/printf

HTH

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



Re: [PHP] Passing Serialized Array via Hidden field

2003-07-21 Thread CPT John W. Holmes
> --- Andrei Verovski <[EMAIL PROTECTED]> wrote:
> > I am need to pass serialized assotiative array via form hidden
> > field (not GET or POST).
>
> This is impossible. A hidden form field is simply a form field that is not
> displayed to the user. Form actions must be GET or POST.
>
> > In order to do it, I did the following: urlencode(serialize($my_array)).
>
> Don't URL encode the value of the form field, since the browser will take
care
> of that. You should probably use POST rather than GET, because serializing
an
> array might yield a very long string and make the URL too large for the
Web
> browser and/or Web server to handle.

I didn't see the original thread, but judging from the title, this is how
you'd do it:



And to retrieve:

$array = unserialize(stripslashes($_POST['serialized_array']));
(assuming magic_quotes_gpc is ON)

---John Holmes...


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



[PHP] IE Issues

2003-07-21 Thread Stephen
Hello,

This is a little off topic but I do need some help. I have had IE 6 for
about a month now (just got a new computer in June and have been using IE6
since). When I first started running it, it was fine. A few weeks ago,
though, all my fonts have greatly increased and I have done nothing that
would cause this.

If I make a webpage that has  then IE will display the font
at size 3 or 4. I have no idea why either. I have put a default style sheet
on IE to make all the fonts a certain size but this is getting annoying
since only some are getting resized.

I have run the Accessibilty wizard on Windows XP Pro but it did nothing. For
reference, here is my accessibility settings in IE6:

http://www.melchior.us/ieissues/acc.gif

If I turn off the style sheet option, then here is what all the fonts look
like:

http://www.melchior.us/ieissues/font_big.gif

Now if I turn on the style sheet, this is what the fonts look like:

http://www.melchior.us/ieissues/font_small.gif

If anyone has any ideas how to fix this, please let me know! I've already
tried uninstalling and reinstalling IE but there was no luck. Please reply
soon.

Thank you,
Stephen Craton
Senior Executive Web Developer
Mophus.com, Inc.
Lead Programmer/Webmaster
WiredPHP (http://php.melchior.us)



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



Re: [PHP] need help with mysql union

2003-07-21 Thread CPT John W. Holmes
> hi, i'm trying to select * through 3 tables - is the following syntax
correct?
>
> $sql="(SELECT * FROM mjp_cc)";
> $sql="UNION";
> $sql="(SELECT * FROM imc_cc)";
> $sql="UNION";
> $sql="(SELECT * FROM pmp_cc)";
> $sql.=" ORDER BY savedccactivity DESC";
>
> i basically just want to spit out the contents of these tables...
>
> also - how would this type of query work if the name 'savedccactivity' is
> different in all 3
> tables?

This is a MySQL question, first of all.

Second, you need to rename the column in each table to 'savedccactivity' if
you want to order the whole result by that.

(SELECT foo AS column FROM table1)
UNION
(SELECT bar AS column FROM table2)
UNION
(SELECT abc AS column FROM table3)
ORDER BY column DESC

---John Holmes...


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



Re: [PHP] need help with MySQL full text searching!!!!

2003-07-21 Thread CPT John W. Holmes
I think you need to make a second index that just consists of the one column

ALTER TABLE biblio ADD FULLTEXT (title)

if you want to search on just that one column.

---John Holmes...

- Original Message - 
From: "Angelo Zanetti" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 21, 2003 12:09 PM
Subject: [PHP] need help with MySQL full text searching


Hi

I have a table which contains 3 fields (ID, Title, Abstract) the title and
abstract fields have been fulltext indexes like this:

ALTER TABLE biblio ADD FULLTEXT (title,abstract);

that worked fine, however my problem is whenever I want to do a select
statement only comparing 1 of the columns to inputted data ( in a Select
statement):

$result = mysql_query("SELECT * FROM Biblio WHERE MATCH (title) AGAINST
('$searchString')");

It gives me this error: Can't find FULLTEXT index matching the column list.
It appears that i cant just compare a single fulltext indexed column if
there are other fulltext indexed columns. When I try it with both columns
then it works but I just want to compare 1 column. eg:
$result = mysql_query("SELECT * FROM Biblio WHERE MATCH (title, abstract)
AGAINST ('$searchString')");

So is there anyway that I can just compare 1 column with text entered? Do I
have t make some sort of temporary table to do this? All the examples I have
found show the select statement with 2 columns or if they use 1 coumn its
because there is only 1 column in their table.

Any help would be appreciated!

TIA

Angelo

ps. sorry that this may be a bit off topic


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



Re: [PHP] Changing numbers

2003-07-21 Thread zavaboy
*Sigh*, lets say I have:

2.65
3.3
5.2670
12.030

I would like it at least 2 decimal places.. So, 5.2670 would be 5.267 not
5.27:

2.65
3.30
5.267
12.03

"James Rodenkirch" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> try rounding it first
>
> http://www.php.net/manual/en/function.round.php
>
> Zavaboy wrote:
>
> > What about if I had 2.856 that function will make it 2.86.
> >
> >
> > "Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > [snip]
> > How can I make them have at least 2 decimal places?
> > [/snip]
> >
> > RTFM at http://www.php.net/number_format
> >
> > HTH!
> >
> >
>



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



Re: [PHP] Changing numbers

2003-07-21 Thread James Rodenkirch
try rounding it first

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

Zavaboy wrote:

What about if I had 2.856 that function will make it 2.86.

"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
[snip]
How can I make them have at least 2 decimal places?
[/snip]
RTFM at http://www.php.net/number_format

HTH!




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


Re: [PHP] Changing numbers

2003-07-21 Thread zavaboy
What about if I had 2.856 that function will make it 2.86.


"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
[snip]
How can I make them have at least 2 decimal places?
[/snip]

RTFM at http://www.php.net/number_format

HTH!



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



RE: [PHP] CSV import

2003-07-21 Thread Jay Blanchard
[snip]
When using something like this:
LOAD DATA LOCAL INFILE '/tmp/phpKBjUWb' INTO TABLE `indoma` FIELDS
TERMINATED BY ',' LINES TERMINATED BY '\r\n'

How do I also insert a field not in the CSV.  For example there are 8
fields
in the CSV and 9 in the table.  I want the ninth field to be the name of
the
CSV file.  How do I do this?  Can't find any mention of it on mysql.com.
[/snip]

Instead of LOAD DATA INFILE see 

http://www.php.net/fgetcsv 

HTH!

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



RE: [PHP] Changing numbers

2003-07-21 Thread Jay Blanchard
[snip]
How can I make them have at least 2 decimal places?
[/snip]

RTFM at http://www.php.net/number_format

HTH!

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



[PHP] Changing numbers

2003-07-21 Thread zavaboy
I have the following numbers:

12.400
666.75
23
369.2
3.234

How can I make them have at least 2 decimal places?
So, they will output:

12.40
666.75
23.00
269.20
3.234

Thanks in advance!

-- 

- Zavaboy
[EMAIL PROTECTED]
www.zavaboy.com



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



[PHP] CSV import

2003-07-21 Thread jwulff
When using something like this:
LOAD DATA LOCAL INFILE '/tmp/phpKBjUWb' INTO TABLE `indoma` FIELDS
TERMINATED BY ',' LINES TERMINATED BY '\r\n'

How do I also insert a field not in the CSV.  For example there are 8 fields
in the CSV and 9 in the table.  I want the ninth field to be the name of the
CSV file.  How do I do this?  Can't find any mention of it on mysql.com.

John



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



[PHP] Re: Print help

2003-07-21 Thread Kevin Stone

"Ron Allen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> What I would like to do is to make an optional page that can print
> information to a specified printer.  Can PHP do this?
> If so how???
>
> Please help!!!

Look in the manual under 'printer'..
http://www.php.net/manual/en/ref.printer.php

Printer functions are server-side and work on Windows operating systems
only.

- Kevin



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



RE: [PHP] jpeg photo file upload problem

2003-07-21 Thread motorpsychkill
You may want to try getimagesize(), as this is more consistent in
determining mime types.  That is what I wound up doing as it appears to
override the browser/platform idiosyncracies.

-m

> -Original Message-
> From: John T. Beresford [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 17, 2003 5:51 PM
> To: motorpsychkill; [EMAIL PROTECTED]
> Subject: RE: [PHP] jpeg photo file upload problem
>
>
>
> You're exactly right.
>
> I did a test on a win box and it reported image/pjpeg
> I ran tests on other browsers/platforms, and for a .jpg image, only a
> handful of win boxes reported the 'pjpeg' thing.
>
> I also did tests using 'regular jpegs' and 'progressive jpegs' and
> that had no effect.
>
> Apparently the ms browser on a win box calls a 'jpeg a 'pjpeg'
>
> Anyway, to all, thanks for all the help, it's all working now.
>
> John
>
>
> At 5:43 PM -0700 7/17/03, motorpsychkill wrote:
> >I suspect this may be a browser/platform issue.  I've recently run some
> >tests and below are the most interesting results (mime types):
> >
> >IE 6 on PC:
> >something.jpg->  image/pjpeg
> >something.tif (pc format) -> application/octet-stream
> >something.tif (mac format) ->image/tiff
> >
> >IE 5 on Mac:
> >something.bmp -> application/octet-stream
> >something.jpg -> image/jpeg
> >
> >
> >NS 4.7 on Mac:
> >something.bmp->  image/x-MS-bmp
> >
> >Opera 7 on PC:
> >something.bmp->  image/x-windows-bmp
> >
> >I suspect if you want to validate jpgs, use image/jpeg and image/pjpeg or
> >validate by examining the extention (ie ".jpg").  I don't know
> how safe the
> >latter is.
> >
> >HTH,
> >
> >m
> >
> >
> >>  -Original Message-
> >>  From: John T. Beresford [mailto:[EMAIL PROTECTED]
> >>  Sent: Wednesday, July 16, 2003 7:49 PM
> >>  To: [EMAIL PROTECTED]
> >>  Subject: [PHP] jpeg photo file upload problem
> >>
> >>
> >>  Hi All,
> >>
> >>  I have a system that allows a person to upload photos to the server
> >>  via an admin web form.
> >>
> >>  I have been using the code for about a year with no problem. I
> >>  designed it specifically for a client of mine that has just started
> >>  cruising on a sailboat for a few years.
> >>
> >>  They tryed uploading a photo from a public library via the web form
> >>  and they got the error message that it was not a jpeg file.
> >>
> >>  The relevent PHP code from my system for the checking is:
> >>
> >>  if ($type != "image/jpeg") {
> >>  $ReturnSaying = "!! The file is not a JPEG picture. Please try again";
> >>  include("photo_error.php");
> >>  exit;
> >>
> >>  Anyway, this system has been tested and tested again on multiple
> >>  platforms and conditions, except a public library.
> >>
> >>  Question: Is it possible that the library is using some proxy system
> >>  that is messing with the file so it comes out bad?
> >>
> >>  Also, I have confirmed that the file is a jpeg file.
> >>
> >>  Any ideas are greatly appreciated,
> >>  John
> >>
> >>  --
> >>  ===
> >>  John T. Beresford, Owner
> >>  Digital Studio Design
> >>  Edmond, OK
> >>  http://www.digitalstudiodesign.com/
> >>  405.760.0794
> >>
> >>  --
> >>  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
>
> --
> ===
> John T. Beresford, Owner
> Digital Studio Design
> Edmond, OK
> http://www.digitalstudiodesign.com/
> 405.760.0794
>
> --
> 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: need help with MySQL full text searching!!!!

2003-07-21 Thread James Rodenkirch
You need to use mysql 4.0.10-gamma for full text searching to work

Angelo Zanetti wrote:

Hi

I have a table which contains 3 fields (ID, Title, Abstract) the title and abstract fields have been fulltext indexes like this:

ALTER TABLE biblio ADD FULLTEXT (title,abstract);

that worked fine, however my problem is whenever I want to do a select statement only comparing 1 of the columns to inputted data ( in a Select statement):

$result = mysql_query("SELECT * FROM Biblio WHERE MATCH (title) AGAINST ('$searchString')");

It gives me this error: Can't find FULLTEXT index matching the column list. It appears that i cant just compare a single fulltext indexed column if there are other fulltext indexed columns. When I try it with both columns then it works but I just want to compare 1 column. eg: 
$result = mysql_query("SELECT * FROM Biblio WHERE MATCH (title, abstract) AGAINST ('$searchString')");

So is there anyway that I can just compare 1 column with text entered? Do I have t make some sort of temporary table to do this? All the examples I have found show the select statement with 2 columns or if they use 1 coumn its because there is only 1 column in their table.

Any help would be appreciated!

TIA

Angelo

ps. sorry that this may be a bit off topic



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


Re: [PHP] File download by php header...

2003-07-21 Thread Scott Fletcher
> btw, also on the content-disposition, not only will some browsers not
> honor that, they will just use the name of the script as the 'save-as'
> filename.

That's okay with the 'save as' filename because no one know hte real
filename on the webserver because it is renamed when it is download anyway.

"Curt Zirzow" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> * Thus wrote Scott Fletcher ([EMAIL PROTECTED]):
> > Hi!
> >
> > I'm using PHP 4.3.2 and IIS 5.0.  I'm using the PHP header to
> > cause the webserver to download the file to the web browser.  Some
> > of the time it work and some of the other time, it doesnt.  I
> > haven't figured out why until I looked in the error log which
> > showed hte problem...   See two clipping below.
> >
> > --snip-- //Send Downloadable File(s) To Browsers...
> > $total=$DownloadUpdateArray[$_REQUEST['dw_code']][0]; header
> > ("Content-Type: application/octet-stream"); header ("Content-Length:
> > ".filesize($total)); header ("Content-Disposition: attachment;
> > filename=".$DownloadUpdateArray[$_REQUEST['dw_code']][1]);
> > readfile($total); --snip--
> >
> > --snip-- [21-Jul-2003 09:15:33] PHP Fatal error:  Maximum execution
> > time of 30 seconds exceeded in D:\<>\menu\tech_support.php
> > on line 47 --snip
> >
> > So, how does the php header("content-disposition:attachment;
> > filename='***'") cause the php timeout in the first place, what
> > seem to be the problem?
>
> It doesn't.  Your script is taking over 30 seconds to run you will need
> to find out why and where its taking to long or extend your time-out
> setting.
>
> btw, also on the content-disposition, not only will some browsers not
> honor that, they will just use the name of the script as the 'save-as'
> filename.
>
> Curt
> -- 
> "I used to think I was indecisive, but now I'm not so sure."



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



Re: [PHP] Register Globals

2003-07-21 Thread Curt Zirzow
* Thus wrote stfmoreau ([EMAIL PROTECTED]):
> Hi,
> 
> include this code in your header file :
>   // _GET
>   if (isset($_GET))
>   while (list($key, $val) = each($_GET))
>   {
>   eval ("$".$key." = '".$val."';");
>   }
>   // _POST
>   if (isset($_POST))
>   while (list($key, $val) = each($_POST))
>   {
>   eval ("$".$key." = '".$val."';");
>   }
>   // _SESSION
>   if (isset($_SESSION))
>   while (list($key, $val) = each($_SESSION))
>   {
>   eval ("$".$key." = '".$val."';");
>   }
> It may works (I have not expirimence it)

You can shorten it down a bit:
if (isset($_REQUEST) ) {
  foreach($_REQUEST as $key => $val) {
$$key = $val;
  }
}

I'm not sure if session is there but I know the $_REQUEST has all GET,
POST and COOKIE vars. Of course this isn't completely compatible with
how register_globals works.  There is GPC ordering of where to get the
variables from.

$GPC = "GPC"
for($i = 0; i < strlen($GPC); $i++) {
  switch($GPC{$i}) {
case 'G': $VAR = '_GET'; break;
case 'P': $VAR = '_POST'; break;
case 'C': $VAR = '_COOKIES'; break;
  }
  if (isset($$VAR) ) {
foreach($$VAR as $key => $val) {
  eval("global $$key"); //make it global if this is in a function
  $$key = $val; //set value
}
  }
}

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] a good PHP free forum?

2003-07-21 Thread Step Schwarz
> Hello friends.
> 
> Can someone suggest a very good and easy to customise forum?
> 
> Thanks
> Denis

No disrespect intended, but this question gets asked every week. For a
complete history just search the archives for "free php forum" -- take a
look at a thread like "[PHP] Need a forum" and it should tell you everything
you need to know: http://marc.theaimsgroup.com/?l=php-general

Good luck!, -Step


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



Re: [PHP] Passing Serialized Array via Hidden field

2003-07-21 Thread John Manko
Just a small point, you can have both GET and POST.

-- search.html -





- page.php 
$sid = $_GET['sid'];
session_id($sid);
session_start();
$search = $_POST['search'];

Also, for those who don't know, you can even reference hash links


Hope that helps.

Chris

=
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/
 



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


[PHP] need help with MySQL full text searching!!!!

2003-07-21 Thread Angelo Zanetti
Hi

I have a table which contains 3 fields (ID, Title, Abstract) the title and abstract 
fields have been fulltext indexes like this:

ALTER TABLE biblio ADD FULLTEXT (title,abstract);

that worked fine, however my problem is whenever I want to do a select statement only 
comparing 1 of the columns to inputted data ( in a Select statement):

$result = mysql_query("SELECT * FROM Biblio WHERE MATCH (title) AGAINST 
('$searchString')");

It gives me this error: Can't find FULLTEXT index matching the column list. It appears 
that i cant just compare a single fulltext indexed column if there are other fulltext 
indexed columns. When I try it with both columns then it works but I just want to 
compare 1 column. eg: 
$result = mysql_query("SELECT * FROM Biblio WHERE MATCH (title, abstract) AGAINST 
('$searchString')");

So is there anyway that I can just compare 1 column with text entered? Do I have t 
make some sort of temporary table to do this? All the examples I have found show the 
select statement with 2 columns or if they use 1 coumn its because there is only 1 
column in their table.

Any help would be appreciated!

TIA

Angelo

ps. sorry that this may be a bit off topic


RE: [PHP] a good PHP free forum?

2003-07-21 Thread Jonathan Villa
www.phpbb.com

-Original Message-
From: Denis L. Menezes [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 21, 2003 10:57 AM
To: [EMAIL PROTECTED]
Subject: [PHP] a good PHP free forum?

Hello friends.

Can someone suggest a very good and easy to customise forum?

Thanks
Denis



-- 
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] a good PHP free forum?

2003-07-21 Thread Dan Joseph
phpBB is pretty good.

-Dan Joseph

> -Original Message-
> From: Denis L. Menezes [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 21, 2003 11:57 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] a good PHP free forum?
> 
> 
> Hello friends.
> 
> Can someone suggest a very good and easy to customise forum?
> 
> Thanks
> Denis
> 
> 
> 
> -- 
> 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] need help with mysql union

2003-07-21 Thread r-militante
hi, i'm trying to select * through 3 tables - is the following syntax correct?

$sql="(SELECT * FROM mjp_cc)";
$sql="UNION";
$sql="(SELECT * FROM imc_cc)";
$sql="UNION";
$sql="(SELECT * FROM pmp_cc)";
$sql.=" ORDER BY savedccactivity DESC";

i basically just want to spit out the contents of these tables...

also - how would this type of query work if the name 'savedccactivity' is 
different in all 3 
tables?

thanks
redmond



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



[PHP] a good PHP free forum?

2003-07-21 Thread Denis L. Menezes
Hello friends.

Can someone suggest a very good and easy to customise forum?

Thanks
Denis



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



  1   2   >