How to create a printable report using html and css -


i'm trying create form user can input data into, save data db, print report. none of reasearch online has yielded fruit. i've googled "printable html template", "how print html", "how achieve 'wysiwyp'", etc. nothing. read media queries, have yet research concept much. thoughts appreciated. regards, jon

this php / html snippet trick:

<?php if(isset($_post) && count($_post > 0)) {     $servername = "localhost";     $username = "username";     $password = "password";     $dbname = "mydb";      $conn = new mysqli($servername, $username, $password, $dbname);     if ($conn->connect_error) {         die("connection failed: " . $conn->connect_error);     }      $sql = "insert mytable (mycol) values ('". $_post['myvar'] ."')";     $conn->query($sql)     echo "successfully inserted data ". $_post['myvar'] ." column mycol"; } ?>  <html>     <body>         <form action="index.php" method="post">             <input type="text" name="myvar" >             <input type="submit" >         </form>     </body> </html> 

put in database details, save file index.php on web server (xampp example if you're using windows) , execute opening file web browser.


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -