[PHP] Parse exec output

2003-02-28 Thread Gregory Chagnon
If I exec a command like ifconfig, I'd like to be able to parse.  What is
the best way to go about thihs?  An example output from ifconfig is:

[EMAIL PROTECTED]:/var/log ifconfig
eth0  Link encap:Ethernet  HWaddr 00:C0:4F:AB:F9:59
  inet addr:192.168.1.200  Bcast:192.168.1.255  Mask:255.255.255.0
  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  RX packets:1286126 errors:0 dropped:0 overruns:0 frame:0
  TX packets:516928 errors:0 dropped:0 overruns:0 carrier:0
  collisions:16 txqueuelen:100
  RX bytes:377232323 (359.7 Mb)  TX bytes:111611502 (106.4 Mb)
  Interrupt:11 Base address:0xec80

ipsec0Link encap:Ethernet  HWaddr 00:C0:4F:AB:F9:59
  inet addr:192.168.1.200  Mask:255.255.255.0
  UP RUNNING NOARP  MTU:16260  Metric:1
  RX packets:0 errors:0 dropped:0 overruns:0 frame:0
  TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:10
  RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

loLink encap:Local Loopback
  inet addr:127.0.0.1  Mask:255.0.0.0
  UP LOOPBACK RUNNING  MTU:16436  Metric:1
  RX packets:137252 errors:0 dropped:0 overruns:0 frame:0
  TX packets:137252 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:0
  RX bytes:35151736 (33.5 Mb)  TX bytes:35151736 (33.5 Mb)



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



[PHP] multiple line text area

2003-02-26 Thread Gregory Chagnon
I need to be able to preserve line breaks when a user types in multiple
lines in a multitple line test area.  Right now if I echo $_POST['textarea']
I get everything on one line.  Is there any way to do this?  Thanks!
-Greg



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



[PHP] Re: multiple line text area

2003-02-26 Thread Gregory Chagnon
Make that a multitple line TEXT area, not a test area :)
-Greg

Gregory Chagnon [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I need to be able to preserve line breaks when a user types in multiple
 lines in a multitple line test area.  Right now if I echo
$_POST['textarea']
 I get everything on one line.  Is there any way to do this?  Thanks!
 -Greg





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



Re: [PHP] multiple line text area

2003-02-26 Thread Gregory Chagnon
That would work, only I need to copy this text to a file without the /br
in it.
-Greg


John W. Holmes [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
  I need to be able to preserve line breaks when a user types in
 multiple
  lines in a multitple line test area.  Right now if I echo
  $_POST['textarea']
  I get everything on one line.  Is there any way to do this?  Thanks!
  -Greg

 www.php.net/nl2br

 ---John W. Holmes...

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





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



Re: [PHP] multiple line text area

2003-02-26 Thread Gregory Chagnon
Thanks John, you're right
-Greg

John W. Holmes [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 The newlines are preserved. Do a view source of your page where you're
 displaying it and you'll see what I'm talking about. HTML just doesn't
 render newlines, only br. If you're seeing something different, then
 show your code and explain this more.

 ---John W. Holmes...

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

  -Original Message-
  From: Gregory Chagnon [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, February 26, 2003 11:19 PM
  To: [EMAIL PROTECTED]
  Subject: Re: [PHP] multiple line text area
 
  That would work, only I need to copy this text to a file without the
 /br
  in it.
  -Greg
 
 
  John W. Holmes [EMAIL PROTECTED] wrote in message
  news:[EMAIL PROTECTED]
I need to be able to preserve line breaks when a user types in
   multiple
lines in a multitple line test area.  Right now if I echo
$_POST['textarea']
I get everything on one line.  Is there any way to do this?
 Thanks!
-Greg
  
   www.php.net/nl2br
  
   ---John W. Holmes...
  
   PHP Architect - A monthly magazine for PHP Professionals. Get your
 copy
   today. http://www.phparch.com/
  
  
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php






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



[PHP] One more string question

2003-02-26 Thread Gregory Chagnon
When I submit a form with a text area containing the test //server/share
and try to echo the variable it echos server//share.  Is there any way
to prevent the extra /'s?  Thanks!
-Greg



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



Re: [PHP] Select multiple boxes

2003-01-18 Thread Gregory Chagnon
The problem is I have 2 seelect boxes...it's for creating a user and adding
them to a list of available groups...so I have one select box that is
initially empty called memberOf and another box that has all of the
available groups listed in it called availableGroups.  I have a script that
can move items back and forth and when the form is submitted I want to be
able to get all the items that are in the memberOf box..anyh ideas on how to
to this?  THanks.
-Greg


John W. Holmes [EMAIL PROTECTED] wrote in message
000501c2bf01$46464cc0$7c02a8c0@coconut">news:000501c2bf01$46464cc0$7c02a8c0@coconut...
  Is there any way to get all of the elements in a SELECT MULTIPLE box,
 not
  just the ones that are selected?  Thanks!

 No. You create the box, so you should know all of the possible values.

 ---John W. Holmes...

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





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




[PHP] Select multiple boxes

2003-01-17 Thread Gregory Chagnon
Hi-
Is there any way to get all of the elements in a SELECT MULTIPLE box, not
just the ones that are selected?  Thanks!
-Greg



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