Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $username="root";
- $password="";
- $database="wctif";
- mysql_connect("localhost",$username,$password);
- @mysql_select_db($database) or die( "Unable to select database");
- ?>
- <html>
- <head>
- <title>Print</title>
- <style type="text/css">
- *
- {
- font-family:Arial, Helvetica, sans-serif;
- font-size:10pt;
- }
- .heading
- {
- font-weight:bold;
- }
- </style>
- </head>
- <body>
- <h2>Printing</h2>
- <?
- // Run through the post data and retrieve the IDs we're pulling out of the database
- foreach($_POST['print'] as $id)
- {
- $query = "SELECT * FROM `data` WHERE `ID` = ".$id;
- $res = mysql_query($query);
- $row = mysql_fetch_assoc($res);
- echo "ERror: ".mysql_error();
- ?>
- <h3>Print Date: <?=date("m-d-Y")?></h3>
- <table>
- <tr>
- <td class="heading">Student Name</td>
- <td><?php echo $row['field_1'];?></td>
- <td class="heading">Date</td>
- <td><?php $row['field_2'];?></td>
- </tr>
- <tr>
- <td class="heading">Course</td>
- <td><?php $row['field_3'];?></td>
- <td class="heading">Assignment Name</td>
- <td><?php $row['field_4'];?></td>
- </tr>
- <tr>
- <td class="heading">Course Instructor</td>
- <td><?php $row['field_8'];?></td>
- <td class="heading">Tutor Name</td>
- <td><?php $row['field_7'];?></td>
- </tr>
- <tr>
- <td class="heading">Start Time</td>
- <td><?php $row['field_5'];?></td>
- <td class="heading">End Time</td>
- <td><?php $row['field_6'];?></td>
- </table>
- <h3>Student request help with</h3>
- <p><i><?php $row['field_10'];?></i></p>
- <p><?php $row['field_12'];?></p>
- <h3>Other</h3>
- <p><?php $row['field_11'];?></p>
- <p><i>Please review and sign acknowledging that the student visited the writing center with work pertaining to your course listed above. Return signed form to writing center director.</i></p>
- <br>
- <p><b>Signature:</b>______________________________</p>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br style="page-break-after: always">
- <?
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement