RE: [PHP] just wondering

2003-07-11 Thread Jay Blanchard
[snip]
Just wondering if there's a clear screen function in PHP like the
clrscr()
in 'C'.
[/snip]

If you are running PHP from the command line on a *nix or BSD box you
could...

exec("clear");

HTH!

Jay

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



RE: [PHP] just wondering ....

2001-03-18 Thread Peter Houchin





On Mon, 19 Mar 2001 01:34, Peter Houchin wrote:
> What am going to try & do is get it so mail() returns true then run
> this script else do this
>
> Peter

Like most functions in PHP, mail() returns a value - boolean according to 
the manual. So you could do something like

$mail = mail(values);
if ($mail){
 do this
}
else {
 error
}

But as has been pointed out above, a return of TRUE only means that 
mail() has handed the data off to something else, which something else 
may or may not succeed in sending the message.

-- 
David Robley| WEBMASTER & Mail List Admin

Thanks every one for your help :)
 

Peter

-- 
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] just wondering ....

2001-03-18 Thread David Robley

Followups moved to bottom of message for legibility!

> -Original Message-
>
>
> In article <[EMAIL PROTECTED]>,
>
>  [EMAIL PROTECTED] ("Peter Houchin") wrote:
> > If I have a email script and use the mail() function ... am i able to
> > do this ..
> >
> > mail(values);
> > if ($mail=1){
> > do this
> > }
> > else {
> > error
> > }

> From: CC Zona [mailto:[EMAIL PROTECTED]]
> Sent: Monday, March 19, 2001 2:02 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] just wondering 
>
> Are you trying to test whether mail() returned true?
>
> if (mail(values)){
> do this
> }
> else {
> error
> }
>
> (Keeping in mind that when mail() returns true, it's not saying whether
> the mail really reached the destination server, only that it the
> function executed successfully.)
>
> --
> CC

On Mon, 19 Mar 2001 01:34, Peter Houchin wrote:
> What am going to try & do is get it so mail() returns true then run
> this script else do this
>
> Peter

Like most functions in PHP, mail() returns a value - boolean according to 
the manual. So you could do something like

$mail = mail(values);
if ($mail){
 do this
}
else {
 error
}

But as has been pointed out above, a return of TRUE only means that 
mail() has handed the data off to something else, which something else 
may or may not succeed in sending the message.

-- 
David Robley| WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet| http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA

-- 
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] just wondering ....

2001-03-18 Thread Peter Houchin

What am going to try & do is get it so mail() returns true then run this
script else do this

Peter

-Original Message-
From: CC Zona [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 19, 2001 2:02 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] just wondering 


In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] ("Peter Houchin") wrote:

> If I have a email script and use the mail() function ... am i able to do
> this ..
>
> mail(values);
> if ($mail=1){
> do this
> }
> else {
> error
> }

Are you trying to test whether mail() returned true?

if (mail(values)){
do this
}
else {
error
}

(Keeping in mind that when mail() returns true, it's not saying whether the
mail really reached the destination server, only that it the function
executed successfully.)

--
CC

--
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] just wondering ....

2001-03-18 Thread CC Zona

In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] ("Peter Houchin") wrote:

> If I have a email script and use the mail() function ... am i able to do
> this ..
> 
> mail(values);
> if ($mail=1){
> do this
> }
> else {
> error
> }

Are you trying to test whether mail() returned true?

if (mail(values)){
do this
}
else {
error
}

(Keeping in mind that when mail() returns true, it's not saying whether the 
mail really reached the destination server, only that it the function 
executed successfully.)

-- 
CC

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