Re: [PHP] again: IIS vs Apache

2003-03-26 Thread Daniel Guerrier
The the LAMP platform is supposed to more stable but 
If it ain't broke why fix it?

--- [EMAIL PROTECTED] wrote:
 Hi, I'm new here. I imagine that this question was
 made a lot of times in this 
 list, but reading the archive i couldnt find a
 recently answer to this 
 question: 
 
I want to convince my new lab partners (and
 director) to migrate our PHP 
 site (over 1000 hits a day) to Apache/Linux. Could
 you give me some actual 
 arguments or site to tell them? Is the Apache PHP
 module really better  than 
 the isapi module for IIS. 
 
 thanks in advance. Matts
 
 
 
 -
 This mail sent through IMP:
 http://mail.info.unlp.edu.ar/
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


__
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

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



Re: [PHP] Again, and Again, and AGAIN!

2002-03-20 Thread Mike Gohlke

Are you hitting enter while in one of the fields or clicking the submit 
button.  I've seen versions of IE that would not set the submit button 
if enter was used.  Personally, I would check for isset($username)  
isset($password).

Mike...

(Sorry for the very late reply, etc.  I've been dealing with a screwy 
server for the past few days:(

Jason Wong wrote:

On Sunday 17 March 2002 13:14, Jason Wong wrote:


You're using 4.1.1, $HTTP_POST_VARS{} has been replaced by $_POST[] (see
changelog/history/php.ini for details).



Sorry a typo:

$HTTP_POST_VARS[] has been replaced by $_POST[]







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




Re: [PHP] Again, and Again, and AGAIN!

2002-03-20 Thread Dr. Shim

That's fine. I already got it going (somebody helped me). Thanks for that
tip anyhow.

Mike Gohlke [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Are you hitting enter while in one of the fields or clicking the submit
button.  I've seen versions of IE that would not set the submit button
if enter was used.  Personally, I would check for isset($username) 
isset($password).

Mike...

(Sorry for the very late reply, etc.  I've been dealing with a screwy
server for the past few days:(

Jason Wong wrote:

On Sunday 17 March 2002 13:14, Jason Wong wrote:


You're using 4.1.1, $HTTP_POST_VARS{} has been replaced by $_POST[] (see
changelog/history/php.ini for details).



Sorry a typo:

$HTTP_POST_VARS[] has been replaced by $_POST[]









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




Re: [PHP] Again, and Again, and AGAIN!

2002-03-16 Thread Mike Gohlke

Dr. Shim wrote:

I've tried repediately to have a PHP script validate a form when the form is
submitted. I'm quite new to PHP, and I'd really appreciate the help anybody
could give me. I've been stuck on this problem far to long.

I have a form (here's the code):

form method=post action=?php $PHP_SELF; ?
  Username:
  input type=text name=username maxlength=255 value=?
$HTTP_POST_VARS['username']; ?

The shortcut is ?php =$blah?, not ?php $blah?

  br
  Password:
  input type=text name=password maxlength=8 value=?
$HTTP_POST_VARS['password']; ?
  br
  input type=submit name=login value=Log In
onclick=document.refresh()

document.submit() should do it, refresh() will just reload the page.

  br
  br
/form

And right underneath the form code, I have my PHP script:

?php
 if (isset($login)) {
  insert();
 }

 function insert() {
  $db = odbc_connect('mydatabase', 'myusername', 'mypassword');

  if(!$db) {
   echo An error has occured. Please a
href=\mailto:[EMAIL PROTECTED]\;e-mail/a the text below to
me.brbr~~~br$PHP_ERRORbr$dbbr~~~;
  }

  $SQLQuery = SELECT fldID FROM tblUsers WHERE fldUsername = '$username'
AND fldPassword = '$password';
  $cursor = odbc_exec($db, $SQLQuery);

  if (!$cursor) {
   echo An error has occured. Please a
href=\mailto:[EMAIL PROTECTED]\;e-mail/a the text below to
me.brbrbr . odbc_errormsg($db) . br~~~;
  }
 }
   ?

What I'm trying to achieve here is that when the user fills out the form,
presses the Log In button, the script underneath validates and inserts the
data into a database.  Now, I click on the Log In button, nothing happens.

Could anybody please help me with this? I would really, really appreciat any
help.








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




Re: [PHP] Again, and Again, and AGAIN!

2002-03-16 Thread Dr. Shim

I've changed

form method=post action=?php $PHP_SELF; ?

To

form method=post action=?php =$PHP_SELF; ?

And I get a parse error. Could you possibly help me correct this? (I'm a
newbie, so have pity on me. =)



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




Re: [PHP] Again, and Again, and AGAIN!

2002-03-16 Thread Jason Wong

On Sunday 17 March 2002 11:46, Dr. Shim wrote:
 I've changed

 form method=post action=?php $PHP_SELF; ?

 To

 form method=post action=?php =$PHP_SELF; ?


 And I get a parse error. Could you possibly help me correct this? (I'm a
 newbie, so have pity on me. =)


Use:

  form method=post action=?php echo $PHP_SELF; ?


Also, please use a descriptive subject heading next time!


-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
Paul's Law:
You can't fall off the floor.
*/

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




Re: [PHP] Again, and Again, and AGAIN!

2002-03-16 Thread Dr. Shim

Sorry about the subject heading.

I've put in

form method=post action=?php echo $PHP_SELF; ?

But still when I click on the Log In button, thing happens.



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




Re: [PHP] Again, and Again, and AGAIN!

2002-03-16 Thread Dr. Shim

Oh, by the way, the if...then claus runs successfully, but the function
never is called. Am I wrong?




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




Re: [PHP] Again, and Again, and AGAIN!

2002-03-16 Thread Jason Wong

On Sunday 17 March 2002 12:04, Dr. Shim wrote:
 Sorry about the subject heading.

 I've put in

 form method=post action=?php echo $PHP_SELF; ?

 But still when I click on the Log In button, thing happens.

Please post the rest of your code and also which version of PHP you're using.


-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
Your lover will never wish to leave you.
*/

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




Re: [PHP] Again, and Again, and AGAIN!

2002-03-16 Thread Dr. Shim

I'm using PHP 4.1.1 (for Windows). Here is *all* of my code.

html
head
titleAdministrative Log-In Page/title
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
/head

body bgcolor=#FF
Please enter your username and password below in the fields below.
form method=post action=?php echo $PHP_SELF; ?
  Username:
  input type=text name=username maxlength=255 value=?php echo
$HTTP_POST_VARS['username']; ?
  br
  Password:
  input type=text name=password maxlength=8 value=? echo
$HTTP_POST_VARS['password']; ?
  br
  input type=submit name=login value=Log In
  br
  br
/form
  ?php
 if (isset($login)) {
  insert();
  echo $login;
 }

 function insert() {
  $db = odbc_connect('IdentDatabase', 'root', '');

  if(!$db) {
   echo An error has occured. Please a
href=\mailto:[EMAIL PROTECTED]\;e-mail/a the text below to
me.brbr~~~br$PHP_ERRORbr$dbbr~~~;
  }

  $SQLQuery = SELECT fldID FROM tblUsers WHERE fldUsername = '$username'
AND fldPassword = '$password';
  $cursor = odbc_exec($db, $SQLQuery);

  if (!$cursor) {
   echo An error has occured. Please a
href=\mailto:[EMAIL PROTECTED]\;e-mail/a the text below to
me.brbrbr . odbc_errormsg($db) . br~~~;
  }
 }
   ?
/body
/html



Jason Wong [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
On Sunday 17 March 2002 12:04, Dr. Shim wrote:
 Sorry about the subject heading.

 I've put in

 form method=post action=?php echo $PHP_SELF; ?

 But still when I click on the Log In button, thing happens.

Please post the rest of your code and also which version of PHP you're
using.


--
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
Your lover will never wish to leave you.
*/



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




Re: [PHP] Again, and Again, and AGAIN!

2002-03-16 Thread pong-TC

[EMAIL PROTECTED] writes:
I'm using PHP 4.1.1 (for Windows). Here is *all* of my code.

html
head
titleAdministrative Log-In Page/title
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
/head

body bgcolor=#FF
Please enter your username and password below in the fields below.
form method=post action=?php echo $PHP_SELF; ?
  Username:
  input type=text name=username maxlength=255 value=?php echo
$HTTP_POST_VARS['username']; ?
  br
  Password:
  input type=text name=password maxlength=8 value=? echo
$HTTP_POST_VARS['password']; ?
  br
  input type=submit name=login value=Log In
  br
  br
/form

Hello Jason

If I were you, I would not use $HTTP_POST_VARS.. YOur form element like
this input type=text name=password maxlength=8 is good enough.  I
don't think you need this value=? echo
$HTTP_POST_VARS['password']; ?.   Also, make sure that echo $PHP_SELF
is output the form name or just put the form name directly.  Anything else
is fine.  Your isset condition should be provoked once clicked,  and call
the insert function.  It is very simple from my opinion.  I use PHP on IIS
also.

Hope, this would help.
Pong

  ?php
 if (isset($login)) {
  insert();
  echo $login;
 }

 function insert() {
  $db = odbc_connect('IdentDatabase', 'root', '');

  if(!$db) {
   echo An error has occured. Please a
href=\mailto:[EMAIL PROTECTED]\;e-mail/a the text below to
me.brbr~~~br$PHP_ERRORbr$dbbr~~~;
  }

  $SQLQuery = SELECT fldID FROM tblUsers WHERE fldUsername = '$username'
AND fldPassword = '$password';
  $cursor = odbc_exec($db, $SQLQuery);

  if (!$cursor) {
   echo An error has occured. Please a
href=\mailto:[EMAIL PROTECTED]\;e-mail/a the text below to
me.brbrbr . odbc_errormsg($db) . br~~~;
  }
 }
   ?
/body
/html




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




Re: [PHP] Again, and Again, and AGAIN!

2002-03-16 Thread Jason Wong

On Sunday 17 March 2002 12:12, Dr. Shim wrote:

 I'm using PHP 4.1.1 (for Windows). Here is *all* of my code.

 html
 head
 titleAdministrative Log-In Page/title
 meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
 /head

 body bgcolor=#FF
 Please enter your username and password below in the fields below.
 form method=post action=?php echo $PHP_SELF; ?
   Username:
   input type=text name=username maxlength=255 value=?php echo
 $HTTP_POST_VARS['username']; ?

You're using 4.1.1, $HTTP_POST_VARS{} has been replaced by $_POST[] (see 
changelog/history/php.ini for details).

   br
   Password:
   input type=text name=password maxlength=8 value=? echo
 $HTTP_POST_VARS['password']; ?
   br
   input type=submit name=login value=Log In
   br
   br
 /form
   ?php
  if (isset($login)) {
   insert();
   echo $login;
  }

  function insert() {
   $db = odbc_connect('IdentDatabase', 'root', '');

   if(!$db) {
echo An error has occured. Please a
 href=\mailto:[EMAIL PROTECTED]\;e-mail/a the text below to
 me.brbr~~~br$PHP_ERRORbr$dbbr~~~;
   }

   $SQLQuery = SELECT fldID FROM tblUsers WHERE fldUsername = '$username'
 AND fldPassword = '$password';

If register_globals is not ON, then $username  $password will not have been 
defined. You have to reference them as $_POST['username']. But as you're 
referencing an array from inside a double-quoted string then just 
$_POST[username] will do:

  $SQLQuery = SELECT fldID FROM tblUsers 
WHERE fldUsername = '$_POST[$username]'
  AND fldPassword = '$_POST[$password]';


-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
You'd like to do it instantaneously, but that's too slow.
*/

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




Re: [PHP] Again, and Again, and AGAIN!

2002-03-16 Thread Jason Wong

On Sunday 17 March 2002 13:14, Jason Wong wrote:


 You're using 4.1.1, $HTTP_POST_VARS{} has been replaced by $_POST[] (see
 changelog/history/php.ini for details).


Sorry a typo:

$HTTP_POST_VARS[] has been replaced by $_POST[]


-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
What's done to children, they will do to society.
*/

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




Re: [PHP] Again Session

2002-03-08 Thread Erik Price


On Friday, March 8, 2002, at 01:15  PM, Sven Jacobs wrote:

 Hey

 I have 2 values stored in my session, how do I pull them back out ?


$_SESSION['name_of_first_value']
$_SESSION['name_of_second_value']

in PHP 4.1 or greater.

And hay is for horses.



Erik





Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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




Re: [PHP] (again)Writing new lines in txt- files?=)

2002-01-23 Thread Alexander Skwar

So sprach »Mårten Andersson« am 2002-01-23 um 19:27:04 + :
 hello again! =)
 
 I.m using fwrite() to write to the file. What I want is a new row i a 
 textdocument after each strung I insert..
 
 I've been told that \n should be the solution to the problem whith new 
 rows i a text-document. But I am not sure that's want I wanted... =) I'll 
 try to be more specific.. I want to write a new row in a text document, the 
 meaning whith that is that I want to create a logfile. And It would be 
 mutch easier to read it if each row is a new hit to the site.
 When I inserted \n in the end of the string, it didn't created a new row 
 in the text file. It only created a new row when I printed out the file. 
 But I want a new row IN the textfile.. =)
 =) I hope I didn't complicate this matter too mutch whith my bad english.. 
 =)

Uhm, so you want:

Line 1
Line 2
Line 3

Is that correct?  If it is, then \n is your answer - if you're on a Unix
system, or if you're using a text editor which understands unix line
endings.  If you're on a Mac, you should use \r instead.  And if you're
so unlucky to use Windows, you've got to use \r\n.

This means, $s=Line 1\r\nLine 2\r\nLine 3\r\n; will fill the variable
$s with a string which consists of 3 lines when printed on a Windows
system.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  | Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 8 days 22 hours 0 minutes

--
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] Again (still?) problems with php and ldaps

2001-12-06 Thread Stig Venaas

On Thu, Dec 06, 2001 at 12:08:12PM +0100, Susanne Benkert wrote:
 After recompiling my Php with the newest LDAP-Libraries and Openssl
 ldap_connect(ldap://hostname;) works. But I still have problems with
 ldap_connect(ldaps://hostname): 

Could you check whether ldapsearch -H ldaps://hostname works? PHP
should work if and only if this works. As hostname you should use
the same as the CN in the certificate, probably the FQDN (full
hostname and domain).

 What did I wrong? Does Php need its own Key/Certificate (as client
 certificate)? Or is something wrong with my server certificate of Ldap?
 (But I can't imagine, because other actions like ldapsearch already seem
 to work with TLS.) 

Did you also try with -H ldaps:// and the same hostname? Client
certificate is only needed if you put TLSVerifyClient 1 in
slapd.conf on the server.

 Has anything should be change in the configuration of php when using it
 with SSL and Openldap?

No.

I suggest you try to get ldapsearch -H ldaps://host/ to work first.
If it doesn't work (and you don't get more answers here), please ask
on the OpenLDAP lists. If you get ldapsearch -H to work, but not PHP,
then this is the place to ask or submit a report at bugs.php.net. I'm
pretty sure ldapsearch -H will give the same error though.

I see now that you did mail the OpenLDAP list as well. I think that
is the right place, but there is a danger people there will think
it's a PHP problem. If you don't get answers there, test with
ldapsearch -H, and if that fails, post that on the OpenLDAP list as
well, since in that case PHP isn't involved.

I could try to provide more help if necessary, but I'll be mostly
available for over a week now, so I hope some others will offer
help as well.

Don't give up,

Stig

-- 
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] again

2001-08-03 Thread Richard Lynch

Then you'll need to do an ftp_cd or something to go down in that
sub-directory and do ftp_nlist again, I think...

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: Eduardo Kokubo [EMAIL PROTECTED]
Newsgroups: php.general
To: Miles Thompson [EMAIL PROTECTED];
[EMAIL PROTECTED]
Cc: Eduardo Kokubo [EMAIL PROTECTED]
Sent: Friday, August 03, 2001 9:35 AM
Subject: Re: [PHP] again


 I'm trying to it using PHP. I tried to use ftp_nlist to know the names of
 the files and transfer them, but I think I need more than just the names
and
 locations of the files. Besides, I have to transfer the name of the
 subdirectory too.

  Eduardo,
 
  Are you trying to do this in PHP or interactively? If with PHP I won't
be
  much help, as the I've not used its FTP functions. Otherwise it's a
  straightforward FTP operation.
 
  There may be a problem doing it from within PHP as the webserver is
  probably running as nobody, who usually, and properly, has zilch for
  permissions.
 
  Not much help - Miles
 
  At 10:11 AM 8/3/01 -0300, Eduardo Kokubo wrote:
  I'm still trying to transfer a directory form one server to another but
  with no results.
  I have the username and password of the ftp account source and I know
 I'll
  have to ask for the username and password of the destination. I can't
  simply upload or copy the directory, but there must have an alternative
  way. I know I have been asking a lot of questions and I already asked
 this
  one, but I'm new with php and we can't learn everything from books,
so...
 
 
  --
  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] again

2001-08-03 Thread Miles Thompson

Eduardo,

Are you trying to do this in PHP or interactively? If with PHP I won't be 
much help, as the I've not used its FTP functions. Otherwise it's a 
straightforward FTP operation.

There may be a problem doing it from within PHP as the webserver is 
probably running as nobody, who usually, and properly, has zilch for 
permissions.

Not much help - Miles

At 10:11 AM 8/3/01 -0300, Eduardo Kokubo wrote:
I'm still trying to transfer a directory form one server to another but 
with no results.
I have the username and password of the ftp account source and I know I'll 
have to ask for the username and password of the destination. I can't 
simply upload or copy the directory, but there must have an alternative 
way. I know I have been asking a lot of questions and I already asked this 
one, but I'm new with php and we can't learn everything from books, so...


-- 
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] again with the regex

2001-05-15 Thread Johnson, Kirk

Jerry, try sprintf(). Here's an example:

sprintf((%s) %s-%s, substr($GLOBALS[appPhoneHome], 0,
3),substr($GLOBALS[appPhoneHome], 3, 3),substr($GLOBALS[appPhoneHome],
6, 4))

Kirk

 -Original Message-
 From: Jerry Lake [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 15, 2001 4:48 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] again with the regex
 
 
 I hate to keep asking regex stuff,
 but it is really evasive for me..
 I'm pulling phone numbers out of a DB
 in the format of 1234567890, I would
 like to format them like (123) 456-7890
 or something else that at least breaks them 
 up a bit.
 
 any help is appreciated,
 Thanks,
 
 Jerry Lake
 Interface Engineering Technician
 Europa Communications - http://www.europa.com
 Pacifier Online   - http://www.pacifier.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]




