[PHP] How to handle multiple lines in PHP?

2001-01-16 Thread david klein

I have a textarea in one php page to allow user to leave message. How ever, 
if the user input(three lines):

123
456
567

after I get it through some php scripts, and put it into database, later on, 
I try to display it, but it becomes(only one line):

123 456 789

Does anyone know how to handle this? One idea is to convert the  to "" before putting it into the database, but how can we detect 
the  in PHP?   Or is there any other ways?

Thank you very much in advance.




_
Get your FREE download of MSN Explorer at http://explorer.msn.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] Thanks for all -- Re: [PHP] How to handle multiple lines in PHP?

2001-01-16 Thread david klein

Hi, it works now! Thank everyone very much for the great help, especially 
Atom and others who helped me out.

Have a wonderful day!

Best Regards,
David

>From: <[EMAIL PROTECTED]>
>To: david klein <[EMAIL PROTECTED]>
>Subject: Re: [PHP] How to handle multiple lines in PHP?
>Date: Tue, 16 Jan 2001 17:07:01 +0100 (CET)
>
>Hello David!
>
> > Atom,
> >
> > Thank you very much for the help.
> > I am using MySql, actually, in the database, there is no "\n".  I
> > debugged it a little bit more, and found the followings:
> > It seems that PHP took the three lines as one line (I think it can't
> > recognize "\n" from the textarea input, and convert it automatically 
>into  a
> > space char.
>Ok. I understand your problem. I created a Forum program, where I use this
>HTML tag as .
>
>Solution:
>$szoveg contains your line from DB
>
>123 456 789
>
>$szoveg=ereg_replace("\n","",$szoveg);
>
>Result is
>
>123
>456
>789
>
>:-)
>
>bye,
>
>Atom
>
>
>
>
>
> > More idea?
> > Thanks again for helping me!
> > David
> >
> >
> > >From: <[EMAIL PROTECTED]>
> > >To: david klein <[EMAIL PROTECTED]>
> > >Subject: Re: [PHP] How to handle multiple lines in PHP?
> > >Date: Tue, 16 Jan 2001 16:47:33 +0100 (CET)
> > >
> > > > after I get it through some php scripts, and put it into database, 
>later
> > >on,
> > > > I try to display it, but it becomes(only one line):
> > > >
> > > > 123 456 789
> > > >
> > > > Does anyone know how to handle this? One idea is to convert the OF
> > >LINE
> > > > CHAR> to "" before putting it into the database, but how can we
> > >detect
> > > > the  in PHP?   Or is there any other ways?
> > >When you take it from database change \n to  etc...
> > >
> > >Atom
> > >
> >
> > _
> > Get your FREE download of MSN Explorer at http://explorer.msn.com
> >
>

_
Get your FREE download of MSN Explorer at http://explorer.msn.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] How to get userID/password from the browser session

2001-01-18 Thread david klein

In Apache authentication, userID/password are stored in browser session, and 
every time, these information will be sent back to the Apache server and do 
the authentication.

My question is: can we get the userID/password from the browser session, 
especially in PHP?

Thank you very much in advance.

David
_
Get your FREE download of MSN Explorer at http://explorer.msn.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] How to get userID/password from the browser session

2001-01-18 Thread david klein


It works!  Great!  Thank you very much for the great help!

Regards,
David

>From: Ignacio Vazquez-Abrams <[EMAIL PROTECTED]>
>To: david klein <[EMAIL PROTECTED]>
>Subject: Re: [PHP] How to get userID/password from the browser session
>Date: Thu, 18 Jan 2001 18:38:34 -0500 (EST)
>
>On Thu, 18 Jan 2001, david klein wrote:
>
> >
> > Ignacio,
> >
> >   Thank you very much!
> >   The UserID works, but I couldn't get the password ( I used
> > print($HTTP_SERVER_VARS["PHP_AUTH_PASSWD"])  ), it is empty.
> > Any suggestion?  BTW, what does IIRC mean?
> >
> > Regards,
> > David
> >
>
>Whoops, I meant PHP_AUTH_PW. I need to get some more sleep tonight :)
>
>IIRC means If I Remember Correctly.
>
>--
>Ignacio Vazquez-Abrams  <[EMAIL PROTECTED]>
>

_
Get your FREE download of MSN Explorer at http://explorer.msn.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] upload files from the local PC/UNIX to the web sever

2001-01-22 Thread david klein

Hello, Is there a way to upload files from the local PC/UNIX to the web 
sever? Especially multiple files at the same time?  What we need to do at 
the server and client side?

Thank you very much in advance.

Best Regards,

David


_
Get your FREE download of MSN Explorer at http://explorer.msn.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] How does PHP accept multiple selection

2001-01-23 Thread david klein

Hello,

I have some codes like:
  
   Page 1
   Page 2
   Page 3
  
  

If I selected item 1 and item 3 both, how can I get my multiple selection in 
the PHP codes? (it seems to me it always give me the last selection only).

Thank you very much in advance.

Regards,
David
_
Get your FREE download of MSN Explorer at http://explorer.msn.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] How does PHP accept multiple selection

2001-01-23 Thread david klein


Shawn,

   Tested, it works now. Thanks a bunch!

Best Regards,
David

>From: Shawn Blaylock <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: david klein <[EMAIL PROTECTED]>
>CC: [EMAIL PROTECTED]
>Subject: Re: [PHP] How does PHP accept multiple selection
>Date: Tue, 23 Jan 2001 13:51:08 -0800
>
>It stores it in a 2D array. There's info on it on the FAQ.
>here's the URL:
>http://www.php.net/FAQ.php#7.14
>
>
>david klein wrote:
> >
> > Hello,
> >
> > I have some codes like:
> >   
> >Page 1
> >Page 2
> >Page 3
> >   
> >   
> >
> > If I selected item 1 and item 3 both, how can I get my multiple 
>selection in
> > the PHP codes? (it seems to me it always give me the last selection 
>only).
> >
> > Thank you very much in advance.
> >
> > Regards,
> > David
> > _
> > Get your FREE download of MSN Explorer at http://explorer.msn.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]
>
>--
>
>Shawn Blaylock, ClipperNet Software Engineer
>[EMAIL PROTECTED]
>http://www.clipper.net/
>Eugene OR  541-431-3360 x406
>Toll Free  866-673-6260 x406
>
>--
>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]
>

_
Get your FREE download of MSN Explorer at http://explorer.msn.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] can't upload files if extension has more than one dot.

2001-01-25 Thread david klein

Hello!

I am trying to upload the files to the sever. For files that has only one 
dot such as abc.txt and 123.doc, it works fine. But when uploading files 
that have more than one dot such as 123.txt.pdf, there's problem, and I 
tried to echo the $userfile[i], and it is "none". Codes are attached as 
following:


 
   
   
   
   
   
   




Thank you very much in advance.
_
Get your FREE download of MSN Explorer at http://explorer.msn.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] can't upload files with more than one dot in the file name.

2001-01-26 Thread david klein

Hello!

I am trying to upload the files to the sever. For files that has only one
dot such as abc.txt and 123.doc, it works fine. But when uploading files
that have more than one dot such as 123.txt.pdf, there's problem, and I
tried to echo the $userfile[i], and it is "none". Codes are attached as
following:



  
  
  
  
  
  
   



Thank you very much in advance.

_
Get your FREE download of MSN Explorer at http://explorer.msn.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] Resize the pop-up window

2001-01-29 Thread david klein

Hello, I know this question is out of PHP, but I'll very appreciate if some 
guru here could help me out.

I have a link, which will pop up a new window, but the problem is: I don't 
know how to resize the new popped-up window.

My code is like this:

 intel connection 


Thank you very much in advance.

David
_
Get your FREE download of MSN Explorer at http://explorer.msn.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] Resize the pop-up window

2001-01-29 Thread david klein

Joe,

Got it! Thank you very much. Now the codes are like this:


Re: [PHP] AUTH_PW & External Authentication

2001-01-29 Thread david klein

I don't think it is easy to steal the password by using PHP_AUTH_PW.  
PHP_AUTH_PW is cached in the browser, if you exit the browser, nobody can 
steal it. If the other people is using a different browser, there is no way 
for him to steal it even if he is accessing the same URL.

Just my understanding.

David


>From: Chen Shiyuan <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: [PHP] AUTH_PW & External Authentication
>Date: Fri, 26 Jan 2001 23:50:17 +0800 (SGT)
>
>Hello everyone!
>
>I am currently using Apache-1.3.14 with php-4.0.4pl1 compiled statically
>into it and running on RedHat Linux 6.2 . Apache is configured to do
>authentication for certain URLs via a auth_ldap module which is
>dynamically loaded when Apache starts.
>
>I noticed that when I access the protected URL, PHP_AUTH_PW will give me
>the password for the user who is currently logged to the protected site.
>If I recall correctly, earlier versions of PHP4 and PHP3 didn't have
>this "feature" .
>
>This "feature" creates a problem when the protected URL is shared by
>many parties with each party providing it's own services under the
>protected URL as any party would be able to "steal" the
>username/password without the end user knowing. The username/password is
>used to control who has access to the protected URL and the parties are
>not required to make use of the password.
>
>Is there anyway to disable this "feature" or is the disclosure of the
>password a bug?
>
>Many thanks for any advice!
>
>--
>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]
>

_
Get your FREE download of MSN Explorer at http://explorer.msn.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] Automate the apache authentication process

2001-01-29 Thread david klein

I am using apache authentication. The problem is: I want the user to be able 
to get registered throught the web GUI, and all the users' password and 
userID will be kept in the database. In my mind, I can use php later to get 
all these userID/password, and run the apache htpasswd to register these 
users.

However, Apache htpasswd is an interactive program and we need manually 
input the password, is there a way to automate and batch process this using 
php scripts?

Thanks,
David


_
Get your FREE download of MSN Explorer at http://explorer.msn.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] Symbolic link fails when User Authentication comes in

2001-01-31 Thread david klein

I am using Apache user authentication, and it works fine. However, if there 
is a symbolic link inside a securied directory, the symbolic linked file 
will deny any access.

For example, directory "/apps/apache/docs/test1" is a securied directory, 
and there is a symbolic linked file "file1.txt", after you logged into 
directory "/apps/apache/docs/test1" and try to access "file1.txt", you will 
be denied for the access?

Does anyone have any idea?

Thanks,
David
_
Get your FREE download of MSN Explorer at http://explorer.msn.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] Symbolic link fails when User Authentication comes in

2001-01-31 Thread david klein

Johnny,

It works, but how could this create a security hole? Could you please 
expalin a little bit more?

Thanks,
David


>From: "johnny p." <[EMAIL PROTECTED]>
>To: "david klein" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
>Subject: RE: [PHP] Symbolic link fails when User Authentication comes in
>Date: Wed, 31 Jan 2001 13:54:22 -0600
>
>Add the FollowSymLinks to your httpd.conf file for that directory.  I
>don't recommend doing this, tho, since it *is* a security hole.
>
>
>Options Indexes FollowSymLinks
>
>
>johnny p.
>
> > -Original Message-
> > From: david klein [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, January 31, 2001 1:43 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] Symbolic link fails when User Authentication comes in
> >
> >
> > I am using Apache user authentication, and it works fine.
> > However, if there
> > is a symbolic link inside a securied directory, the symbolic
> > linked file
> > will deny any access.
> >
> > For example, directory "/apps/apache/docs/test1" is a
> > securied directory,
> > and there is a symbolic linked file "file1.txt", after you
> > logged into
> > directory "/apps/apache/docs/test1" and try to access
> > "file1.txt", you will
> > be denied for the access?
> >
> > Does anyone have any idea?
> >
> > Thanks,
> > David
> > _
> > Get your FREE download of MSN Explorer at http://explorer.msn.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 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]
>

_
Get your FREE download of MSN Explorer at http://explorer.msn.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] .htpasswd?

2001-01-31 Thread david klein


Yes, you can, just write a script to call "htpasswd -b yourUserFile userID 
passwd".

:)
David

>From: James Smith <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED], [EMAIL PROTECTED]
>Subject: [PHP] .htpasswd?
>Date: Wed, 31 Jan 2001 13:21:35 -0800 (PST)
>
>Is there a way that when a user signs up for a
>user/pass on a site, to automatically update the
>.htpasswd on the site?  Right now I'm running a Win2k
>Pro, with Apache installed and MySQL/PHP.
>
>Thanks,
>
>James
>
>__
>Get personalized email addresses from Yahoo! Mail - only $35
>a year!  http://personal.mail.yahoo.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]
>

_
Get your FREE download of MSN Explorer at http://explorer.msn.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] how to specify the sender email address in the mail() function?

2001-02-02 Thread david klein

It seems that mail($recipient, $subject, $content) has no place to specify 
the sender's email address. Does anyone know how to specify the sender's 
email address?

Thanks,
David
_
Get your FREE download of MSN Explorer at http://explorer.msn.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] Is there a way to call php functions in perl? and vice versa

2001-02-06 Thread david klein

Is there a way to call php functions in perl? or call perl functions from 
PHP codes?

Thanks,
David
_
Get your FREE download of MSN Explorer at http://explorer.msn.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]