Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7932965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T21:10:48+00:00 2026-06-03T21:10:48+00:00

i have a table has php variables fetched from mysql , the table is

  • 0

i have a table has php variables fetched from mysql , the table is inside a Form , what i am trying to do is to display page to be printed for the user with a an invoice style layout, i tried to make a behavior that when the FORM Is submitted , a pop up page will come display the php variables data , which is doesn’t work at all , i tried to display the content of popup page inside a regluar page , it worked ! , which means there is no problem with my php code .

here is the form page code :

<form action="../../printInvoice.php" method="post" onsubmit="MM_openBrWindow('../../printInvoice.php','Invoice','status=yes,scrollbars=yes')">
<table width="100%" border="0">
<tr>
    <td align="left">Invoice:</td>
  </tr>
  <tr>
    <td width="12%" height="39" bgcolor="#9DE3FB" align="center">Invoice Number</td>
    <td width="12%" bgcolor="#9DE3FB" align="center">Event Name</td>
    <td width="12%" bgcolor="#9DE3FB" align="center">Reservation Date</td>
    <td width="12%" bgcolor="#9DE3FB" align="center">Quantity</td>
    <td width="12%" bgcolor="#9DE3FB" align="center">Price Per Ticket</td>
    <td width="12%" bgcolor="#9DE3FB" align="center">Total Price</td>
  </tr>
  <tr>
    <td width="12%" height="39" align="center"><input type="text" name="invoiceId" readonly="readonly" value="<? echo $row['invoiceId']; ?>" class ="field-style"/></td>
    <td width="12%" height="39" align="center"><input type="text" name="eventTitle" readonly="readonly" value="<? echo $row['name']; ?>" class="field-style" /></td>
    <td width="12%" height="39" align="center"><input type="text" name="invoiceDate" readonly="readonly" value="<? echo $row['invoiceDate']; ?>" class="field-style" /></td>
    <td width="12%" height="39" align="center"><input type="text" name="invoiceqty" readonly="readonly" value="<? echo $row['quantity'] ?>" class="field-style" /></td>
    <td width="12%" height="39" align="center"><input type="text" name="invoicePPU" readonly="readonly" value="<? echo $row['price']; ?>" class="field-style" /></td>
    <td width="12%" height="39" align="center"><input type="text" name="invoiceTotal" readonly="readonly" value="<? echo $row['totalPrice']; ?>" class="field-style" /></td>
  </tr>
</table>
<br />
<input type="submit" value="Print Invoice" />
</form>

here is the popup window code (invoice layout to print ):

<table width="65%" border="1" cellspacing="5" cellpadding="5">
  <tr>
    <td colspan="5"><table width="100%" border="0" cellspacing="5" cellpadding="5">
      <tr>
        <td width="60%"><img src="images/Logo.png" /></td>
        <td width="40%"><p>Invoice No:# <? echo $invoiceId; ?></p>
          <p>Invoice Date: <? echo $invoiceDate ;?> </p></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="125" colspan="5" valign="top"><p>Bill To:</p>
    <p>Name:</p>
    <p>Address:</p></td>
  </tr>
  <tr>
    <td width="12%" align="center" height="40">Item Id</td>
    <td width="28%" align="center">Item Disc</td>
    <td width="9%" align="center">QTY</td>
    <td width="40%" align="center">Price Per Unit</td>
    <td width="11%" align="center">Total</td>
  </tr>
  <tr>
    <td align="center" valign="middle">1</td>
    <td align="center" valign="middle"><? echo $eventTitle . " ticket(s)"; ?></td>
    <td align="center" valign="middle"><? echo $invoiceqty ; ?></td>
    <td align="center" valign="middle"><? echo $invoicePPU ; ?></td>
    <td align="center" valign="middle"><? echo $invoiceqty * $invoicePPU ; ?></td>
</tr>
 </table>

for submitting behavior, i used Dreamweaver behavior panel. what’s wrong here ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T21:10:49+00:00Added an answer on June 3, 2026 at 9:10 pm

    I’m not sure about dreamweaver behaviour but as far as I can tell this will never work.

    You are posting the data to a the “../../printInvoice.php” but when you request the popup page you are opening a new instance that hasn’t received the post data.

    You need to alter your javascript that pops the page up so that it posts the forms data when it performs the popup request.

    I don’t know which library you are using to create your popup but fancybox (Jquery plugin: http://fancybox.net) allows you to post data to the popup it creates.

    If you could tell me what popup library you are using I might be able to help further.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table which is being dynamically populated from MySQL. The table has
I have a MySQL table which contains page content, each line of content has
I have a php variable: $foo My MySQL table called data has the following
I have a table that stores user information. The table has a userid (identity)
I'm currently learning PHP and MySQL and I have been working from a basic
I am using php to get some data from mysql table. The table returns
Let's set the stage, PHP & MYSQL: I have a table we'll call Directions
I have a form in a PHP sending variables to a PHP file which
So I have a mysql table which has a id column (sid) that can
i have a table called as X and this table has a field known

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.