ساعدوني مو عاارفه وشلون انشئ زر طباعه في الصفحه
حصلت هذا الكود مو عاارفه صح او لا
<input type=button onclick="window.print()" value='Print this page'>
ومو عاارفه وين اوضعه الكود
وهذا كود الصفحة
<?php
$conn1=odbc_connect('dsn_oracledb','SYSTEM','SYSTEM');
if (!$conn1)
{exit("Connection Failed: " . $conn1);}
$sql="SELECT * FROM d_st_acd";
$rs=odbc_exec($conn1,$sql);
if (!$rs)
{exit("Error in SQL");}
echo "<table width='100%' border='2'><tr>";
echo "<th>id</th>";
echo "<th>name</th>";
echo "<th>fathername</th>";
echo "<th>familyname</th>";
echo "<th>doe</th>";
echo "<th>nationality</th>";
echo "<th>college</th>";
echo "<th>department</th>";
echo "<th>level_no</th>";
echo "<th>group_no</th>";
echo "<th>course</th>";
echo "<th>hours</th>";
echo "<th>cours_code</th>";
echo "<th>time_of_course</th>";
echo "<th>room_no</tr>";
while (odbc_fetch_row($rs))
{
$id=odbc_result($rs,"id");
$name=odbc_result($rs,"name");
$fathername=odbc_result($rs,"fathername");
$familyname=odbc_result($rs,"familyname");
$doe=odbc_result($rs,"doe");
$nationality=odbc_result($rs,"nationality");
$college=odbc_result($rs,"college");
$department=odbc_result($rs,"department");
$level_no=odbc_result($rs,"level_no");
$group_no=odbc_result($rs,"group_no");
$course=odbc_result($rs,"course");
$hours=odbc_result($rs,"hours");
$cours_code=odbc_result($rs,"cours_code");
$time_of_course=odbc_result($rs,"time_of_course");
$room_no=odbc_result($rs,"room_no");
echo "<tr><td>$id</td>";
echo "<td>$name</td>";
echo "<td>$fathername</td>";
echo "<td>$familyname</td>";
echo "<td>$doe</td>";
echo "<td>$nationality</td>";
echo "<td>$college</td>";
echo "<td>$department</td>";
echo "<td>$level_no</td>";
echo "<td>$group_no</td>";
echo "<td>$course</td>";
echo "<td>$hours</td>";
echo "<td>$cours_code</td>";
echo "<td>$time_of_course</td>";
echo "<td>$room_no</td></tr>";
}
odbc_close($conn1);
echo "</table>";
?>