[PHP] Navigation Problem

2001-04-28 Thread Subhrajyoti Moitra

Hi,
i want to make navigation links like the one given below
Top->Category1->SubCategory1->SubCategory1
 -    
This lies at the top of every page and indicates which category or subcategory the 
user is in. 

These are links. One way of doing it is to drill down by parentid and category id 
recursively. But this is not a very optimized method. It issues one query per category 
per user. 
Any alternatives for this in php?

Any pointers will be really helpful.

thanx for your coperation.
subhro


PS: This is not like the directory structure of yahoo.com. There u always have the 
directory information. 

_
Chat with your friends as soon as they come online. Get Rediff Bol at
http://bol.rediff.com





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Do You Like This Book?

2001-04-28 Thread Jeff Oien

Has anyone read this new book yet?

PHP and MySQL Web Development
by Luke Welling, Laura Thomson

http://www.amazon.com/exec/obidos/ASIN/0672317842/ref=ase_hotscrcomyourgui/1
07-0943347-2161363
Would be interested in hearing opinions.

Jeff Oien


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] STMP

2001-04-28 Thread Manesh

Can someone host my STMP server, or can i get a place to get one for free!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] tricky...seek in mysql result set based on text value?

2001-04-28 Thread andrew


hi, this one is stumping me!

assuming I return a mysql result set from an SQL query, with multiple 
rows of:

field1, field2, field3

is it possible to use something like mysql_data_seek, but set the 
pointer based on a specific text value of a field,
as opposed to specifying a row number?

cheers!
andrew

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] php sucks

2001-04-28 Thread Chris Fry

I guess the PHP Group has plenty of witnesses to support their case!

Chris

Jack Lauman wrote:

> After 25 years in the advertising business, I'd say the PHP Group has
> a hell of a good copyright infringement and defamation case here.
>
> The bums are in Manchester, England...
>
> Jack
>
> idban secandri wrote:
> >
> > i found this when surfing this morning
> > http://www.phpsucks.net/
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
Chris Fry
Quillsoft Pty Ltd
Specialists in Secure Internet Services and E-Commerce Solutions
10 Gray Street
Kogarah
NSW  2217
Australia

Phone: +61 2 9553 1691
Fax: +61 2 9553 1692
Mobile: 0419 414 323
eMail: [EMAIL PROTECTED]
http://www.quillsoft.com.au

You can download our Public CA Certificate from:-
https://ca.secureanywhere.com/htdocs/cacert.crt

**

This information contains confidential information intended only for
the use of the authorised recipient.  If you are not an authorised
recipient of this e-mail, please contact Quillsoft Pty Ltd by return
e-mail.
In this case, you should not read, print, re-transmit, store or act
in reliance on this e-mail or any attachments, and should destroy all
copies of them.
This e-mail and any attachments may also contain copyright material
belonging to Quillsoft Pty Ltd.
The views expressed in this e-mail or attachments are the views of
the author and not the views of Quillsoft Pty Ltd.
You should only deal with the material contained in this e-mail if
you are authorised to do so.

This notice should not be removed.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] php suck

2001-04-28 Thread Kath

I would doubt it if they are in America.  But they are in England so it is
questionable.  If they were in America, they are protected by parody laws.

AOL tried to shutdown www.aolsucks.com and lost.  I think the only thing
they were able to do is to stop them from using directly taken AOL
copyrights.

Besides, as someone said, it is humor.  And Jason said "Mockery is the
biggest form of flattery."

I don't think people are gonna goto phpsucks.net and seriously not use PHP
because of it.  I mean people still use AOL :/

- Kath


- Original Message -
From: "Jack Lauman" <[EMAIL PROTECTED]>
To: "idban secandri" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, April 28, 2001 10:15 PM
Subject: Re: [PHP] php suck


> After 25 years in the advertising business, I'd say the PHP Group has
> a hell of a good copyright infringement and defamation case here.
>
> The bums are in Manchester, England...
>
> Jack
>
> idban secandri wrote:
> >
> > i found this when surfing this morning
> > http://www.phpsucks.net/
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] php suck

2001-04-28 Thread Jack Lauman

After 25 years in the advertising business, I'd say the PHP Group has
a hell of a good copyright infringement and defamation case here.

The bums are in Manchester, England...

Jack

idban secandri wrote:
> 
> i found this when surfing this morning
> http://www.phpsucks.net/
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] phpsucks.com

2001-04-28 Thread Jason Lotito

> > i found this when surfing this morning
> > http://www.phpsucks.net/
> -Original Message-
> From: Daevid Vincent [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, April 28, 2001 5:53 PM
>
> someone has way too much time on their hands...
>
> what a dick.
>

Mockery is the biggest form of flattery.  haha..I just laughed and drove on.

Jason Lotito
www.NewbieNetwork.net
http://www.faqts.com/knowledge_base/view.phtml/aid/8720/fid/455 <- New to
the List, Read This



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] phpsucks.com

2001-04-28 Thread Daevid Vincent

someone has way too much time on their hands...

what a dick.

> -Original Message-
> From: idban secandri [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, April 29, 2001 3:54 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] php suck
> 
> 
> i found this when surfing this morning
> http://www.phpsucks.net/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] php suck

2001-04-28 Thread idban secandri

i found this when surfing this morning
http://www.phpsucks.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Content_Type is included in uploaded file!

2001-04-28 Thread Siamak Amirghodsi

Hello,

When I upload a file with php 4 and apache using the
call  move_upload_file(-,-);

the file gets uploaded, but the file ( which is just a text file ) at
the server side contains
some extra lines at the top :
   Content-Type: text/plain
   blankline
   blankline

Does anybody know how to suppress this?
This also happens with images!

Can anybodyhelp?

Thanks,
Siamak


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




php-general Digest 28 Apr 2001 23:01:02 -0000 Issue 655

2001-04-28 Thread php-general-digest-help


php-general Digest 28 Apr 2001 23:01:02 - Issue 655

Topics (messages 50747 through 50774):

Re: run du command uder php
50747 by: John Monfort

