Advertisement
Guest User

Untitled

a guest
Dec 14th, 2016
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.18 KB | None | 0 0
  1. <html>
  2.      <head>
  3.          <title>Form Fattura</title>
  4.      </head>
  5.     <body>
  6.    
  7. <!--Script Connessione-->    
  8.      
  9. <?php
  10.         echo 'Test ';
  11.          $server="127.0.0.1";
  12.          $username="root";
  13.          $password="";
  14.          $conn= mysqli_connect([$server,[$username,[$password,]]]);
  15.                 if (!$conn) {
  16.                     die("Connection failed: " . mysqli_connect_error());
  17.                 }
  18.                 else {
  19.                 echo "Connected successfully";
  20.                 }
  21.          $database = mysqli_select_db ( 'test' , $conn ) or die (mysqli_connect_error());      
  22.  ?>
  23.  
  24. <!--Form Fattura-->
  25.  
  26. <?php makeTextInputField('campo testo');
  27. ?>
  28.  
  29. <?php makeDateInputField('data:');
  30. ?>
  31.  
  32. <?php
  33.     function makeTextInputField($num_fatt)
  34. {
  35.         $textnum = ucfirst($num_fatt);     
  36.         echo  "        
  37.            <label for='{$num_fatt}'>Fattura Numero:</br></label>
  38.             <input type='integer' name='{$num_fatt}' value='' /input>
  39.             </br></br>";
  40. }
  41. ?>
  42. <?php
  43.     function makeDateInputField($data_fatt) {
  44.         $date = ucfirst($data_fatt);       
  45.         echo
  46.            " <label for='$data_fatt'>Data:</br></label>
  47.            <input type='date' name='{$data_fatt}' value='' /input>
  48.             </br></br>   ";
  49. }
  50. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement