billing.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
<?php include("includes/db.php"); include("includes/functions.php"); if($_REQUEST['command']=='update'){ $name=$_REQUEST['name']; $email=$_REQUEST['email']; $address=$_REQUEST['address']; $phone=$_REQUEST['phone']; $result=mysql_query("insert into customers values('','$name','$email','$address','$phone')"); $customerid=mysql_insert_id(); $date=date('Y-m-d'); $result=mysql_query("insert into orders values('','$date','$customerid')"); $orderid=mysql_insert_id(); $max=count($_SESSION['cart']); for($i=0;$i<$max;$i++){ $pid=$_SESSION['cart'][$i]['productid']; $q=$_SESSION['cart'][$i]['qty']; $price=get_price($pid); mysql_query("insert into order_detail values ($orderid,$pid,$q,$price)"); } die('Thank You! your order has been placed!'); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Billing Info</title> <script language="javascript"> function validate(){ var f=document.form1; if(f.name.value==''){ alert('Your name is required'); f.name.focus(); return false; } f.command.value='update'; f.submit(); } </script> </head> <body> <form name="form1" onsubmit="return validate()"> <input type="hidden" name="command" /> <div align="center"> <h1 align="center">Billing Info</h1> <table border="0" cellpadding="2px"> <tr><td>Order Total:</td><td><?php echo get_order_total()?></td></tr> <tr><td>Your Name:</td><td><input type="text" name="name" /></td></tr> <tr><td>Address:</td><td><input type="text" name="address" /></td></tr> <tr><td>Email:</td><td><input type="text" name="email" /></td></tr> <tr><td>Phone:</td><td><input type="text" name="phone" /></td></tr> <tr><td> </td><td><input type="submit" value="Place Order" /></td></tr> </table> </div> </form> </body> </html> |
feedback_process.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
<?php include('config.php'); $sql="INSERT INTO contact (Name, Email, Phone, Subject) VALUES ('$_POST[name]', '$_POST[email]', '$_POST[phone]', '$_POST[text]')"; if (!mysqli_query($mysqli,$sql)) { die('Error: ' . mysqli_error($mysqli)); } header("location: index.php"); echo "1 record added"; mysqli_close($mysqli); ?> |
custUpdate.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
<?php include 'config.php'; ?> <?php if (isset($_POST['submit'])){ echo $fname=$_POST['firstname']; echo $uname=$_POST['lastname']; echo $phone=$_POST['phone']; echo $email=$_POST['Email']; echo $country=$_POST['country']; echo $city=$_POST['city']; echo $address=$_POST['address']; echo $pcode=$_POST['pcode']; $id=$_POST['ID']; echo $query="update customer set FullName = '$fname', UserName = '$uname', Phone = '$phone',Email = '$email', Country = '$country', City = '$city', Adress = '$address', PostalCode = '$pcode' where Cust_Id = $id"; $rows=mysqli_query($mysqli,$query); echo "succes full updated ".$rows; mysqli_close($con); header("location: profile.php?msg=succes full update one record"); exit(); } ?> |
insertCustomer.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
<?php include('config.php'); $sql="INSERT INTO customer (FullName, UserName, Phone, Email, Password, Re_Password, Country, City, Adress, PostalCode) VALUES ('$_POST[name]', '$_POST[username]', '$_POST[tell]', '$_POST[email]', '$_POST[password1]', '$_POST[password2]', '$_POST[country]', '$_POST[City]', '$_POST[address]', '$_POST[pcode]')"; if (!mysqli_query($mysqli,$sql)) { die('Error: ' . mysqli_error($mysqli)); } header("location: index.php"); echo "1 record added"; mysqli_close($mysqli); ?> |
employeeValidate.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
<?php //include config.php to connect to the database include("config.php"); //start session session_start(); { // Define $myusername and $mypassword $magaca=$_POST['magaca']; $furaha=$_POST['furaha']; // To protect MySQL injection $magaca= mysqli_real_escape_string( $mysqli,$magaca); $furaha = mysqli_real_escape_string( $mysqli, $furaha); $fetch=mysqli_query( $mysqli, "select Employee_ID from employee where Username='$magaca' and Password = '$furaha'"); $count=mysqli_num_rows($fetch); if($count!="") { $_SESSION['login_username']=$magaca; header("location: Admin/index.php"); } else { header('Location: Sign In.php'); } } ?> |
Download full PHP Source code of Printing Press Management System
Advertisement
Advertisement
More helping material on Printing Press Management System System
- SRS Documentation of Printing Press Management System System
- Functional and Non-functional Requirements of Printing Press Management System System Advertisement
- Use case diagram of Printing Press Management System System
- Class diagram of Printing Press Management System System
- Context diagram of Printing Press Management System System Advertisement
- Sequence diagram of Printing Press Management System System
- Software Testing of Printing Press Management System System
- ERD of Printing Press Management System – Entity relationship diagram
- PPT Presentation of Printing Press Management System
- PHP Source code download for Printing Press Management System