Re: Where is php.ini located by default?
50748 by: eschmid+sic.s.netic.de

Caching & Authentification
50749 by: Steve Haemelinck

Re: Links
50750 by: Taylor, Stewart

localhost with $REMOTE ADDR
50751 by: Johannes Rumpf

sorting filenames using opendir and readdir
50752 by: Johannes Rumpf
50753 by: Taylor, Stewart

PHP.INI
50754 by: Manesh
50755 by: Kath
50756 by: PHPBeginner.com

STMP
50757 by: Manesh

Secure authentication-Is this good?
50758 by: Scott

Re: Database
50759 by: Jason Lotito

Using the php_interbase.dll
50760 by: José León Serna

Why I can not make the PHP acitve?
50761 by: Xiaoshu Xu

grabbing variables from the query string
50762 by: Jamie Saunders
50765 by: PHPBeginner.com
50766 by: Philip Olson

mysql_connect() error
50763 by: Siim Einfeldt

OT, but dual-boot operating system question
50764 by: Chris Cocuzzo

variables within variables
50767 by: Robert Morrissey

PHP script that creates an SSL connection
50768 by: Tom Beidler

using zip from php4
50769 by: Shawn Reed

How do I call_user_func_array() on 4.0.1pl2 ?
50770 by: Jimmy Lantz
50771 by: Jimmy Lantz

integer checking problem from query string
50772 by: Jamie Saunders
50773 by: Philip Olson

Problems after reversing a guestbook
50774 by: Mogens Nielsen

Administrivia:

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

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

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


--





 you might want to consider add the html PRE tag, to preserve the output
format.


 Something like,

> exec ("du -ks /home/apache",$test[]);
 echo " $test[0] ";

 This will display the result in the browser, just as it does in the Unix
shell.



__John Monfort_
_+---+_
 P E P I E  D E S I G N S
   www.pepiedesigns.com
"The world is waiting, are you ready?"
-+___+-

On Sat, 28 Apr 2001, Mark Lo (3) wrote:

> Hi,
>
>  I would like to know how to run du command under PHP.
>
> is this correct ??
>
> exec ("du -ks /home/apache",$test[]);
> echo $test[0]; --> I would like to print out the result in web browser
>
> Thank you
>
> Mark
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>





On Sat, Apr 28, 2001 at 10:05:45AM +, yanto wrote:
> 
> i think the easiest way to see php setting is by running info.php script.
> if it's not on your webserver, just create one php file with content like
> this :
> ;

 

-Egon

-- 
LinuxTag, Stuttgart, Germany: July 5-8 2001: http://www.linuxtag.de/
All known books about PHP and related books: http://php.net/books.php 
Concert Band of the University of Hohenheim: http://www.concert-band.de/
First and second bestselling book in German: http://www.php-buch.de/




Hi all

I use sessions the authenticate users, but I seem to have a problem.
This is what happens:

1) A user logs in on PC one with his username and password. (So far so good)
2) Another user logs in with his details on the same computer --> He is
logged in with his details but the page displayed is the one of the other
user unless he refreshes the page.

I thought this was because the page might be cached, but when I set the
header("cache-control: no-cache") & the meta tag http-equiv="Expires"
content="-1" it still produces the same effect.
How can I solve this problem?

Haemelinck Steve

Personal:
Haemelinck.be - Developers Unite :)
Junior WebDeveloper
http://www.haemelinck.be:8080/
[EMAIL PROTECTED]

Work:
MCT IT Consulting - Take consulting 2 the next level
Junior IT Consultant
http://www.mct.be/
[EMAIL PROTECTED]



Haemelinck Steve

Personal:
Haemelinck.be - Developers Unite :)
Junior WebDeveloper
http://www.haemelinck.be:8080/
[EMAIL PROTECTED]

Work:
MCT IT Consulting - Take consulting 2 the next level
Junior IT Consultant
http://www.mct.be/
[EMAIL PROTECTED]






How about something like.

'start_page.php'
Some HTML...
display screen 1
display screen 2
More HTML...

'index.php'





-Original Message-
From: Ben Quinn [mailto:[EMAIL PROTECTED]]
Sent: 28 April 2001 11:57
To: [EMAIL PROTECTED]
Subject: [PHP] Links


Hi all,

I've been trying for many hours to find information on this, but not having
much luck.  What i want to do is have an index.php page, and then each link
on that page has a URL like index.php?linkidie.  index.php?links  etc

Can anyone point me

[PHP] Problems after reversing a guestbook

2001-04-28 Thread Mogens Nielsen

Hey there!

This is my absolutely first time posting in a newsgroup, so be nice please
; )
I've written a guestbook, and in an attempt to get the newest entries first
I reversed the guestbook-txt-file. Like so:
$tabell = file( "gjestebok.txt" );
$revtab = array_reverse( $tabell );

$antall = count( $revtab );

$i = 0;

if( !( $fil = fopen( "guestbook.txt", "r+" ) ) )
die();

while( $i < $antall )
{
  fwrite( $fil, "$revtab[$i]" );
  $i++;
}

fclose( $fil );

Now the problem: If I post a message with a line of text, a newline (as in
hitting the return-key), some more text and newlines, these
newline-separated text-lines show before the posting itself after reversing
because they are independent elements in the array.
How can I fix this


Mogens



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] integer checking problem from query string

2001-04-28 Thread Philip Olson


It's a string, not an integer.  Try using is_numeric() instead.  To see
what type it is, do this :

  echo gettype($phonenumber); // prints string

You may want to strip all non-numbers first, just in case they enter :

  333-333-

Something like :

  $phonenumber =  preg_replace('/[^0-9]/','',$phonenumber);

Btw, $string = '3'; // is a string.
 $number = 3;   // is an integer


regards,
philip


On Sat, 28 Apr 2001, Jamie Saunders wrote:

> 
> Hi,
> 
> I'm submitting a phone number from an HTML form to a PHP page that examines 
> it to see if it's an integer:
> 
> form.html:
> 
> 
> 
> 
> 
> 
> 
> validate.php:
> 
> 
>  
> $phonenumber = trim($phonenumber);
> 
> if (is_int($phonenumber)) {
>  echo "Integer";
> } else {
>  echo "Not Integer";
> }
> 
> ?>
> 
> 
> 
> 
> However, for some reason the script doesn't recognize the number as an 
> Integer - why is this and how can I remedy it?
> 
> 
> Jamie Saunders
> Mail: [EMAIL PROTECTED]
> Web: http://jamie-s.co.uk
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] integer checking problem from query string

2001-04-28 Thread Jamie Saunders


Hi,

I'm submitting a phone number from an HTML form to a PHP page that examines 
it to see if it's an integer:

form.html:







validate.php:







However, for some reason the script doesn't recognize the number as an 
Integer - why is this and how can I remedy it?


Jamie Saunders
Mail: [EMAIL PROTECTED]
Web: http://jamie-s.co.uk


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] How do I call_user_func_array() on 4.0.1pl2 ?

2001-04-28 Thread Jimmy Lantz

Hi, I wonder if there's a way to get the same result as with
call_user_func_array()
on 4.0.1pl2 .

I need to do the following :

foreach($formArray as $arrays){
 foreach($arrays as $key => $value){
 call_user_func_array($key, explode (",", $value)");
 //Not working since I have 4.01
 $key(explode (",", $value));
//This aint working either since explode returns an array, and I
need to return a list of vars to call. (different amount of vars each
time!)
 }
}

Is there another way to do this using a function or something, I cant
update since it's not my own server.
Thanx
Jimmy from Sweden


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] How do I call_user_func_array() on 4.0.1pl2 ?

2001-04-28 Thread Jimmy Lantz








  Hi, I wonder if there's a way to get the same result as with 
  call_user_func_array()on 4.0.1pl2 .
  I need to do the following :
   
  foreach($formArray as 
  $arrays){ 
  foreach($arrays as $key => 
  $value){ 
  call_user_func_array($key, explode (",", $value)"); 
   //Not working since I 
  have 4.01 $key(explode 
  (",", $value));     //This aint 
  working either since explode returns an array, and I need to return 
          //a list of vars to call. 
  (different amount of vars each time!) 
  }}
   
  Is there another way to do this using a function or something, I cant 
  update since it's not my own server.ThanxJimmy from 
  Sweden







_IncrediMail - Email has finally 
evolved - Click 
Here

[PHP] using zip from php4

2001-04-28 Thread Shawn Reed

Hello all,

I am attempting to write a script which will compress a group of files on my server 
into a zip file, and then set a password on the zip file.  The code below is what I 
have come up with:



Now, the problem is... the script finishes fine, and I get the "Zip file creation 
complete" message in my browser... but when I check /tmp, there is no test.zip file 
there.  Any ideas as to why?

Any help you can offer would be appreciated.

Sincerely,
Shawn Reed
Chief Technology Officer
RBC Incorporated - home of "Remote Backup Center"
[ [EMAIL PROTECTED] / www.remotebackupcenter.com ]


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP script that creates an SSL connection

2001-04-28 Thread Tom Beidler

Can you create an SSL connection directly through PHP? I'm trying to
integrate a form with a payment processing center, Authorize.net and I'm
running into a problem.

The documentation for what they call ADC Direct Response requires a secure
socket which I wrongfully assumed to mean posting from a secure page to
their secure server. It seems that the secure socket must be handled
directly from the script and not by the end user submitting a form.

Here's what I received from their tech support.

"The problem is that you can't send an HTML form POST when using Direct
Response.  You must write a script that creates an SSL connection directly
with our server (port 443) and send the information to us through that
connection.  I do not know if this is possible through PHP but usually this
is done with PERL, CGI, or ColdFusion.  If you are not familiar with
creating direct SSL connections and would like to send the transaction
information in an HTML form POST, then you should use the Relay-Response
method instead.  Please refer to the Developer's guide for more information:

https://secure.authorize.net/docs

Thank you for contacting tech support."

Any input or direction greatly appreciated.

Tom

>>.>>.>>>.>.>.
Tom Beidler
Orbit Tech Services
805.682.8972 (phone)
805.682.5833 (fax)
[EMAIL PROTECTED]
http://www.orbittechservices.com/
>>.>>.>>>.>.>.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] variables within variables

2001-04-28 Thread Robert Morrissey

Hi,

 I have a form on one page with a text box called 'emailtext'. This gets
passed to a php script that gets info from a database (such as $name,
$email, etc) and mails selected email addresses; my problem is this:

Say, the form passes $emailtext as "Hello $name, how're you?", and this is
passed to mail() in the php form, rather than emailing "Hello Bob, how're
you?" it prints "$name" literally.

Seeing as $name isn't pulled from the database till the php script is it
possible to get it to print the value? or do I have to pull $name from the
database  in the original form? (which'll is going to be a lot more
complicated).

Does this make sense?

Thanks for any help,

Robert Morrissey



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] grabbing variables from the query string

2001-04-28 Thread Philip Olson

if register_globals setting is on (in php.ini) then $foo will be 
available, otherwise use the predefined variable HTTP_GET_VARS :

  index.php?foo=blah

  print $foo;
  print $HTTP_GET_VARS['foo'];

  
  http://www.php.net/manual/en/language.variables.predefined.php
  http://www.php.net/manual/en/configuration.php#ini.register-globals

btw, you'll note predefined variable QUERY_STRING exists in there too :-)

regards,
philip


On Sat, 28 Apr 2001, Jamie Saunders wrote:

> Hi,
> 
> How do you grab variables from a query string in a URL?
> I've used this with ASP and it would be done as follows:
> 
> firstName = request.querystring("fName")
> 
> I've tried different variations of this in my PHP pages but I can't seem to 
> get it to work.  I've looked in the PHP manual but can't find any 
> information relating to the query string.
> 
> Thanks.
> 
> Jamie Saunders
> Mail: [EMAIL PROTECTED]
> Web: http://jamie-s.co.uk
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] grabbing variables from the query string

