Jump to content

If statement


le007

Recommended Posts

if ( $area == "thisarea" ) {

        echo "You're home";

} elseif( $price == "100" ) {

        echo " ";

 

I need an if for both conditions, basically if area is "thisarea" and price is 100 then I want nothing echoed at all. How can this be done?

 

How can I add 2 if's... if a = b and c = d then echo " "

 

Thanks

 

Link to comment
Share on other sites

    This is my code

 

<body>

<?php

// # Is the OS Windows or Mac or Linux

if (strtoupper(substr(PHP_OS,0,3)=='WIN')) {

  $eol="\r\n";

} elseif (strtoupper(substr(PHP_OS,0,3)=='MAC')) {

  $eol="\r";

} else {

  $eol="\n";

}

 

# Common Headers

$headers .= 'From: Webdev01 <webdev01@yahoogroups.com>'.$eol;

$headers .= 'Reply-To: Webdev01 <webdev01@yahoogroups.com>'.$eol;

$headers .= 'Return-Path: Webdev01 <webdev01@yahoogroups.com>'.$eol;

$headers .= "Message-ID: <TheSystem@".$_SERVER['SERVER_NAME'].">".$eol;

$headers .= "X-Mailer: PHP v".phpversion().$eol;          // These two to help avoid spam-filters

# Boundry for marking the split & Multitype Headers

$headers .= 'MIME-Version: 1.0'.$eol;

//$headers .= "Content-type: text/plain; charset=iso-8859-1".$eol;

$headers .= "Content-type: text/html; charset=iso-8859-1".$eol;

 

 

$to = "myemail@someone.com";

$subject = "Test Mail";

$msg = "Hi, <br> Testing";

if(mail($to, $subject, $msg, $headers))

echo "mail sent....";

else

echo "error...";

?>

</body>

 

Problem :

when i was send this kind of code it will show me that mail is send successfully .

but in actually mail is not sende.

And my php.ini

and please tell me about the php.ini

file

thanks in advance

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.