D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
u166148318
/
domains
/
avrd.org
/
public_html
/
admin
/
Filename :
objectives.php
back
Copy
<?php include '../components/connect.php'; ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Objectives</title> <!-- font awesome cdn link --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css"> <!-- custom css file link --> <link rel="stylesheet" href="./css/admin_style.css"> </head> <body> <!-- header section starts --> <?php include '../components/admin_header.php'; ?> <!-- header section ends --> <!-- register section starts --> <section class="form-container"> <form action="" method="POST" enctype="multipart/form-data"> <h3>Add On What We Do Page</h3> <?php if (isset($_POST['submit'])) { $w_title = $_POST['w_title']; $w_details = $_POST['w_details']; $flaticon = $_POST['flaticon']; $insert_objectives = $conn->prepare("INSERT INTO `objectives`(id, w_title, w_details, flaticon) VALUES(?,?,?,?)"); $insert_objectives->execute([null, $w_title, $w_details, $flaticon]); if ($insert_objectives) { echo "<font size='3px' padding='5px' color='green' text-align='center'> One Objective added successfully.</font>"; $success_msg[] = 'Objective added successfully!'; } else { echo "<font size='3px' padding='5px' color='red' text-align='center'>OOoops something went wrong, try again later.</font>"; } } ?><br> <input type="text" name="w_title" placeholder="Type a title concerning what We Do..." maxlength="80" class="box" required> <textarea name="w_details" placeholder="enter Details Of the Title" required maxlength="4000" cols="20" rows="3" class="box" required></textarea> <select name="flaticon" required> <option value="">--------Select the Type of icon you want---------</option> <?php $se = $conn->prepare("SELECT * FROM flaticon"); $se->execute(); $result = $se->setFetchMode(PDO::FETCH_ASSOC); while ($row = $se->fetch()) { ?> <option value="<?php echo $row['names']; ?>"><?php echo $row['names']; ?></option> <?php } ?> </select> <input type="submit" value="Add now" name="submit" class="btn"> <center> <a href="./view_objectives.php"> <h2>View My What We Do Page</h2> </a> </center> </form> </section> <!-- register section ends --> <script src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/2.1.2/sweetalert.min.js"></script> <!-- custom js file link --> <script src="./js/admin_script.js"></script> <?php include '../components/message.php'; ?> </body> </html>