dongwen7187 2012-07-04 13:51
浏览 195
已采纳

创建发票(php)

i'm creating ERP system to work with my pharmacy. in the billing form of that system i want to add items and print a bill. i have a little problem, where could i hold my 1st items information while i'm adding a second item to it.. my billing form is like this ( only a dummy)

<table width="490" height="282" border="0">
    <tr>
      <td width="206">Date</td>
      <td width="160">&nbsp;</td>
      <td width="47">&nbsp;</td>
      <td width="69">&nbsp;</td>
    </tr>
    <tr>
      <td>Bill Number</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Item Code</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Item Name</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Expier Date</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Item Price</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>Each</td>
      <td>Total</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><input type="submit" name="adnother" id="adnother" value="add another item" tabindex="5" /></td>
      <td><input type="submit" name="submit" id="submit" value="Submit" /></td>
      <td>&nbsp;</td>
    </tr>
  </table>

while adding items to this form one by one, i want those items to be shown in a separate window on the same page (printable version of the bill) any way i can do it. the big problem i have is the thing that i said earlier. {sorry for my bad english :P }

  • 写回答

4条回答 默认 最新

  • dongliulu1122 2012-07-04 13:54
    关注

    You can store in a session, or in a database, or any other mechanism PHP offers to persist data between requests. See PHP manual for sessions.

    Regarding window - you can simply have one page, show the table, and have the form open in other browser window, using JavaScript's window.open(...) method.

    You will probably want to refresh the bill window when the adding window is submitted - see window.onclose() and window.refresh()

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 WPF 大屏看板表格背景图片设置
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示