Şuanki Dizin: /home/wwwdreamtechnolo/public_html/strongergen.com/ |
Şuanki Dosya : /home/wwwdreamtechnolo/public_html/strongergen.com/edit-delete-acc.php |
<?php require_once('functions.php'); $db = new class_function(); $res_edit_id = ""; if(isset($_GET['edit_id'])){ echo $res_edit_id = $_GET['edit_id']; $_SESSION['edit_id'] = $res_edit_id; } $res_edit_id = $_SESSION['edit_id']; if (isset($_POST['submit_btn'])) { $name = $_POST['name']; $mobile_no = $_POST['mobile_no']; $email = $_POST['email']; $message = $_POST['message']; $db->update_user_account($name,$mobile_no,$email,$message,$res_edit_id); } $users_data = array(); $users_data = $db->get_user_data_from_id($res_edit_id); // print_r($user_data); if(!empty($users_data)){ $res_id = $users_data['id']; $name = $users_data['name']; $mobile_no = $users_data['mobile_no']; $email = $users_data['email']; $message = $users_data['message']; $res_date = $users_data['date']; $res_time = $users_data['time']; } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Registration Form</title> <style> body{ background-image: url(bg.jpg); } h1{ color: whitesmoke; } .heading{ text-align: center; } .container{ background-color: bisque; padding: 40px 0px 40px 0px; margin: 0% 30% 0% 30%; border-radius: 40px 0px 40px 0px; } input{ width: 80%; padding: 5px 0px 5px 0px; border-radius: 10px; padding-left: 4px; margin-left: 50px; } label{ margin-left: 50px; } #male, #female{ width: 2%; /* text-align: left; */ } /* #gender{ margin-left: 0px; } */ #submit:hover{ background-color: rgb(11, 11, 11); color: white; } </style> </head> <body> <div class="heading"> <h1>Registration Form</h1> </div> <div class="container"> <form action="edit-record.php" method="POST"> <label for="fname">Enter First Name</label><br> <input type="text" name="fname" id="fname" value="<?php echo $res_fname; ?>" placeholder=" Enter First Name" required><br><br> <label for="lname">Enter Last Name</label><br> <input type="text" name="lname" id="lname" value="<?php echo $res_lname; ?>" placeholder=" Enter Last Name" required><br><br> <label for="phone">Enter Phone Number</label><br> <input type="text" name="phone" id="phone" value="<?php echo $res_phone; ?>" placeholder=" Enter Phone Number" required><br><br> <label for="email">Enter Email Id</label> <br> <input type="email" name="email" id="email" value="<?php echo $res_email; ?>" placeholder=" Enter Email Id" required><br><br> <label for="address">Enter Address</label><br> <input type="text" name="address" id="address" value="<?php echo $res_address; ?>" required><br><br> <label for="gender">Select Gender</label><br> <input type="radio" name="gender" id="male" value="male" <?php if($res_gender == "male"){ ?> checked <?php } ?>> <label for="male">Male</label> <input type="radio" name="gender" id="female" value="female" <?php if($res_gender == "female"){ ?> checked <?php } ?>> <label for="female">Female</label><br><br> <input type="submit" value="UPDATE" id="submit_btn" name="submit_btn"> </form> </div> </body> </html>
Linux 65-254-81-4.cprapid.com 5.14.0-284.11.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 9 05:49:00 EDT 2023 x86_64
Apache
65.254.81.4