2001-04-28 Thread PHPBeginner.com


try:
echo $fName;

they are loaded in the page automatically.

or..

loop HTTP_GET_VAR



Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-Original Message-
From: Jamie Saunders [mailto:[EMAIL PROTECTED]]
Sent: Sunday, April 29, 2001 1:00 AM
To: [EMAIL PROTECTED]
Subject: [PHP] grabbing variables from the query string


Hi,

How do you grab variables from a query string in a URL?
I've used this with ASP and it would be done as follows:

firstName = request.querystring("fName")

I've tried different variations of this in my PHP pages but I can't seem to
get it to work.  I've looked in the PHP manual but can't find any
information relating to the query string.

Thanks.

Jamie Saunders
Mail: [EMAIL PROTECTED]
Web: http://jamie-s.co.uk


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP]OT, but dual-boot operating system question

2001-04-28 Thread Chris Cocuzzo

Hey,

completely OT i know...

In a few months when I put together for college, I'm considering doing a
dual-boot type system, with some windows OS, and also a unix OS. However, I
don't know that much about any free unix OS' that are out there. The two I
can think of to use would be Solaris and Linux. Can anyone give me some
advice on which to use, and also if possible point me to a site where I can
get information on doing this type of thing?

Chris


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] mysql_connect() error

2001-04-28 Thread Siim Einfeldt

I get this kind of error when trying to connect to mysql - 
http://myhost/~myname/baas.php

What migth be the problem? The error exists on all accounts.

PS: Drop a line to my private email as well



[PHP] grabbing variables from the query string

2001-04-28 Thread Jamie Saunders

Hi,

How do you grab variables from a query string in a URL?
I've used this with ASP and it would be done as follows:

firstName = request.querystring("fName")

I've tried different variations of this in my PHP pages but I can't seem to 
get it to work.  I've looked in the PHP manual but can't find any 
information relating to the query string.

Thanks.

Jamie Saunders
Mail: [EMAIL PROTECTED]
Web: http://jamie-s.co.uk


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Why I can not make the PHP acitve?

2001-04-28 Thread Xiaoshu Xu

I have install my apache_1.3.17 with php-4.0.4 as the following the steps
but I can not make the php active. 

First I have download apache_1.3.17.tar.gz and php-4.0.4.tar.gz to the same directory.
1  gunzip apache_1.3.17.tar.gz
2  tar xvf apache_1.3.17.tar
3  gunzip php-4.0.4.tar.gz
4  tar xvf php-4.0.4.tar
5  cd apache_1.3.17
6  ./configure --prefix=/www
7  cd ../php-4.0.4
8  ./configure --with-mysql --with-apache=../apache_1.3.17 --enable-track-vars
9  make
10 make install
11  cd ../apache_1.3.17
12  ./configure --prefix=/www --active-module=src/modules/php4/libphp4.a
13 make
14  make install
15  cd ../php-4.0.4
16  cp php.ini-dist /usr/local/lib/php3.ini
17  then i have added 
AddType application/x-httpd-php .php
to my httpd.conf
18  start my apache

the apache works but the php still unactive

pls, do me favor to tell me why 
thanks a lot


---


Xiaoshu Xu
FocusTech Shanghai Office
Phone:(86 21)50541368 Fax:(86 21)50541369
www.focuschina.com
www.Made-in-China.com
[EMAIL PROTECTED]




[PHP] Using the php_interbase.dll

2001-04-28 Thread José León Serna

Hello:
I'm relatively new to php and I want to use Interbase instead of MySQL.
I have found a problem loading the module php_interbase.dll , because it
always shows me an error

Unable to load dynamic library 'c:/php/extensions/php_interbase.dll'

I have modified the extension_dir in the php.ini with foreslashes instead of
backslashes, I have searched over the web, in php.net, in the forums, in the
news, and I have only found questions about this, but any solution. The
question is:

How can I load the php_interbase.dll module in W2K Professional, using IIS
5.0 and the latest version of PHP?

Best Regards.

-
ebnoud.com, El Boletín No Oficial de Usuarios de Delphi
http://www.ebnoud.com
VCLCrawler.com, your VCL search engine
http://www.vclcrawler.com




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Database

2001-04-28 Thread Jason Lotito

I suggest reading this:

http://www.newbienetwork.net/sections.php?op=viewarticle&artid=10

Jason Lotito
www.NewbieNetwork.net



> -Original Message-
> From: Manesh [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 27, 2001 8:24 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Database
> 
> 
> How do i make table, just a simple one called  sympoll_auth
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Secure authentication-Is this good?

2001-04-28 Thread Scott

Can anyone tell me if this example would be considered a secure method for
authentication using sessions. The login page is a form to validate the user
and begin the session. The second bit of code is at the top of every page to
authenticate the user. I can't figure out if this is the best way.
Thanks

login page:
---
if($action=="validate"){ // Form submitted so check userid and password
against database
$query="SELECT memberid,name,lastname from members WHERE userid =
'$userid' and password = '$password'";
$result=mysql($database,$query);
$rows=mysql_num_rows($result);
if ($rows == 0){
$err_no=100; // bad userid or password
header("Location:login.php?err_no=$err_no");
exit();
}else{ // Input validated issue session id
$rs=mysql_fetch_array($result);
$name=$rs["name"];
$lastnamename=$rs["lastname"];
$memberid=$rs["memberid"];
session_register("name");
session_register("lastname");
session_register("memberid");
header("Location:mem_welcome.php");
exit();
}
}

if ($err_no==100){
$login_header="User ID or Password do not match";
}else if ($err_no==200){
$login_header="Please Log In Again";
}else {
$login_header="Please Log In";
}

Print out the login form here
http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] STMP

2001-04-28 Thread Manesh

can someone gimme step by step direction on setting up a STMP server? i have
IIS5

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PHP.INI

2001-04-28 Thread PHPBeginner.com

Computer?

wow!

