• January 20, 2023
    <style>
    .e1 {
      width: 100%;
      padding: 12px 20px;
      margin: 8px 0;
      display: inline-block;
      border: 1px solid #ccc;
      border-radius: 4px;
      box-sizing: border-box;
    }
    </style>
    <div>
    <form name="contact" action="report.php" method="post" enctype="multipart/form-data" autocomplete="off">
    <input class="e1" type="Text" name="name" size="100%" placeholder="ชื่อ+นามสกุล(ผู้ติดต่อ)"/>
    <input class="e1" type="hidden" name="destination" value="<?= urlencode($_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); ?>" />
    <input class="e1" type="Text" name="tel" size="100%" placeholder="เบอร์ที่ติดต่อได้"/>
    <input class="e1" type="email" name="email" size="100%" placeholder="อีเมล์ที่ติดต่อได้" required/>
    <input class="e1" type="Text" name="content" size="100%" placeholder="อื่นๆ" required/>
    <div align="center"><input type="Submit" name="submit-board" value="OK" id="validate" class="button-red"/></div>
    </form>
    </div>
    
    report.php
    <meta charset="utf-8">
    
    <?php
    if($_POST['submit-board']) {
                $destination=$_POST['destination'];	
                $name=$_POST['name'];	
                $tel=$_POST['tel'];
                $email=$_POST['email'];
                $content=$_POST['content'];
    	    $ip = isset($_SERVER['REMOTE_ADDR']) ?
                $_SERVER['REMOTE_ADDR'] : '';				
    			
                $to = "i@x.com";
                $subject = "x.com $name"; //1
                $sub="
    Contact IP: $ip
    <div style='width:100%;
    	font-size:14px;
    	background-color: aliceblue;
    	border: 1px solid;border-color: #bbd8ec;
    	padding: 10px;'>
    
    URL : $destination	
    <table width='550' border='0' align='center'>			
      <tr><td><b>ผู้ติดต่อ</b></td>		<td><b>$name</b></td></tr>
      <tr><td>เบอร์โทร</td>			<td>$tel</td></tr>
      <tr><td>email</td>			<td>$email </td></tr>
      <tr><td>อื่นๆ</td>		<td>$content</td></tr>
    </table>
    </div>
    ";
    	 
    $bound_text = "jimmyP123";
    $bound = "--".$bound_text."\r\n";
    $bound_last = "--".$bound_text."--\r\n";
    
    $headers = "From: insurancecthai.net\r\n";
    $headers .= "MIME-Version: 1.0\r\n"."Content-Type: multipart/mixed; boundary=\"$bound_text\"";
    
    //1
    $message .= "If you can see this MIME than your client doesn't accept MIME types!\r\n"
    .$bound;
    
    $message .= "Content-Type: text/html; charset=\"utf-8\"\r\n" 
    ."Content-Transfer-Encoding: 7bit\r\n\r\n"
    ."$sub\r\n"
    .$bound;
    
    mail($to, $subject, $message, $headers); //1
    echo "success";
    }
    ?> 
    		 
    <script>
    window.setTimeout(function() {
    window.location = 'https://www.X.com/';
    }, 0);
    </script>
    </div>


เวอไนน์ไอคอร์ส

ประหยัดเวลากว่า 100 เท่า!






เวอไนน์เว็บไซต์⚡️
สร้างเว็บไซต์ ดูแลเว็บไซต์

Categories


Uncategorized