D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
u166148318
/
domains
/
avrd.org
/
public_html
/
admin
/
Filename :
footer.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>Footer</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 A Footer content</h3> <?php if (isset($_POST['submit'])) { $location = $_POST['location']; $injector = str_replace("'", "\'", $location); $phone = $_POST['phone']; $injector1 = str_replace("'", "\'", $phone); $email = $_POST['email']; $injector2 = str_replace("'", "\'", $email); $twiter = $_POST['twiter']; $injector3 = str_replace("'", "\'", $twiter); $facebook = $_POST['facebook']; $injector4 = str_replace("'", "\'", $facebook); $instagram = $_POST['instagram']; $injector5 = str_replace("'", "\'", $instagram); $youtube = $_POST['youtube']; $injector6 = str_replace("'", "\'", $youtube); $insert_footer = $conn->prepare("INSERT INTO `footer`(id, location, phone_num, email, twiter_url, fb_url, youtu_url, insta_url) VALUES(?,?,?,?,?,?,?,?)"); $insert_footer->execute([null, $injector, $injector1, $injector2, $injector3, $injector4, $injector6, $injector5]); if ($insert_footer) { echo "<font size='3px' padding='5px' color='green' text-align='center'> Footer added successfully.</font>"; } else { echo "<font size='3px' padding='5px' color='red' text-align='center'>OOoops something went wrong, try again later.</font>"; } } ?> <input type="text" name="location" placeholder="Type Address" class="box" required > <input type="text" name="phone" placeholder="Type Pnone number" class="box" required > <input type="text" name="email" placeholder="Type Company Email" class="box" required > <input type="text" name="twiter" placeholder="Type twiter link" class="box" required> <input type="text" name="facebook" placeholder="Type facebook link" class="box" required> <input type="text" name="instagram" placeholder="Type instagram link" class="box" required> <input type="text" name="youtube" placeholder="Type youtube link" class="box" required> <input type="submit" value="Add now" name="submit" class="btn"> <center> <a href="./view_footer.php"> <h2>View My Footer 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>