Jump to content

Fryle

New Members
  • Posts

    6
  • Joined

  • Last visited

Fryle's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. security.php <!DOCTYPE html> <html> <head> <title></title> <style type="text/css"> body{ background-image: url(images/nature.jpg); background-size: cover; } .aa{ width: 300px; height: 230px; background-color: rgba(0,0,0,0.5); margin: 0 auto; margin-top: 60px; padding-top: 10px; padding-left: 50px; padding-right: 0px; border-radius: 15px; -webkit-boarder-radius:15px; -o-boarder-radius:15px; -moz-boarder-radius:15px; color: white; font-weight:bolder; } .aa input[type="text"]{ width: 200px; height: 35px; border:0; border-radius: 5px; -webkit-boarder-radius:5px; -o-boarder-radius:5px; -moz-boarder-radius:5px; padding-left: 5px; font-weight: bolder; } .aa input[type="password"]{ width: 200px; height: 35px; padding-left: 5px; border:0; border-radius: 5px; -webkit-boarder-radius:5px; -o-boarder-radius:5px; -moz-boarder-radius:5px; font-weight: bolder; } .aa input[type="submit"]{ width: 100px; height: 35px; border: 0; border-radius: 5px; -webkit-boarder-radius:5px; -o-boarder-radius:5px; -moz-boarder-radius:5px; background-color: skyblue; font-weight: bolder; } </style> </head> <body> <div class="aa"> <h2>Members Area</h2> <form> <input type="text" placeholder="Username"><br><br> <input type="password" placeholder="Password"><br><br> <input type="submit" value="Login"><br><br> </body> </html> here is my sql. -- phpMyAdmin SQL Dump -- version 3.2.0.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Oct 08, 2016 at 09:58 AM -- Server version: 5.1.36 -- PHP Version: 5.3.0 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- Database: `activity` -- -- -------------------------------------------------------- -- -- Table structure for table `product` -- CREATE TABLE IF NOT EXISTS `product` ( `id` int( NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `code` varchar(255) NOT NULL, `image` text NOT NULL, `price` double(10,2) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `product_code` (`code`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; -- -- Dumping data for table `product` -- INSERT INTO `product` (`id`, `name`, `code`, `image`, `price`) VALUES (1, 'sampleproduct', '001', '1.png', 100.00), (2, 'productsample2', '002', '2.png', 200.00); -- -------------------------------------------------------- -- -- Table structure for table `user` -- CREATE TABLE IF NOT EXISTS `user` ( `userid` int(2) unsigned zerofill NOT NULL AUTO_INCREMENT, `username` varchar(150) NOT NULL, `password` varchar(150) NOT NULL, PRIMARY KEY (`userid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; -- -- Dumping data for table `user` -- INSERT INTO `user` (`userid`, `username`, `password`) VALUES (01, 'admin', 'admin'); here is the delete product <!DOCTYPE html> <html> <head> <title>Admin template</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" type="text/css" href="admin.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,600,400italic,600italic,700' rel='stylesheet' type='text/css'> </head> <body> <div id="header"> <div class="logo"> <a href="#">Xero<span>Source</span></a> </div> </div> <a class="mobile">MENU</a> <div id="container"> <div class="sidebar"> <ul id="nav"> <li><a class="selected" href="index.php">Homepage</a></li> <li><a href="productupdate.php">Update Product Product</a></li> <li><a href="delete.php">Delete Product</a></li> <li><a href="productadd.php">Add Products</a></li> </ul> </div> <div class="content"> <h1>Delete Product</h1> <table width="968" height="200" align="center" border="1" cellpadding="20"> <tr> <td width="860" height="150" background="images/flower.png" bgcolor="#FFFFFF"></td> </tr> </table> <?php if (isset($_POST['new'])) { header ("Location:productadd.php"); } ?> <?php if (isset($_POST['delete'])) { header ("Location:productdelete.php"); } ?> <?php if (isset($_POST['update'])) { header ("Location:productupdate.php"); } ?> </form> <form name="Delete" method="post" action="delete.php"> <table width="55%" height="47%" border = "1"align="center" cellpadding="5" cellspacing="5" bgcolor="#FFFFFF"> <tr> <td width="34%" background="images/g5.png"> <p align="center" class="style1"> P R O D U C T </p> <p align="center"><strong>I N F O R M A T I O N </strong></p></td> <td width="66%" height="240" background="images/s1.png"> <p align="center"><strong> <?php require 'defaultproduct.php'; $sql = "SELECT * from product order by name asc"; $result = mysqli_query($conn, $sql); if (mysqli_num_rows($result) > 0) { while($row = mysqli_fetch_assoc($result)) { ?> <?php echo '<input type = "radio" name ="selectrow" value="'.$row['id'].'>"';?> <br> <br> <?php echo 'Product Code :'.$row["code"];?> <br> <?php echo 'Product :'.$row["name"];?> <br> <?php echo 'Price :'.$row["price"];?> <br> <?php } } ?> </div> </div><!-- #container --> <script type="text/javascript"> $(document).ready(function(){ $("a.mobile").click(function(){ $(".sidebar").slideToggle('fast'); }); window.onresize = function(event) { if($(window).width() > 480){ $(".sidebar").show(); } }; }); </script> </body> </html> add product <!DOCTYPE html> <html> <head> <title>Admin template</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" type="text/css" href="admin.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,600,400italic,600italic,700' rel='stylesheet' type='text/css'> </head> <body> <div id="header"> <div class="logo"> <a href="#">Xero<span>Source</span></a> </div> </div> <a class="mobile">MENU</a> <div id="container"> <div class="sidebar"> <ul id="nav"> <li><a class="selected" href="index.php">Homepage</a></li> <li><a href="productupdate.php">Update Product Product</a></li> <li><a href="delete.php">Delete Product</a></li> <li><a href="productadd.php">Add Products</a></li> </ul> </div> <div class="content"> <table width="55%" height="47%" border = "1"align="center" cellpadding="5" cellspacing="5" bgcolor="#ff9999"> <tr> <td width="34%" background="images/nature.jpg"> <p align="center" class="style1"> P R O D U C T </p> <p align="center"><strong>I N F O R M A T I O N </strong></p></td> <td width="66%" height="240" background="nature.jpg"> <div align="center"> <p> </p> <p><strong><color=red>Product Code :</color> <input type="text" name="productcode"> </strong><br> </p> <p><strong>Product Name: <input type="text" name="productname"> </strong><br> <br> <strong> Price :</strong> <input type="text" name="price"> </p> <p> <strong>Description :</strong> <input type="text" name="textfield"> </label> </p> <p> <input class="input-group" type="file" name="user_image" accept="image/*" /> </p> <p> <input type="submit" name="add" value="ADD"> </p> </div> </div> </div><!-- #container --> <script type="text/javascript"> $(document).ready(function(){ $("a.mobile").click(function(){ $(".sidebar").slideToggle('fast'); }); window.onresize = function(event) { if($(window).width() > 480){ $(".sidebar").show(); } }; }); <?php if (isset($_POST['add'])) { if($_POST["productcode"] == null || $_POST["productname"] == null || $_POST["price"] == null || $_POST["user_image"] == null) { echo 'ERROR , Product information required!'; } else { require 'defaultproduct.php'; $sql = "INSERT INTO product (code,name,price,img) VALUES ('".$_POST["productcode"]."' , '".$_POST["productname"]."' , '".$_POST["price"]."' , '".$_POST["user_image"]."')"; mysqli_query($conn,$sql); echo 'Product ADD !'; } } ?> <?php if (isset($_POST['delete'])) { header("Location:productdelete.php"); } ?> <?php if (isset($_POST['new'])) { header("Location:productadd.php"); } ?> <?php if (isset($_POST['update'])) { header ("Location:productupdate.php"); } ?> </script> </body> </html> update <!DOCTYPE html> <html> <head> <title>Admin template</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" type="text/css" href="admin.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,600,400italic,600italic,700' rel='stylesheet' type='text/css'> </head> <body> <div id="header"> <div class="logo"> <a href="#">Xero<span>Source</span></a> </div> </div> <a class="mobile">MENU</a> <div id="container"> <div class="sidebar"> <ul id="nav"><li><a class="selected" href="index.php">Homepage</a></li> <li><a href="productupdate.php">Update Product Product</a></li> <li><a href="delete.php">Delete Product</a></li> <li><a href="productadd.php">Add Products</a></li> </ul> </div> <div class="content"> <h1>Update Product</h1> <form name="Delete" method="post" action=""> <table width="55%" height="47%" border = "1"align="center" cellpadding="5" cellspacing="5" bgcolor="#FFFFFF"> <tr> <td width="34%" background="images/g8.png"> <p align="center" class="style2"> P R O D U C T </p> <p align="center"><strong>I N F O R M A T I O N </strong></p></td> <td width="66%" height="240" background="images/g8.png"> <p align="center"> <strong>Product Code :</strong> <input type="text" name="productcode"> </p> <p align="center"><span class="style1">Product Code Required!</span><br> <br> <br> <strong>Product Name : </strong> <input type="text" name="productname"> <br> <br> <br> <strong>Price : </strong> <input type="text" name="price"> </p> <p align="center"> <input type="submit" name="updateselect" value="Update"> </p> <p align="center"> <?php if (isset($_POST['updateselect'])) { if($_POST["productcode"] == null || $_POST["productname"] == null || $_POST["price"] == null) { echo 'ERROR , Product information required!'; } else { require 'defaultproduct.php'; $name = $_POST['productname']; $price = $_POST['price']; $code = $_POST['productcode']; $sql = "UPDATE product SET name='$name',price='$price' WHERE code='$code'"; mysqli_query($conn,$sql); echo 'Product Updated!'; } } ?> </p></td> </tr> </table> </form> </div><!-- #container --> <script type="text/javascript"> $(document).ready(function(){ $("a.mobile").click(function(){ $(".sidebar").slideToggle('fast'); }); window.onresize = function(event) { if($(window).width() > 480){ $(".sidebar").show(); } }; }); </script> </body> </html> register user <!DOCTYPE html> <html> <head> <title></title> <style type="text/css"> body{ background-image: url(images/nature.jpg); background-size: cover; } .aa{ width: 300px; height: 280px; background-color: rgba(0,0,0,0.5); margin: 0 auto; margin-top: 60px; padding-top: 10px; padding-left: 50px; padding-right: 0px; border-radius: 15px; -webkit-boarder-radius:15px; -o-boarder-radius:15px; -moz-boarder-radius:15px; color: white; font-weight:bolder; } .aa input[type="text"]{ width: 200px; height: 35px; border:0; border-radius: 5px; -webkit-boarder-radius:5px; -o-boarder-radius:5px; -moz-boarder-radius:5px; padding-left: 5px; font-weight: bolder; } .aa input[type="password"]{ width: 200px; height: 35px; padding-left: 5px; border:0; border-radius: 5px; -webkit-boarder-radius:5px; -o-boarder-radius:5px; -moz-boarder-radius:5px; font-weight: bolder; } .aa input[type="email"]{ width: 200px; height: 35px; padding-left: 5px; border:0; border-radius: 5px; -webkit-boarder-radius:5px; -o-boarder-radius:5px; -moz-boarder-radius:5px; font-weight: bolder; } .aa input[type="submit"]{ width: 100px; height: 35px; border: 0; border-radius: 5px; -webkit-boarder-radius:5px; -o-boarder-radius:5px; -moz-boarder-radius:5px; background-color: skyblue; font-weight: bolder; } </style> </head> <body> <div class="aa"> <h2>New User Registration</h2> <form> <input type="text" placeholder="Username"><br><br> <input type="password" placeholder="Password"><br><br> <input type="email" placeholder="Email"><br><br> <input type="submit" value="Register"><br><br> </body> </html>
  2. 1. in security.php it wont allow me to enter my username and password even sql is admin and admin 2. i dont know how to put a delete product to delete specific product 3. i cant add/update/ product. 4. i cant register a new user.. can you guys edit it for me? you can check all the files and recode it if you want. i just need it for my school project. and so i can review my work and your work to learn more better that teacher is so bitchy his not giving a lesson and now he wants to build us that and this maybelle website1.zip
  3. its just for my project in school sir.. not a public website xD
  4. im using dreamweaver... im not an expert of this. but please someone can help me out this is my index <html> <head> <link rel="stylesheet" type="text/css" href="site.css"> <style type="text/css"> body { background-color: #FF9933; } </style> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head> <body> <table width="100%" height="5%" border="1" align="center" cellspacing="0" bordercolor="#000000" bgcolor="#FFFFFF" cellspace = "10"> <tr> <td width="268" bordercolor="#000000" bgcolor="#FFFFFF"><div align="center"><strong>E - COMMERCE SITE </strong></div></td> <td width="697" bordercolor="#000000" bgcolor="#FFFFFF"> </td> <td width="105" bordercolor="#000000" bgcolor="#FFFFFF"><div align="center"><a href="security.php" class="style2"><strong>S I G N - I N</strong></a></div></td> </tr> </table> <table width="50%" height="50%" align="center" border="0" cellpadding="20"> <tr> <td height="150" bgcolor="#FFFFFF"></td> </tr> </table> <table width="80%" height="5%" border = "1"align="center" bgcolor="#FFFFFF"> <tr> <td width="502" height="30" ><div align="center"><strong><a href="index.php" class="style2">M A R K E T</a></strong></div></td> <td width="482" height="30" bgcolor="#FFFFFF" ><div align="center"><strong><a href="cart.php" class="style2">O R D E R </a></strong></div></td> </tr> </table> <hr> <div class="MarginTable"> <p align="center"><strong>F E A T U R E D P R O D U C T ' s </strong></p> <table width="45%" border = "3" align="center" cellpadding="5" cellspacing="5" bgcolor="#FFFFFF"> <tr> <td width="108"><div align="center" class="style3"><strong>Product Code</strong></div></td> <td width="108"><div align="center" class="style3"><strong>Thumbnail</strong></div></td> <td width="108"><div align="center" class="style3"><strong>Price</strong></div></td> <td width="108"><div align="center" class="style3"><strong>Product</strong></div></td> </tr> <?php require 'defaultproduct.php'; $sql = "SELECT * from product order by name asc"; $result = mysqli_query($conn, $sql); if (mysqli_num_rows($result) > 0) { while($row = mysqli_fetch_assoc($result)) { ?> <tr> <td height="64"> <div align="center"><strong><?php echo $row["code"];?></strong></div></td> <td> <div align="center"><strong><?php echo $row["name"];?> </strong></div> </td> <td> <div align="center"><strong><?php echo "Php ".$row["price"];?></strong></div></td> <td><div align="center"><strong><?php echo "Php ".$row["price"];?> </strong></div> </td> </tr> <?php } } ?> </table> <div align="center"></div> </div> </body> </html> here is my database. -- phpMyAdmin SQL Dump -- version 3.2.0.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Oct 08, 2016 at 09:58 AM -- Server version: 5.1.36 -- PHP Version: 5.3.0 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- Database: `activity` -- -- -------------------------------------------------------- -- -- Table structure for table `product` -- CREATE TABLE IF NOT EXISTS `product` ( `id` int( NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `code` varchar(255) NOT NULL, `image` text NOT NULL, `price` double(10,2) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `product_code` (`code`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; -- -- Dumping data for table `product` -- INSERT INTO `product` (`id`, `name`, `code`, `image`, `price`) VALUES (1, 'sampleproduct', '001', '1.png', 100.00), (2, 'productsample2', '002', '2.png', 200.00); -- -------------------------------------------------------- -- -- Table structure for table `user` -- CREATE TABLE IF NOT EXISTS `user` ( `userid` int(2) unsigned zerofill NOT NULL AUTO_INCREMENT, `username` varchar(150) NOT NULL, `password` varchar(150) NOT NULL, PRIMARY KEY (`userid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; -- -- Dumping data for table `user` -- INSERT INTO `user` (`userid`, `username`, `password`) VALUES (01, 'admin', 'admin'); here is the admin panel <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css"> <!-- body { background-color: #FF9933; } .style1 {font-weight: bold} --> </style></head> <body> <form name="Product" method="post"> <table width="1000" height="200" align="center" border="1" cellpadding="20"> <tr> <td height="150" bgcolor="#FFFFFF"></td> </tr> </table> <table width="1000" height="40" border = "1"align="center" bgcolor="#FFFFFF"> <tr> <td width="350" height="30" ><div align="center"> <input type="submit" name="new" value="N E W"> </div> </td> <td width="350" height="30" ><div align="center"> <input type="submit" name="update" value="U P D A T E"> </div> </td> <td width="350" height="30" ><div align="center"><strong> <input type="submit" name="delete" value="D E L E T E"> </strong></div> </td> <td width="350" height="30" ><div align="center"><strong><a href="registeruser.php"> U S E R </a></strong></div></td> <td width="350" height="30" ><div align="center"><a href="index.php"><strong> M A R K E T </strong></a></div></td> </tr> </table> <p> </p> <table width="55%" height="47%" border = "1"align="center" cellpadding="5" cellspacing="5" bgcolor="#FFFFFF"> <tr> <td width="34%"> <p align="center" class="style1"> P R O D U C T </p> <p align="center"><strong>I N F O R M A T I O N </strong></p></td> <td width="66%" height="240"> <div align="center"> <p><strong>Product Code :</strong> <input type="text" name="productcode"> <br> <br> <br> <strong>Product Name:</strong> <input type="text" name="productname"> <br> <br> <br> <strong>Price :</strong> <input type="text" name="price"> <br> <br> <br> </p> <input type="submit" name="add" value="ADD"> </div> <p align="center"> <?php if (isset($_POST['add'])) { if($_POST["productcode"] == null || $_POST["productname"] == null || $_POST["price"] == null) { echo 'ERROR , Product information required!'; } else { require 'defaultproduct.php'; $sql = "INSERT INTO product (code,name,price) VALUES ('".$_POST["productcode"]."' , '".$_POST["productname"]."' , '".$_POST["price"]."')"; mysqli_query($conn,$sql); echo 'Product ADD !'; } } ?> <?php if (isset($_POST['delete'])) { header("Location:productdelete.php"); } ?> <?php if (isset($_POST['new'])) { header("Location:productadd.php"); } ?> <?php if (isset($_POST['update'])) { header ("Location:productupdate.php"); } ?> </p> </td> </tr> </table> </form> </body> </html> i just want to ask how to upload my images upon making the product and it will appear in index automatically acording to the product it self and make it clickable and showing its product detail... i hope you can help me..
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.