no, just restart your apache (whatever system you use)


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-Original Message-
From: Manesh [mailto:[EMAIL PROTECTED]]
Sent: Saturday, April 28, 2001 9:56 PM
To: Taylor, Stewart; 'Johannes Rumpf'; [EMAIL PROTECTED]
Subject: [PHP] PHP.INI


Do u have to resart ur comp after you change ur PHP.INI

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP.INI

2001-04-28 Thread Kath

Not with Linux, in my experience at least.

- Kath

- Original Message -
From: "Manesh" <[EMAIL PROTECTED]>
To: "Taylor, Stewart" <[EMAIL PROTECTED]>; "'Johannes
Rumpf'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, April 28, 2001 8:56 AM
Subject: [PHP] PHP.INI


> Do u have to resart ur comp after you change ur PHP.INI
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP.INI

2001-04-28 Thread Manesh

Do u have to resart ur comp after you change ur PHP.INI

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] sorting filenames using opendir and readdir

2001-04-28 Thread Taylor, Stewart

Read them into an array then sort the array.


while more files
{
  get file name
  $arrFilenames[] = $filename;
  $arrFilenames = array_sort($arrFilenames);
}

The above sorts the array each time a file is read as you requested, 
however its more efficient to read them all in then sort

while more files
{
   get file name
   $arrFilenames[] = $filename;
}

$arrFilenames = array_sort($arrFilenames);

-Stewart;
 

-Original Message-
From: Johannes Rumpf [mailto:[EMAIL PROTECTED]]
Sent: 28 April 2001 13:43
To: [EMAIL PROTECTED]
Subject: [PHP] sorting filenames using opendir and readdir


Hi!
I wanted to get a txt files in a dircetory, I wrote the script using 
opendir and readdir functions. But now I would like to sort the files 
while I read them in. how could I solve this problem?
Greetings,
  Johannes Rumpf


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] sorting filenames using opendir and readdir

2001-04-28 Thread Johannes Rumpf

Hi!
I wanted to get a txt files in a dircetory, I wrote the script using 
opendir and readdir functions. But now I would like to sort the files 
while I read them in. how could I solve this problem?
Greetings,
  Johannes Rumpf


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] localhost with $REMOTE ADDR

2001-04-28 Thread Johannes Rumpf

Hi!
I'm writting a PHP script which has to print the IP address of a 
visitor, I'm using the variable $REMOTE_ADDR. I've seen it working on 
other servers, but for me it doesn't work, if I visit the script I 
allways get ip 127.0.0.1 and localhost as a name. The script is on a 
webserver, not on my PC. Thanxalot,
Greetings,
 Johannes Rumpf


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Links

2001-04-28 Thread Taylor, Stewart

How about something like.

'start_page.php'
Some HTML...
display screen 1
display screen 2
More HTML...

'index.php'





-Original Message-
From: Ben Quinn [mailto:[EMAIL PROTECTED]]
Sent: 28 April 2001 11:57
To: [EMAIL PROTECTED]
Subject: [PHP] Links


Hi all,

I've been trying for many hours to find information on this, but not having
much luck.  What i want to do is have an index.php page, and then each link
on that page has a URL like index.php?linkidie.  index.php?links  etc

Can anyone point me in the right direction?




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Caching & Authentification

2001-04-28 Thread Steve Haemelinck

Hi all

I use sessions the authenticate users, but I seem to have a problem.
This is what happens:

1) A user logs in on PC one with his username and password. (So far so good)
2) Another user logs in with his details on the same computer --> He is
logged in with his details but the page displayed is the one of the other
user unless he refreshes the page.

I thought this was because the page might be cached, but when I set the
header("cache-control: no-cache") & the meta tag http-equiv="Expires"
content="-1" it still produces the same effect.
How can I solve this problem?

Haemelinck Steve

Personal:
Haemelinck.be - Developers Unite :)
Junior WebDeveloper
http://www.haemelinck.be:8080/
[EMAIL PROTECTED]

Work:
MCT IT Consulting - Take consulting 2 the next level
Junior IT Consultant
http://www.mct.be/
[EMAIL PROTECTED]



Haemelinck Steve

Personal:
Haemelinck.be - Developers Unite :)
Junior WebDeveloper
http://www.haemelinck.be:8080/
[EMAIL PROTECTED]

Work:
MCT IT Consulting - Take consulting 2 the next level
Junior IT Consultant
http://www.mct.be/
[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: Where is php.ini located by default?

2001-04-28 Thread eschmid+sic

On Sat, Apr 28, 2001 at 10:05:45AM +, yanto wrote:
> 
> i think the easiest way to see php setting is by running info.php script.
> if it's not on your webserver, just create one php file with content like
> this :
> ;

 

-Egon

-- 
LinuxTag, Stuttgart, Germany: July 5-8 2001: http://www.linuxtag.de/
All known books about PHP and related books: http://php.net/books.php 
Concert Band of the University of Hohenheim: http://www.concert-band.de/
First and second bestselling book in German: http://www.php-buch.de/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] run du command uder php

2001-04-28 Thread John Monfort



 you might want to consider add the html PRE tag, to preserve the output
format.


 Something like,

> exec ("du -ks /home/apache",$test[]);
 echo " $test[0] ";

 This will display the result in the browser, just as it does in the Unix
shell.



__John Monfort_
_+---+_
 P E P I E  D E S I G N S
   www.pepiedesigns.com
"The world is waiting, are you ready?"
-+___+-

On Sat, 28 Apr 2001, Mark Lo (3) wrote:

> Hi,
>
>  I would like to know how to run du command under PHP.
>
> is this correct ??
>
> exec ("du -ks /home/apache",$test[]);
> echo $test[0]; --> I would like to print out the result in web browser
>
> Thank you
>
> Mark
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




php-general Digest 28 Apr 2001 10:54:53 -0000 Issue 654

2001-04-28 Thread php-general-digest-help


php-general Digest 28 Apr 2001 10:54:53 - Issue 654

Topics (messages 50704 through 50746):

Re: online site builder
50704 by: Godd

Strange Question - Please Read This
50705 by: Chris Anderson
50709 by: Zak Greant

Why is this?
50706 by: Manesh

Re: line break part2
50707 by: Dddogbruce \(.home.com\)

[NEWBIE]  :P
50708 by: Dddogbruce \(.home.com\)
50726 by: PHPBeginner.com

include whole directories?
50710 by: andrew
50714 by: Erica Douglass

undefined symbol:  SSL_CTX_set_rsa_callback
50711 by: j2n tech
50732 by: Dean Hall

Re: PHP Book?
50712 by: Chris Anderson
50723 by: Martin Skjöldebrand
50742 by: Christian Reiniger

Re: Can I install Lihnux on My Windows 95 machine ?
50713 by: Valter Santos

Find and Replace script: Content Stripper; recursive subdirectories; ereg_replace, 
preg_replace
50715 by: Erica Douglass

count() problem :D
50716 by: Chris Schneck
50724 by: Chris Adams
50729 by: Joe Sheble \(Wizaerd\)

Database
50717 by: Manesh

phpwebsite
50718 by: Manesh
50719 by: Brian Clark

tester needed for phpMyMultiBackup
50720 by: idban secandri

Where is php.ini located by default?
50721 by: Martin Skjöldebrand
50722 by: idban secandri
50725 by: PHPBeginner.com
50727 by: Chris Fry
50728 by: PHPBeginner.com
50730 by: Erica Douglass
50731 by: Martin Skjöldebrand
50735 by: idban secandri
50740 by: Steven Haryanto
50743 by: yanto

dynamically adding rows to same form.
50733 by: Rahul Bhide

Re: columns
50734 by: Adrian D'Costa

bd access
50736 by: Sandro Spadaro

run du command uder php
50737 by: Mark Lo \(3\)
50738 by: idban secandri

can someone debug this vote.php script for me?
50739 by: Joe Truong

Please review our coding standards
50741 by: Steven Haryanto

Newbie question - adding vars
50744 by: Jamie Saunders
50745 by: Alexander Wagner

Links
50746 by: Ben Quinn

Administrivia:

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

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

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


--



Well I am working on just such a project now. Mine is a bit more complex
than just the simple page. I am working on actually building a site that
allows you to build a dynamic site. So you will be able to make tables in a
database and use these tables to build query and tables and all sorts of
things that will create the site. The hard part for me right now is adding
all the tags so that they can format the page and insert images and all that
stuff. but it is coming along. I started to build this because I have not
found any tool out there that does that as yet.




""kaab kaoutar"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi all!
> Is using php the right technology with which i can create an online site
> builder! i mean i want to enable users to create their own sites
> in few minutes by choosing one model of the ones proposed, the colors, etc
u
> know like these site builders sites?
> if not do u thnik there are specific tools i may use to fullfill these? or
i
> have to do it from scrach using jsp or java ?
> Thanks  a lot
>
> _
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Does anyone know how to place code into every file accessed on my server? Kindof like 
how geocities and countless other hosts manage to add their banners?

Chris Anderson   aka "Null"

PHP Developer / Nulltech
PHP-GTK Tester / gtk.php.net
STA Administrator / www.stronger.org
DOD Co-Owner / www.dayofdefeat.com





Set the auto_append_file or auto_prepend_file in the php.ini file.
See http://www.php.net/manual/en/configuration.php for more details

--zak


- Original Message -
From: "Chris Anderson" <[EMAIL PROTECTED]>
To: "PHP" <[EMAIL PROTECTED]>
Sent: Friday, April 27, 2001 11:50 AM
Subject: [PHP] Strange Question - Please Read This


Does anyone know how to place code into every file accessed on my server?
Kindof like how geocities and countless other hosts manage to add their
banners?

Chris Anderson   aka "Null"

PHP Developer / Nulltech
PHP-GTK Tester / gtk.php.net
STA Administrator / www.stronger.org
DOD Co-Owner / www.dayofdefeat.com







CGI Error
The specified CGI applica

[PHP] Links

2001-04-28 Thread Ben Quinn

Hi all,

I've been trying for many hours to find information on this, but not having
much luck.  What i want to do is have an index.php page, and then each link
on that page has a URL like index.php?linkidie.  index.php?links  etc

Can anyone point me in the right direction?




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Newbie question - adding vars

2001-04-28 Thread Alexander Wagner

Jamie Saunders wrote:
> How do you add text vars together e.g.
>
> $varone = "hello";
> $vartwo = "world";
>
> $varthree = ($varone, $vartwo);

$varthree = $varone . $vartwo;
although
$varthree = $varone . ' ' . $vartwo;
might be more appropriate.

regards
Wagner

-- 
"In place of infinity we usually put some really big number, like 15."
 - Anonymous Computer Science professor

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Newbie question - adding vars

2001-04-28 Thread Jamie Saunders


Hi,

How do you add text vars together e.g.

$varone = "hello";
$vartwo = "world";

$varthree = ($varone, $vartwo);

Obviously the above example doesn't work so can someone tell me how to do this?

Thanks


Jamie Saunders
Mail: [EMAIL PROTECTED]
Web: http://jamie-s.co.uk


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Where is php.ini located by default?

2001-04-28 Thread yanto


i think the easiest way to see php setting is by running info.php script.
if it's not on your webserver, just create one php file with content like
this :
;


-toto-


idban secandri writes:

> On Saturday 28 April 2001 01:23, you wrote:
> > It's /usr/local/lib/php.ini
> 
> 
> NEW: Unix install paths changed
> Please note that the PHP 4.0.5 release will have a new set of installation 
> paths for any Unix-like operating systems. 
> The default php.in path is now "/usr/local/etc" (previously "/usr/local/lib") 
>  PEAR will be placed in "/usr/local/share/php/pear" (previously  
> "/usr/local/lib/php")  shared extensions can be found in"/usr/local/lib/php" 
> 
> http://www.zend.com/zend/week/week34.php
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: SV: [PHP] PHP Book?

2001-04-28 Thread Christian Reiniger

On Saturday 28 April 2001 00:36, [EMAIL PROTECTED] wrote:

> > > > IO 340 pages function references (copied from the manual) [2]
> > >
> > > That is wrong. Leon havent copied 340 pages from the manual. I
> > > should know this myself because I have finished the translation
> > > into German.
> >
> > Ok, I guess you're right. sorry. What I wanted to express is that the
> > same information is in the online manual.
>
> That is also wrong.


Ok, I again stand corrected.  The reference in the book contains 
additional examples and explanatory texts. Sorry Leon, sorry Egon.
So here's a rephrased version of what I wanted to express with my 
original mail:
 The book is targeted at people completely new to PHP and relatively new 
to programming as such, and thus it is IMO next to useless for someone 
with "3 years Perl experience" (which is what this thread originally was 
about). Again, I can only speak about the first edition - if you say the 
second Ed has changed in this regard that's great.

> > > Please read books more carefully and don't pester this mailing list
> > > with your nonsense comments. I mean that book with a foreword by
> > > Andi Gutmans.
> >
> > Well, you just said "Core PHP Programming" and I described that book.
> > But you're right in that I know nothing about the second edition.
>
> I haven't start this thread. So be carefull. I have Leons second
> edition and you can buy another book at Markt+Technik. The PHP manual
> is for free use. Use that if you are not comfortable with Leons book.
>
> It is not very good to judge some books on this list. I know some
> authors who contribute to the PHP manual and write own books.

Well, someone recommended that book, and I tried pointing out that IMO 
that book is the wrong choice for that particular person.
I apologize for putting down the book as something generally bad (that 
wasn't intended), but I don't apologize for having an opinion and telling 
others about it.
This list is a *good* place for book reviews, because (1) reviews help 
(future) readers to choose the right book for them and (2) because bad 
reviews (such as mine) can be easily corrected (as you did) here.

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

Very funny, Scotty! Now beam up my clothes...

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Please review our coding standards

2001-04-28 Thread Steven Haryanto

Dear folks,

I am composing a coding standards for our team. Bottom line, we are
using PEAR, object-oriented programming, extreme programming, and
PHPDoc. Below is the draft so far. I'd greatly appreciate it if
anybody care to give inputs on the document. Nevertheless, I hope
this could be useful to some.

Thank you.

Regards,
Steve


STYLE GUIDE FOR PHP DEVELOPERS
==

$Id$


0. General
--

Understand these points and you are halfway there already.

0.1 We are writing PHP4 application here, not PHP3, nor Perl, Python, etc.
 So use PHP idioms.

0.2 We use the PEAR convention, except: 1) the tests in tests/ are written
 using unit test as much as possible. 2) preferred error reporting is
 slightly different. See 8.2 Reporting error.

0.3 Consistency matters.

0.4 Standards is important.

0.5 Readability matters. Especially since the code will be touched by
 several developers.


1. Formatting
-

1.0 Enclosing PHP code

 Always use .

1.1 Indentation

 Preferred indentation is using Tab (interpreted at 4 spaces).

1.2 Text width

 If possible, do not write long lines exceeding 79 columns. But this is
 not a strict requirement. In many cases it is much more convenient or
 vertically readable to put things in one line. So do that instead.

1.3 Curly brace placement

 This style:

   if (...) {
   ...
   }

 is more preferred than:

   if (...)
   {
   ...
   }

1.4 Whitespaces

 - No whitespace after function or method name. Example:

 exit()

   not

 exit ()

 $obj->method()

   not

 $obj->method ()

 - Generally, no whitespace inside the enclosing parenthesis, unless it
   enhances readability. Examples:

 ucfirst($str)

   not

 ucfirst( $str )

 - No whitespace between = in default argument definition.

 function f($a, $b=1, $c='')

   not

 function f($a, $b = 1, $c = '')

 - Add whitespace between assignment.

 $a = 1;

   not

 $a=1;

 - Whitespace in expressions are usually not necessary. But use them when
   they enhance readability.

 $a = $b + $c*(5*time());

1.5 Function names

 Function names are not case sensitive in PHP. Use the all-lowercase
 notation.

1.6 Quotes

 Use whichever ones you like. But if you can use '' for simple strings,
 and "" only if you need interpolation.

 Avoid backslashism! Use ' to quote ", use " to quote '. You can also
 utilize PHP4's here-documents.

   print <

Re: [PHP] Where is php.ini located by default?

2001-04-28 Thread Steven Haryanto

btw, i found that the configure option:

  --with-config-file-path=PATH

is slightly misleading, as "PATH" to usually refers to a file
location. moreoever, php does not report if it fails to read
a php.ini. perhaps the text should be rewritten as:

  --with-config-file-path=DIR

Steve


At 4/28/2001 11:37 AM, Martin =?ISO-8859-4?Q?Skj=F6ldebrand?= wrote:
>I've built php from a tarball. Now I need to specify a special include path
>in the php.ini file. But I can't find it. There is a php.in-dist in the
>build catalog but I can't find a production php.ini anywhere.
>The docs says that it should be in the install catalogue (which is where?,
>/usr/local/lib/php doesn't have one) or the cwd. I've tried editing the
>sample file and putting it in either place but my app still gives me the
>following error:
>
>Failed opening required 'class.DBI' (include_path='.:/usr/local/lib/php')
>in FILENAME
>
>Martin S.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] can someone debug this vote.php script for me?

2001-04-28 Thread Joe Truong

can some one debug this script for me... it say's "Warning: Undefined
variable: total in PHP_poll.php on line 63"

thanxz alot!!!



http://www.ftls.org/php/ *


***/

// Necessary Variables:

$RESULT_FILE_NAME = "poll_data.txt";

// En: Absolute path and name to file contain poll data.

$QUESTION = "How do you like this Script?";

// En: Question Text.

