Advertisement
M00371202

coursework2 insert.php

Dec 18th, 2013
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.44 KB | None | 0 0
  1.  
  2. <!DOCTYPE html>
  3. <html>
  4.  
  5. <head>
  6.      <link REL="StyleSheet" TYPE="text/css" HREF="style.css">
  7.  
  8.        
  9.  </head>
  10. <style>
  11. body
  12. {
  13. background-image:url('background-1.jpg');
  14. }
  15. </style>
  16.  
  17. <h1> Friba DropBox</h1>
  18.  
  19.  
  20. <div class="heading" align="centre" ><br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;***********Welcome*********** <br></div>
  21.  
  22.  
  23.  <div class="hello">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br><br>
  24.  
  25. <?php
  26.  $con=mysqli_connect("fribardropbox","a7157685_rawish","123456789fr","a7157685_friba (1) ");
  27.  // Check connection
  28.  if (mysqli_connect_errno())
  29.    {
  30.    echo "Failed to connect to MySQL: " . mysqli_connect_error();
  31.    }
  32.  
  33.  $sql="INSERT INTO a7157685_friba (1) (FileName ,Type ,Size ,Modified, Date)
  34. VALUES
  35. ('$_POST[FileName]','$_POST[Type]','$_POST[Size]','$_POST[Modified]')";
  36.  
  37.  if (!mysqli_query($con,$sql))
  38.    {
  39.    die('Error: ' . mysqli_error($con));
  40.    }
  41.  echo "1 record added";
  42.  
  43.  mysqli_close($con);
  44.  ?>
  45.  
  46.        <div class="heading1" align="centre" ><br>
  47.        <div id="footer"> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
  48.        
  49.     Copyright Β©  2013 - Designed  and Developed by:*** Friba Rawish ***
  50.              
  51.        </div></div>
  52.        
  53.        
  54.     </div> <!-- end of wrapper -->
  55. </div> <!-- end of wrapper_outer -->
  56.  
  57.  
  58.  
  59.  
  60.  
  61. </div>
  62.  
  63. </body>
  64.  
  65. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement