File manager - Edit - /home/justdoit/newagevaultandlogistic.com/admin/vault.php
Back
<?php /* DATABASE CONNECTION */ $host = "localhost"; $dbname = "shipdwbw_newguard"; $username = "shipdwbw_newguard"; $password = "thSSg]zHHO^majSf"; $conn = new mysqli($host, $username, $password, $dbname); if ($conn->connect_error) { die("Connection Failed: " . $conn->connect_error); } $message = ""; /* INSERT DATA */ if(isset($_POST['submit'])){ $date_of_deposit = $_POST['date_of_deposit']; $security_code = $_POST['security_code']; $name_of_depositor = $_POST['name_of_depositor']; $next_of_kin = $_POST['next_of_kin']; $item_deposited = $_POST['item_deposited']; $transaction_code = $_POST['transaction_code']; $purpose_of_deposit= $_POST['purpose_of_deposit']; $advance_payment = $_POST['advance_payment']; $country_of_origin = $_POST['country_of_origin']; $charges_per_month = $_POST['charges_per_month']; $debt_to_pay = $_POST['debt_to_pay']; $user = $_POST['user']; $passwrd = $_POST['passwrd']; $sql = "INSERT INTO deposit_records( date_of_deposit, security_code, name_of_depositor, next_of_kin, item_deposited, transaction_code, purpose_of_deposit, advance_payment, country_of_origin, charges_per_month, debt_to_pay, user, passwrd ) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)"; $stmt = $conn->prepare($sql); $stmt->bind_param( "sssssssssssss", $date_of_deposit, $security_code, $name_of_depositor, $next_of_kin, $item_deposited, $transaction_code, $purpose_of_deposit, $advance_payment, $country_of_origin, $charges_per_month, $debt_to_pay, $user, $passwrd ); if($stmt->execute()){ $message = "Record Inserted Successfully"; }else{ $message = "Error: " . $conn->error; } } ?> <!DOCTYPE html> <html> <head> <title>Deposit Record Entry</title> <style> body{ margin:0; padding:30px 0; background:#eef2f7; font-family:Arial, Helvetica, sans-serif; } .container{ width:55%; max-width:650px; margin:auto; background:#ffffff; padding:30px; border-radius:12px; box-shadow:0 8px 25px rgba(0,0,0,0.08); } h2{ text-align:center; margin-bottom:25px; color:#1d3557; font-size:28px; } .form-group{ margin-bottom:18px; } label{ display:block; margin-bottom:6px; font-weight:600; color:#444; font-size:14px; } input, textarea{ width:100%; padding:11px 12px; border:1px solid #d0d7de; border-radius:6px; font-size:14px; transition:0.3s; box-sizing:border-box; } input:focus, textarea:focus{ border-color:#007bff; box-shadow:0 0 6px rgba(0,123,255,0.2); outline:none; } button{ width:100%; background:#0d6efd; color:#fff; border:none; padding:13px; font-size:15px; border-radius:6px; cursor:pointer; transition:0.3s; font-weight:bold; } button:hover{ background:#0b5ed7; } .success{ background:#d1e7dd; color:#0f5132; padding:12px; margin-bottom:20px; border-radius:6px; text-align:center; font-size:14px; } /* MOBILE RESPONSIVE */ @media(max-width:768px){ .container{ width:90%; padding:20px; } }</style> </head><body> <div class="container"> <div class="row"> <div class="col-md-8 col-md-offset-2"> <div class="alert alert-success" role="alert"> <h4><a href="assets.php">Create Asset</a> | <a href="addPackage.php">Send Package</a> | <a href="vault.php">Vault</a> |<a href="signout.php">Signout</a></h4> </div> </div> </div> <h2>Deposit Record Entry Form</h2> <?php if($message != ""){ ?> <div class="success"> <?php echo $message; ?> </div> <?php } ?> <form method="POST" action=""> <div class="form-group"> <label>Date of Deposit</label> <input type="date" name="date_of_deposit" required> </div> <div class="form-group"> <label>Security Code</label> <input type="text" name="security_code" required> </div> <div class="form-group"> <label>Name of Depositor</label> <input type="text" name="name_of_depositor" required> </div> <div class="form-group"> <label>Next of Kin</label> <input type="text" name="next_of_kin" required> </div> <div class="form-group"> <label>Item Deposited</label> <input type="text" name="item_deposited" required> </div> <div class="form-group"> <label>Transaction Code</label> <input type="text" name="transaction_code" required> </div> <div class="form-group"> <label>Purpose of Deposit</label> <input type="text" name="purpose_of_deposit" required> </div> <div class="form-group"> <label>Advance Payment</label> <input type="text" name="advance_payment" required> </div> <div class="form-group"> <label>Country of Origin</label> <input type="text" name="country_of_origin" required> </div> <div class="form-group"> <label>Charges Per Month</label> <input type="text" name="charges_per_month" required> </div> <div class="form-group"> <label>Debt to Pay</label> <input type="text" name="debt_to_pay" required> </div> <div class="form-group"> <label>Username</label> <input type="text" name="user" required> </div> <div class="form-group"> <label>Password</label> <input type="password" name="passwrd" required> </div> <button type="submit" name="submit"> Insert Record </button> </form> </div> <script> document.querySelector("form").addEventListener("submit", function(){ let confirmInsert = confirm("Are you sure you want to insert this record?"); if(!confirmInsert){ event.preventDefault(); } }); </script> </body> </html>
| ver. 1.4 |
Github
|
.
| PHP 8.2.31 | Generation time: 1.2 |
proxy
|
phpinfo
|
Settings