Php window.open打印并通过数据库调用字段

Php window.open打印并通过数据库调用字段,php,click,row,window.open,Php,Click,Row,Window.open,对不起,我没有这个问题的具体标题 我想用window.open方法打印表单,这是一段脚本: <?php include "connect.php"; $test = mysql_query("select * from dataorder order by idorder desc limit 1 "); if (!test) die ("Error... " .mysql_error()); while ($row = mysql_fetch_array ($test)) { e

对不起,我没有这个问题的具体标题

我想用window.open方法打印表单,这是一段脚本:

<?php
include "connect.php";

$test = mysql_query("select * from dataorder order by idorder desc limit 1 ");


if (!test)
die ("Error... " .mysql_error());

while ($row = mysql_fetch_array ($test))
{
echo "ID number   : $row[idorder] <br/><br/>";
echo "Name        : $row[name] <br/><br/>";  
echo "<div>";
echo "<input  type=button name=back    value='back'onClick='parent.location='reserve.php''>";   
echo '<input  type="submit"
          class="btn btn-success"
          name="print" value="print"
       onClick="window.open("print.php?idorder="'.$row['idorder'].'","scrollwindow","top=200,left=350,width=680px,height=500")" 
        style="text-decoration:none">';
echo "</div>";
}
?>


“打印”按钮可以出现,但单击时没有响应。

我认为您有多个报价问题(加上空格问题),这会妨碍
onClick
正常工作-

echo "<input  type=button name=back    value='back'onClick='parent.location='reserve.php''>"; 
                  ^      ^    ^    ^              ^                                      ^
echo '<input  type="submit"
      class="btn btn-success"
      name="print" value="print"
   onClick="window.open("print.php?idorder="'.$row['idorder'].'","scrollwindow","top=200,left=350,width=680px,height=500")"
                        ^                  ^                   ^ ^            ^ ^                                       ^ 
    style="text-decoration:none">';
echo”“;
^      ^    ^    ^              ^                                      ^

echo'我认为您有多个报价问题(加上空格问题),这会妨碍
onClick
正常工作-

echo "<input  type=button name=back    value='back'onClick='parent.location='reserve.php''>"; 
                  ^      ^    ^    ^              ^                                      ^
echo '<input  type="submit"
      class="btn btn-success"
      name="print" value="print"
   onClick="window.open("print.php?idorder="'.$row['idorder'].'","scrollwindow","top=200,left=350,width=680px,height=500")"
                        ^                  ^                   ^ ^            ^ ^                                       ^ 
    style="text-decoration:none">';
echo”“;
^      ^    ^    ^              ^                                      ^
回声'