RE: [PHP] again with the regex

2001-05-15 Thread scott [gts]

well, if all numbers are *always* 10 digits long,
use this

$old = 1234567890;

$new = preg_match('/(\d{3})(\d{3})(\d{4})/', $old, $matches);

print (. $matches[1] .) . $matches[2] .-. $matches[3];

prints (123) 456-7890



 -Original Message-
 From: Jerry Lake [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 15, 2001 6:48 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] again with the regex
 
 
 I hate to keep asking regex stuff,
 but it is really evasive for me..
 I'm pulling phone numbers out of a DB
 in the format of 1234567890, I would
 like to format them like (123) 456-7890
 or something else that at least breaks them 
 up a bit.
 
 any help is appreciated,
 Thanks,
 
 Jerry Lake
 Interface Engineering Technician
 Europa Communications - http://www.europa.com
 Pacifier Online   - http://www.pacifier.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]




RE: [PHP] again with the regex

2001-05-15 Thread Jack Dempsey

if they all have the same format, then you can do this (don't need regexs)
$number = '1234567890';
$formatted_number = '(' . substr($number,0,3) . ') ' . substr($number,3,3) .
'-' . substr($number,6);

-jack


-Original Message-
From: Jerry Lake [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 15, 2001 6:48 PM
To: [EMAIL PROTECTED]
Subject: [PHP] again with the regex


I hate to keep asking regex stuff,
but it is really evasive for me..
I'm pulling phone numbers out of a DB
in the format of 1234567890, I would
like to format them like (123) 456-7890
or something else that at least breaks them
up a bit.

any help is appreciated,
Thanks,

Jerry Lake
Interface Engineering Technician
Europa Communications - http://www.europa.com
Pacifier Online - http://www.pacifier.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]




RE: [PHP] again with the regex

2001-05-15 Thread Jerry Lake

Thanks folks, much better now.

Jerry Lake 
Interface Engineering Technician
Europa Communications - http://www.europa.com
Pacifier Online - http://www.pacifier.com


-Original Message-
From: Johnson, Kirk [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 15, 2001 3:52 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] again with the regex


Jerry, try sprintf(). Here's an example:

sprintf((%s) %s-%s, substr($GLOBALS[appPhoneHome], 0,
3),substr($GLOBALS[appPhoneHome], 3, 3),substr($GLOBALS[appPhoneHome],
6, 4))

Kirk

 -Original Message-
 From: Jerry Lake [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 15, 2001 4:48 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] again with the regex
 
 
 I hate to keep asking regex stuff,
 but it is really evasive for me..
 I'm pulling phone numbers out of a DB
 in the format of 1234567890, I would
 like to format them like (123) 456-7890
 or something else that at least breaks them 
 up a bit.
 
 any help is appreciated,
 Thanks,
 
 Jerry Lake
 Interface Engineering Technician
 Europa Communications - http://www.europa.com
 Pacifier Online   - http://www.pacifier.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]



-- 
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] Again about PHP + IRC

2001-04-06 Thread Plutarck

Check out phpwizard.net

http://phpwizard.net/projects/phpIRC/

By reading through their code you can probably learn alot of what you want
to know.


--
Plutarck
Should be working on something...
...but forgot what it was.


"Marius Petravièius" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello php,

   Soeey but I can't find anyexample abot PHP + IRC..
   Please help me.

 _
  2001 m. balandþio 6 d.
  Marius
  [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]