Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                
<?php 

if($_SERVER["REQUEST_METHOD"] == "POST"){
    $name = trim($_POST["name"]);
    $email = trim($_POST["email"]);
    $message = trim($_POST["message"]);

    if($name == "" OR $email == "" OR $message == ""){
        echo "You must specify a value for name, email address and message.";
        exit;
    }

    foreach($_POST as $value){
        if(stripos($value, 'Content-Type:') !== FALSE){
            echo "There was a problem with the information you entered.";
    exit;
        }
    }
    if ($_POST["address"] != ""){
        echo "your form submission has an error.";
        exit;
    }

    require_once("inc/phpmailer/class.phpmailer.php");
    $mail = new PHPMailer();

    if(!$mail -> ValidateAddress($email)){
        echo "You must specify a valid email address.";
        exit;

    }


    $email_body = "";
    $email_body = $email_body . "Name: " . $name . "<br>";
    $email_body = $email_body . "Email: " . $email . "<br>";
    $email_body = $email_body . "Message: " . $message;

    $mail->SetFrom($email, $name);
    $address = "majidmo64@gmail.com";
    $mail->AddAddress($address, "Majid Mokhtari");
    $mail->Subject = "Message From the Website | " .$name;
    $mail->MsgHTML($email_body);

    
    if(!$mail->Send()) {
      echo "There was a problem sending the email: " . $mail->ErrorInfo;
      exit;
    }


    header("Location: http://www.majidmokhtari.com/contact.php?status=thanks");
    exit;
}
?>


<?php 
$selectButton = "contact"; 
$effect = "contact";
$title = "Contact";?>
<?php include('inc/header.php') ?>

<?php if(isset($_GET["status"]) AND $_GET["status"] == "thanks"){?>

<br>
<br>
<br>
<br>
<br>
<br>
<h4>Thanks for sending the message. I will contact you soon!</h4>
<br>
<br>
<br>
<br>
<br>
<br>

<?php }else{?>


<div class="paragraph col">
			<h2>Contact details:</h2>
      <ul class="contact-info">
	      <li class="phone"><a href="tel:651-2394181">651-2394181</a></li>
	      <li class="mail"><a href="mailto:majidmo64@gmail.com">majidmo64@gmail.com</a></li>
      </ul>

</div>





	<div class="photo col">

		 <form method="post" action="contact.php">

                    <table>
                        <tr >
                            <th class="textArea">
                                <label for="name">Name</label>
                            </th>
                            <td >
                                <input type="text" name="name" id="name">
                            </td>
                        </tr>
                        <tr>
                            <th class="textArea">
                                <label for="email">Email</label>
                            </th>
                            <td>
                                <input type="text" name="email" id="email">
                            </td>
                        </tr>
                        <tr>
                            <th class="textArea">
                                <label for="message">Message</label>
                            </th>
                            <td>
                                <textarea name="message" id="message"></textarea>
                            </td>
                        </tr>
                        <tr style="display: none;">
                            <th>
                                <label for="address">Address</label>
                            </th>
                            <td>
                                <input type="text" name="address" id="address">
                                <p>Humans (and frogs): please leave this field blank.</p>
                            </td>
                            

                        </tr>                    
                    </table>
                    <input type="submit" value="Send" class="submit">

                </form>
			


		</div>
		<?php }?>
	



<?php include('inc/footer.php');?>

              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px

Console