$ANSWER = array("Love it!", "Like it!", "Its okay..", "I dislike it", "I
hate it..");

// En: All answer.

$IMG_DIR_URL = "./vote";

// En: URL Directory of poll graphs.

$REVOTE_TIME = 3600;

// En: Time (second) after people can revote, use cookies.

// End Necessary Variables section

/***
***/

if (!isset($vote) && !isset($result)) {

echo "\n";

echo "\n";

echo "$QUESTION\n";

while (list($key, $val) = each($ANSWER)) {

echo " $val\n";

}

echo "\n";

echo " \n";

echo "";

} else {

$file_array = file($RESULT_FILE_NAME); // or error("Can not open
\$RESULT_FILE_NAME");

// En: Save result

if ($answer < count($ANSWER) && $vote) {

if (count($file_array) < count($ANSWER)) {

$file_array = array("0\n", "0\n", "0\n", "0\n", "0\n", "0\n", "0\n", "0\n",
"0\n", "0\n");

}

$old_answer = $file_array[$answer];

$old_answer = preg_replace("/\n\r*/", "", $old_answer);

$file_array[$answer] = ($old_answer + 1)."\n";

$file = join('', $file_array);

$fp = fopen("$RESULT_FILE_NAME", "w"); //or error("Can not write
\$RESULT_FILE_NAME");

flock($fp, 1);

fputs($fp, $file);

flock($fp, 3);

fclose($fp);

}

// En: Display result

while (list($key, $val) = each($file_array)) {

$total += $val;

}

echo "PHP Poll vote results :";

echo "";

echo "WhatPercentageVotes";

while (list($key, $val) = each($ANSWER)) {

$percent = $file_array[$key] * 100 / $total;

$percent_int = floor($percent);

$percent_float = number_format($percent, 1);

$fp += $percent_float;

echo " $ANSWER[$key] ";

echo "";

echo " $percent_float %
";

echo "$file_array[$key]";

}

echo "";

}

?>




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] run du command uder php

2001-04-28 Thread idban secandri

On Saturday 28 April 2001 04:56, you wrote:
> Hi,
>
>  I would like to know how to run du command under PHP.
>
> is this correct ??
>
> exec ("du -ks /home/apache",$test[]);
> echo $test[0]; --> I would like to print out the result in web browser
>
> Thank you
>
> Mark

u can use backtick, exec(), system(), passthru()
make sure you read manual first before choosing the right one
ie;
result:\n";
  $result = system($ps);
?>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] run du command uder php

2001-04-28 Thread Mark Lo \(3\)

Hi,

 I would like to know how to run du command under PHP.

is this correct ??

exec ("du -ks /home/apache",$test[]);
echo $test[0]; --> I would like to print out the result in web browser

Thank you

Mark


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] bd access

2001-04-28 Thread Sandro Spadaro

Hi!

does anybody of you know like effect a connection to a db access, without use the 
ODBC? 


 Thank you



Re: [PHP] Where is php.ini located by default?

2001-04-28 Thread idban secandri

On Saturday 28 April 2001 01:23, you wrote:
> It's /usr/local/lib/php.ini


NEW: Unix install paths changed
Please note that the PHP 4.0.5 release will have a new set of installation 
paths for any Unix-like operating systems. 
The default php.in path is now "/usr/local/etc" (previously "/usr/local/lib") 
 PEAR will be placed in "/usr/local/share/php/pear" (previously  
"/usr/local/lib/php")  shared extensions can be found in"/usr/local/lib/php" 

http://www.zend.com/zend/week/week34.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: columns

2001-04-28 Thread Adrian D'Costa

On Sat, 28 Apr 2001, Adrian D'Costa wrote:

> hi,
> 
> I have listed the code below.  I have the below table:
> | id   | int(11) |  | PRI | | auto_increment |
> | operator | varchar(30) |  | | ||
> | email| varchar(35) | YES  | | ||
> | url  | varchar(50) | YES  | | ||
> 
> I want the operator field to be listed out in four columns and each row to
> have alternate colours.  I am able to get it to come out in four columns
> but not the color.  Where am I wrong?
> 
>  require("common.php");
> require 'functions.php';
> 
> $searchStmt = "select * from toperator order by operator" ;
> 
> 
> // connect to the db
> 
> if (!($link = mysql_pconnect($db_server, $db_login, $db_passwd))){
>DisplayErrMsg(sprintf("internal error %d:%s\n",
>   mysql_errno(), mysql_error()));
>exit() ;
> }
> 
> // Selct the db
> 
> if (!mysql_select_db($db, $link)) {
>DisplayErrMsg(sprintf("Error in selecting %s db", $db)) ;
>DisplayErrMsg(sprintf("error:%d %s", mysql_error($link),
> mysql_error($link))) ;
>exit();
> }
> // Execute the Statement
> if (!($result = mysql_query($searchStmt, $link))) {
>DisplayErrMsg(sprintf("Error in executing %s stmt", $searchStmt));
>DisplayErrMsg(sprintf("error:%d %s", mysql_errno($link),
> mysql_error($link)));
>exit();
> }
> 
> $num = mysql_numrows($result);
> include("header.php");
> ?>
> 
> 
> 
> 
>  $i=0;
> $t=0;
> $count=0;
> echo $cfgBgcolorOne;
> echo $cfgBgcolorTwo;
> $bgcolor = $cfgBgcolorOne;
> 
> echo("");
> while($row=mysql_fetch_object($result)) {
> $i % 2  ? 0: $bgcolor = $cfgBgcolorTwo;
> $i++;
> 
> 
> if($count % 4==0) {
> echo("");
> echo("");
> echo $bgcolor;
> }
> 
> $count++;
> ?>
>$row->operator;?>
>  if($count % 4==0) {
> echo("");
> }
> }
> 
> ?>
> 
> 
> while($row=mysql_fetch_object($result)) {
> $i % 2  ? 0: $bgcolor = $cfgBgcolorTwo;
> $i++;
> 
> 
> if($count % 4==0) {
> echo("");
> echo("");
> echo $bgcolor;
> }
> 
> $count++;
> ?>
>$row->operator;?>
>  if($count % 4==0) {
> echo("");
> }
> }
> 
> ?>
> 
> 
>  include("footer.php");
> ?>
> 
> TIA
> 
> Adrian
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]