Delivery address is not adding in pdf invoice in prestashop.
I create a store on prestashop, but in its pdf invoice delivery address is missing.
How can i add the delivery address in the pdf invoice?
Please help me to fix this problem.
<!-- invoicing -->
<tr>
<td colspan="12">
{$addresses_tab}
</td>
</tr>
The delivery address block does not show if delivery address is same as invoice address.
If you want to display this block you can edit the template file invoice.tpl
and replace :
{if !empty($delivery_address)}
<table style="width: 100%">
<tr>
<td style="width: 50%">
<span style="font-weight: bold; font-size: 10pt; color: #9E9F9E">{l s='Delivery Address' pdf='true'}</span><br />
{$delivery_address}
</td>
<td style="width: 50%">
<span style="font-weight: bold; font-size: 10pt; color: #9E9F9E">{l s='Billing Address' pdf='true'}</span><br />
{$invoice_address}
</td>
</tr>
</table>
{else}
<table style="width: 100%">
<tr>
<td style="width: 50%">
<span style="font-weight: bold; font-size: 10pt; color: #9E9F9E">{l s='Billing & Delivery Address.' pdf='true'}</span><br />
{$invoice_address}
</td>
<td style="width: 50%">
</td>
</tr>
</table>
{/if}
with
{if !empty($delivery_address)}
<table style="width: 100%">
<tr>
<td style="width: 50%">
<span style="font-weight: bold; font-size: 10pt; color: #9E9F9E">{l s='Delivery Address' pdf='true'}</span><br />
{$delivery_address}
</td>
<td style="width: 50%">
<span style="font-weight: bold; font-size: 10pt; color: #9E9F9E">{l s='Billing Address' pdf='true'}</span><br />
{$invoice_address}
</td>
</tr>
</table>
{else}
<table style="width: 100%">
<tr>
<td style="width: 50%">
<span style="font-weight: bold; font-size: 10pt; color: #9E9F9E">{l s='Delivery Address' pdf='true'}</span><br />
{$invoice_address}
</td>
<td style="width: 50%">
<span style="font-weight: bold; font-size: 10pt; color: #9E9F9E">{l s='Billing Address' pdf='true'}</span><br />
{$invoice_address}
</td>
</tr>
</table>
{/if}
Related
I need to add product image to my html email template that is custom build by me.
I can not able to find any hook that will add product image to my html email template with below shared code
I'd appreciate it if you helped.
<table style="width: 70%" >
<tr>
<th style="font-weight: normal; width: 24%" >
<p style="margin-left: 30px;">Produkt Artikel :</p>
</th>
<th style="width: 150%; height: 25px;font-weight: normal; text-align: left;" >
<div class="inputt" class="inputt" style="background-color: #e9ecef; padding: 7px; margin-left: 15px;border-radius: 0.55rem; height: 30px;" >
<?php echo $product_name; ?>
</div>
</th>
</tr>
</table>
<table style="width: 70%">
<tr>
<th style="font-weight: normal; width: 22%" >
<p style="margin-left: 30px;">Produktdetail :</p>
</th>
<th style="width: 150%; height: 25px;font-weight: normal; text-align: left;" >
<div class="inputt" style="background-color: #e9ecef; padding: 7px; margin-left: 15px;border-radius: 0.55rem; width: 50%;">
<?php wc_display_item_meta($item, array('label_before' =>esc_attr( $text_align), ) ); ?>
</div>
</th>
</tr>
</table>
<table style="width: 70%" >
<tr>
<th style="font-weight: normal; width: 22%" >
<p style="margin-left: 30px;">Vorname : </p>
</th>
<th style="width: 30%; height: 25px;font-weight: normal; text-align: left;" >
<div class="inputt" class="inputt" style="background-color: #e9ecef; padding: 7px; margin-left: 15px;border-radius: 0.55rem; height: 30px;" >
<?php echo wp_kses_post( wptexturize( $order->get_billing_first_name() ) ); ?>
</div>
</th>
<th style="font-weight: normal; width: 22%" >
<p style="margin-left: 30px;">Nachname :</p>
</th>
<th style="width: 150%; height: 25px;font-weight: normal; text-align: left;" >
<div class="inputt" class="inputt" style="background-color: #e9ecef; padding: 7px; margin-left: 15px;border-radius: 0.55rem; height: 30px;" >
<?php echo wp_kses_post( wptexturize( $order->get_billing_last_name() ) ); ?>
</div>
</th>
</tr>
</table>
Well I have been at this for hours now. I'm using HTML2PDF to generate an invoice. My program creates a temporary invoice without issue. The issue I'm having is once the program tries to create a PDF from the temp file I'm getting an error:
ERROR n°5
File : /home/x/public_html/office/cron/invoices/php-pdf/_class/parsingHtml.class.php
Line : 218
HTML code invalid, all tags must be closed.
Status :
Array
(
[0] => page
[1] => table
[2] => tr
[3] => td
[4] => table
[5] => tr
[6] => td
)
I understand its saying all the HTML tags have not been closed. I've validated my code many different times, many different ways and sites and all are returning valid. I had some style issues that have been fixed but I still have no luck. My html is as follows:
<!doctype html>
<html>
<head>
<title>Untitled Document</title>
<style>
<!--
body {font-family:Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;}
.center {text-align:center;}
.ltgray {color:#C5C5C5;}
.invoice {vertical-align:text-top;}
.gbk td {background-color:#EDEBEB; border:none; font-size:13px; padding-bottom:8px; padding-top:8px; padding-left:10px}
.btboader { border-bottom:thin dotted; border-color:#E4E2E2; padding-bottom:8px; padding-top:8px; padding-left:10px }
.ltgrayt {color:#969696;}
.center {align-content:center; font-size:12px; font-weight:bold;}
.db {border:thin dotted; background-color:#EDEBEB;}
.padded {padding-left:15px;}
.hr { border: 0; height: 1px; background-image: -webkit-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.75), rgba(0,0,0,0)); background-image: -moz-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.75), rgba(0,0,0,0)); background-image: -ms-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.75), rgba(0,0,0,0)); background-image: -o-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.75), rgba(0,0,0,0)); }
-->
</style>
</head>
<body>
<table style="width: 100%">
<tr>
<td class="invoice"><h2 class="ltgray">Invoice</h2> </td>
<td style="float: right">
<table>
<tr>
<td>Date:</td> <td> 03/12/2015</td>
</tr>
<tr>
<td>Invoice #:</td> <td> 100367</td>
</tr>
<tr>
<td> Propery </td> <td> N/a </td>
</tr>
</table>
</td>
</tr>
</table>
<p></p>
<table style="width: 95%; margin: 0 auto;">
<tr>
<td style="width: 50%"><span class="ltgray">Company Information</span><br />
<strong>XXX</strong><br />XXXX<br />XXXX</td>
<td style="width: 50%"><span class="ltgray">Customer Information</span><br />
<strong>XXXX</strong><br />XXXX<br />
XXXX<br />XXXX<br />Phone: XXXX<br />Email: XXXX</td>
</tr>
</table>
<br /><p></p>
<table style="width: 100%" class="tbl">
<tr class="gbk">
<td style="width: 60%"><strong>Item</strong></td>
<td style="width: 15%"><strong>Price</strong></td>
<td style="width: 10%"><strong>Qty</strong></td>
<td style="width: 15%; margin: 0 auto;"> <strong>Total</strong> </td>
</tr>
<tr>
<td style="width: 60%" class="btboader">Mulch - Red</td>
<td style="width: 15%" class="btboader">$2.50</td>
<td style="width: 10%" class="btboader">153</td>
<td style="width: 15%; margin: 0 auto;" class="btboader">$382.50</td>
</tr>
<tr>
<td style="width: 60%" class="btboader">Mulch - Black</td>
<td style="width: 15%" class="btboader">$3.50</td>
<td style="width: 10%" class="btboader">1</td>
<td style="width: 15%; margin: 0 auto;" class="btboader">$3.50</td>
</tr>
<tr>
<td style="width: 60%" class="btboader">Mulch - Brown<br><small>Bagged mulch, price includes delivery - Total 2 1/2 pallets</small> </td>
<td style="width: 15%" class="btboader">$3.50</td>
<td style="width: 10%" class="btboader">160</td>
<td style="width: 15%; margin: 0 auto;" class="btboader">$560.00</td>
</tr>
<tr>
<td colspan="2">
<table style="width: 100%">
<tr>
<td style="width: 20%">Payment Terms:</td>
<td style="width: 80%">Due On Receipt</td>
</tr>
<tr>
<td style="width: 50%">Discount(%):</td>
<td style="width: 50%">10.0</td>
</tr>
<tr>
<td style="width: 50%">Past Due Amount:</td>
<td style="width: 50%">$0.00</td>
</tr>
</table>
</td>
<td colspan="2">
<table style="width: 100%">
<tr>
<td style="width: 50%" class="ltgrayt">Subtotal:</td>
<td style="width: 50%; float: right;">$946.00</td>
</tr>
<tr>
<td style="width: 50%" class="ltgrayt">Tax (6.5%):</td>
<td style="width: 50%; float: right;"> $0.00</td>
</tr>
<tr>
<td style="width: 50%" class="ltgrayt">Discount:</td>
<td style="width: 50%; float: right;"> $94.60</td>
</tr>
<tr>
<td style="width: 50%" class="ltgrayt">Past Due:</td>
<td style="width: 50%; float: right;"><strong> $0.00 </strong></td>
</tr>
<tr>
<td style="width: 50%" class="ltgrayt">Total:</td>
<td style="width: 50%; float: right;"><strong> $851.40 </strong></td>
</tr>
</table>
</td>
</tr>
</table>
<br /><br />
<table class="db" style="width: 80%; margin: 0 auto;">
<tr>
<td><strong class="padded"><small>Order Notes:</small></strong><br /><p class="padded">Thank you for your business!</p>
</td>
</tr>
</table>
<hr class="hr">
<p class="center">XXXX, XXXX, XXXX - Phone: XXXX - Direct Cell: XXXX Email:XXXX<br />
Please make checks payable to: XXXX</p>
</body>
</html>
What am I missing that's causing this error? The only other thing I could think of is that HTML2PDF doesn't support something in my styling. I use HTML2PDF for another project without issue so Im not sure where I made a wrong turn.
I am getting a strange issue in a website.
I have a domain (e.g. http://exaple.com.PQR.co.uk) on which I have built a website using PHP.
Website working fine but issue is in sending email.
I trying to send HTML email as below example ::
<html lang="en"><head><meta charset="utf-8"></head>
<body>
<table style="width: 100%; border: none; border-collapse: collapse;">
<tbody>
<tr>
<td style="border: none; background-color: #000; padding: 15px; color:#fff; width: 70px;">
<a href="#" style="border:none;">
<img src="**http://www.example.com.PQR.co.uk/**webservices/icon-70.png" width="70" height="70">
</a>
</td>
<td style="border: none; background-color: #000; padding: 15px; color:#fff; font-size: 40px;">
ABC
</td>
</tr>
<tr>
<td colspan="2" style="background-color: #EEEEEE; color: #000; padding: 10px;">
Hello User, <br><br>
Your account details are as below:<br/><br/>
Email ID : test.example#gmail.com<br/>
Password : Click here to change password.<br/>
</td>
</tr>
<tr>
<td colspan="2" style="background-color: #EEEEEE; color: #000; padding: 10px;">
Thanks,<br/>
ABC Team
</td>
</tr>
<tr>
<td colspan="2" style="background-color: #EC008C; padding:5px;">
</td>
</tr>
</tbody>
</table>
</body>
</html>
This email does not send successfully but mail() returns TRUE.
When I tries to send same email by changing domain to "example.com" instead of "www.example.com.PQR.co.uk" then it works but with "www.example.com.PQR.co.uk" its not working.
Please guide me for this issue. I am not getting where issue is.
Thanks in advance
I updated from dompdf 0.5 to 0.6 b3 in order to get better support of some CSS I'd like to
use when generating a PDF in an application.
In the old code version, my current page generation worked fine - one table spanned multiple pages with no problem.
But in the new version, DOMPDF hangs once the code tries to generate a PDF where a table spans onto another page.
My error logs give me
PHP Fatal error: Maximum execution time of 60 seconds exceeded in
../sfDomPDFPlugin/lib/dompdf/include/frame.cls.php on line 374...
I figure it's a CSS rule, but I'm not clear on what it might be. Suggestions?
Update: Here's some example code that fails. I had to cut it down a bit,
but it includes you all of the relevant tags.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>PDF</title>
<style type="text/css">
body
{
font-family: Helvetica, Arial, sans-serif;
background-image: url('/images/draft_watermark_small.png');
}
th {
font-size: 8pt;
}
#sf_admin_container ul, #sf_admin_container ol, #sf_admin_container li, #sf_admin_container h1, #sf_admin_container h2, #sf_admin_container h3, #sf_admin_container h4, #sf_admin_container h5, #sf_admin_container h6, #sf_admin_container pre, #sf_admin_container form, #sf_admin_container body, #sf_admin_container html, #sf_admin_container p, #sf_admin_container blockquote, #sf_admin_container fieldset, #sf_admin_container input { margin: 0; padding: 0; }
#sf_admin_container a img,:link img,:visited img { border: none; }
#sf_admin_container td
{
margin: 0;
font-family: Helvetica, Arial, sans-serif;
font-size: 8px;
background-color: #fff;
padding: 2px;
}
#sf_admin_container p
{
margin-bottom: 5px;
}
#sf_admin_container h1
{
margin: 2px 0pt;
padding: 3px;
padding-left: 0px;
color: #555;
font-family: Helvetica, Arial, Verdana, sans-serif;
font-size: 22px;
}
#sf_admin_container .sf_admin_default_action
{
background-color: #fc6 !important;
font-weight: bold !important;
}
#sf_admin_container .sf_admin_list
{
width: 100%;
border: 1px solid #000;
border-bottom: 1px;
border-right: 1px;
border-collapse: collapse;
}
#sf_admin_container .sf_admin_list th
{
color: #fff;
padding: 2px;
background-color: #900;
text-align: left;
}
#sf_admin_container .sf_admin_list th a
{
color: #333;
}
#sf_admin_container .sf_admin_list td
{
padding: 2px;
border-bottom: 1px solid #000;
border-right: 1px solid #000;
}
#sf_admin_container .sf_admin_filters li
{
list-style-type: none;
}
#sf_admin_container .sf_admin_row_0 td
{
background-color: #eee;
}
#sf_admin_container .sf_admin_row_1 td
{
border-bottom: 1px solid #FFF;
background-color: #EEF;
}
#sf_admin_container .sf_admin_row_2 td
{
}
#sf_admin_container .sf_admin_row_total td
{
border: 2px solid #000;
}
#sf_admin_container #heading
{
color: #fff;
background-color: #900;
padding: 3px;
font-size: 14pt;
font-weight: bold;
text-align: center;
}
#sf_admin_container #heading-bold
{
font-weight: bold;
}
#sf_admin_container #heading-total
{
color: #fff;
padding: 2px;
background-color: #900;
text-align: left;
}
div.wysiwyg-view h1
{
font-size: 2em; margin: .67em 0;
background-color: transparent !important;
color: #000 !important;
}
div.wysiwyg-view h2
{
font-size: 1.5em; margin: .75em 0;
background-color: transparent !important;
color: #000 !important;
}
div.wysiwyg-view h3
{
font-size: 1.17em; margin: .83em 0;
background-color: transparent !important;
color: #000 !important;
}
div.wysiwyg-view ol, ul, dir,
menu, dd { margin-left: 40px !important;}
div.wysiwyg-view ol { list-style-type: decimal !important; }
div.wysiwyg-view ol ul, ul ol,
ul ul, ol ol { margin-top: 0; margin-bottom: 0; }
div.wysiwyg-view blockquote { margin-left: 40px !important; margin-right: 40px !important;}
#watermark { position: fixed; bottom: 0px; right: 0px; width: 200px; height: 200px; opacity: .5; }
</style>
</head>
<body>
<div id="sf_admin_container">
<table width="100%">
<tbody>
<tr>
<td>
<img width="500" src="https://test-quote.expedient.com/images/expedient-logo-010313.png">
</td>
<td width="40%" style="border: 1px solid #000;vertical-align: top;padding: 0px;">
<div id="heading" style="font-size: 14pt;vertical-align: top;"> Quotation # 40414 </div>
<br>
<div style="left: 2px;position: relative;">
1050 Hull Street
<br>
Baltimore, MD 21230
<br>
Phone: 410-209-6700
<br>
www.datapointinc.com
<br>
<br>
Date: 03/14/13
</div>
</td>
</tr>
<tr>
<td colspan="2">
<table class="sf_admin_list" width="100%">
<tbody>
<tr>
<td id="heading" width="100%" colspan="6">
<b>Sample Quote</b>
</td>
</tr>
<tr>
<td id="heading-bold" width="40%">
<center> QUOTED FOR </center>
</td>
<td id="heading-bold" width="12%">
<center> SALES REP </center>
</td>
<td id="heading-bold" width="12%">
<center> SALES ENGINEER </center>
</td>
<td id="heading-bold" width="12%">
<center> CONTRACT TERM </center>
</td>
<td id="heading-bold" width="12%">
<center> TERMS </center>
</td>
<td id="heading-bold" width="12%">
<center> EST. DELIVERY </center>
</td>
</tr>
<tr>
<td>
<center> CeraTech (Kim Shumaker) </center>
</td>
<td>
<center> Geoffrey Maddock </center>
</td>
<td>
<center> Brian Willis </center>
</td>
<td>
<center> 36 Months</center>
</td>
<td>
<center> Net 30</center>
</td>
<td>
<center> 3.00 weeks </center>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table class="sf_admin_list">
<tbody>
<tr>
<th style="width: 1em;">
<center>SKU</center>
</th>
<th style="width: 1em;">
<center>Type</center>
</th>
<th style="width: 1em;">
<center>Quantity</center>
</th>
<th>Name</th>
<th style="width: 4em;">
<center>Unit</center>
</th>
<th style="width: 4em;">
<center>One Time Costs</center>
</th>
<th style="width: 4em;">
<center>Monthly Recurring Cost</center>
</th>
</tr>
<tr>
<td id="topmenu" style="background-color: #ccc;text-align:center;" colspan="7">Cleveland (151)</td>
</tr>
<tr>
<td id="submenu" style="background-color: #ddd;text-align:center;" colspan="7">Managed Virtualization</td>
</tr>
<tr class="sf_admin_row_1">
<td width="25px">
<div style="text-align: center;"> 1 </div>
</td>
<td width="25px">
<div style="text-align: center;"> New </div>
</td>
<td width="25px">
<div style="text-align: center;"> 1 </div>
</td>
<td>
<div>
<b>Enterprise Virtual Instance - Level 1</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_sale_unit_396047">
<b>0.00</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_nrp_total_396047">
<b></b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_mrp_total_396047">
<b>0.00</b>
</div>
</td>
</tr>
<tr class="sf_admin_row_2">
<td width="25px"> </td>
<td width="25px"> </td>
<td width="25px"> </td>
<td>
<div id="lineitem_detail_396047" style="color:#333; text-indent: 10px;"> 1Ghz Peak, .5Ghz Average CPU; 1GB RAM</div>
</td>
<td width="50px"> </td>
<td width="50px"> </td>
<td width="50px"> </td>
</tr>
<tr class="sf_admin_row_1">
<td width="25px">
<div style="text-align: center;"> 1 </div>
</td>
<td width="25px">
<div style="text-align: center;"> New </div>
</td>
<td width="25px">
<div style="text-align: center;"> 1 </div>
</td>
<td>
<div>
<b>Enterprise Virtual Instance - Level 1</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_sale_unit_396051">
<b>0.00</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_nrp_total_396051">
<b></b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_mrp_total_396051">
<b>0.00</b>
</div>
</td>
</tr>
<tr class="sf_admin_row_2">
<td width="25px"> </td>
<td width="25px"> </td>
<td width="25px"> </td>
<td>
<div id="lineitem_detail_396051" style="color:#333; text-indent: 10px;"> 1Ghz Peak, .5Ghz Average CPU; 1GB RAM</div>
</td>
<td width="50px"> </td>
<td width="50px"> </td>
<td width="50px"> </td>
</tr>
<tr class="sf_admin_row_1">
<td width="25px">
<div style="text-align: center;"> 2 </div>
</td>
<td width="25px">
<div style="text-align: center;"> New </div>
</td>
<td width="25px">
<div style="text-align: center;"> 1 </div>
</td>
<td>
<div>
<b>Enterprise Virtual Instance Level 1 - Installation</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_sale_unit_396048">
<b>0.00</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_nrp_total_396048">
<b>0.00</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_mrp_total_396048">
<b> </b>
</div>
</td>
</tr>
<tr class="sf_admin_row_2">
<td width="25px"> </td>
<td width="25px"> </td>
<td width="25px"> </td>
<td>
<div id="lineitem_detail_396048" style="color:#333; text-indent: 10px;"> Per Virtual Instance. Setup and Configuration of Virtual Instance(2 Hours Maximum)</div>
</td>
<td width="50px"> </td>
<td width="50px"> </td>
<td width="50px"> </td>
</tr>
<tr class="sf_admin_row_1">
<td width="25px">
<div style="text-align: center;"> 2 </div>
</td>
<td width="25px">
<div style="text-align: center;"> New </div>
</td>
<td width="25px">
<div style="text-align: center;"> 1 </div>
</td>
<td>
<div>
<b>Enterprise Virtual Instance Level 1 - Installation</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_sale_unit_396049">
<b>0.00</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_nrp_total_396049">
<b>0.00</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_mrp_total_396049">
<b> </b>
</div>
</td>
</tr>
<tr class="sf_admin_row_2">
<td width="25px"> </td>
<td width="25px"> </td>
<td width="25px"> </td>
<td>
<div id="lineitem_detail_396049" style="color:#333; text-indent: 10px;"> Per Virtual Instance. Setup and Configuration of Virtual Instance(2 Hours Maximum)</div>
</td>
<td width="50px"> </td>
<td width="50px"> </td>
<td width="50px"> </td>
</tr>
<tr class="sf_admin_row_1">
<td width="25px">
<div style="text-align: center;"> 4 </div>
</td>
<td width="25px">
<div style="text-align: center;"> New </div>
</td>
<td width="25px">
<div style="text-align: center;"> 1 </div>
</td>
<td>
<div>
<b>Enterprise Virtual Instance Level 2 - Installation</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_sale_unit_396050">
<b>0.00</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_nrp_total_396050">
<b>0.00</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_mrp_total_396050">
<b> </b>
</div>
</td>
</tr>
<tr class="sf_admin_row_2">
<td width="25px"> </td>
<td width="25px"> </td>
<td width="25px"> </td>
<td>
<div id="lineitem_detail_396050" style="color:#333; text-indent: 10px;"> Per Virtual Instance. Setup and Configuration of Virtual Instance(2 Hours Maximum)</div>
</td>
<td width="50px"> </td>
<td width="50px"> </td>
<td width="50px"> </td>
</tr>
<tr class="sf_admin_row_1">
<td width="25px">
<div style="text-align: center;"> 5 </div>
</td>
<td width="25px">
<div style="text-align: center;"> New </div>
</td>
<td width="25px">
<div style="text-align: center;"> 1 </div>
</td>
<td>
<div>
<b>Enterprise Virtual Instance - Level 3</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_sale_unit_396052">
<b>0.00</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_nrp_total_396052">
<b></b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_mrp_total_396052">
<b>0.00</b>
</div>
</td>
</tr>
<tr class="sf_admin_row_2">
<td width="25px"> </td>
<td width="25px"> </td>
<td width="25px"> </td>
<td>
<div id="lineitem_detail_396052" style="color:#333; text-indent: 10px;"> 3Ghz Peak, 1.5Ghz Average CPU; 3GB RAM</div>
</td>
<td width="50px"> </td>
<td width="50px"> </td>
<td width="50px"> </td>
</tr>
<tr>
<td id="topmenu" style="background-color: #ccc;text-align:center;" colspan="7">Baltimore - 1050 Hull St.</td>
</tr>
<tr>
<td id="submenu" style="background-color: #ddd;text-align:center;" colspan="7">Managed Virtualization</td>
</tr>
<tr class="sf_admin_row_1">
<td width="25px">
<div style="text-align: center;"> 7 </div>
</td>
<td width="25px">
<div style="text-align: center;"> New </div>
</td>
<td width="25px">
<div style="text-align: center;"> 1 </div>
</td>
<td>
<div>
<b>Enterprise Virtual Instance - Level 4</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_sale_unit_396024">
<b>0.00</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_nrp_total_396024">
<b></b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_mrp_total_396024">
<b>0.00</b>
</div>
</td>
</tr>
<tr class="sf_admin_row_2">
<td width="25px"> </td>
<td width="25px"> </td>
<td width="25px"> </td>
<td>
<div id="lineitem_detail_396024" style="color:#333; text-indent: 10px;"> 4Ghz Peak, 2Ghz Average CPU; 4GB RAM (File)</div>
</td>
<td width="50px"> </td>
<td width="50px"> </td>
<td width="50px"> </td>
</tr>
<tr class="sf_admin_row_1">
<td width="25px">
<div style="text-align: center;"> 8 </div>
</td>
<td width="25px">
<div style="text-align: center;"> New </div>
</td>
<td width="25px">
<div style="text-align: center;"> 1 </div>
</td>
<td>
<div>
<b>Enterprise Virtual Instance Level 4 - Installation</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_sale_unit_396025">
<b>0.00</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_nrp_total_396025">
<b>0.00</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_mrp_total_396025">
<b> </b>
</div>
</td>
</tr>
<tr class="sf_admin_row_2">
<td width="25px"> </td>
<td width="25px"> </td>
<td width="25px"> </td>
<td>
<div id="lineitem_detail_396025" style="color:#333; text-indent: 10px;"> Per Virtual Instance. Setup and Configuration of Virtual Instance(2 Hours Maximum)</div>
</td>
<td width="50px"> </td>
<td width="50px"> </td>
<td width="50px"> </td>
</tr>
<tr class="sf_admin_row_1">
<td width="25px">
<div style="text-align: center;"> 396 </div>
</td>
<td width="25px">
<div style="text-align: center;"> New </div>
</td>
<td width="25px">
<div style="text-align: center;"> 1 </div>
</td>
<td>
<div>
<b>Enterprise Virtual Instance - Level 8</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_sale_unit_396045">
<b>0.00</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_nrp_total_396045">
<b></b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_mrp_total_396045">
<b>0.00</b>
</div>
</td>
</tr>
<tr class="sf_admin_row_2">
<td width="25px"> </td>
<td width="25px"> </td>
<td width="25px"> </td>
<td>
<div id="lineitem_detail_396045" style="color:#333; text-indent: 10px;"> 8Ghz Peak, 4Ghz Average CPU; 8GB RAM</div>
</td>
<td width="50px"> </td>
<td width="50px"> </td>
<td width="50px"> </td>
</tr>
<tr>
<td id="submenu" style="background-color: #ddd;text-align:center;" colspan="7">Shared Managed Firewall</td>
</tr>
<tr class="sf_admin_row_1">
<td width="25px">
<div style="text-align: center;"> 168 </div>
</td>
<td width="25px">
<div style="text-align: center;"> New </div>
</td>
<td width="25px">
<div style="text-align: center;"> 1 </div>
</td>
<td>
<div>
<b>Managed Firewall - Level 2</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_sale_unit_396030">
<b>0.00</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_nrp_total_396030">
<b></b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_mrp_total_396030">
<b>0.00</b>
</div>
</td>
</tr>
<tr class="sf_admin_row_2">
<td width="25px"> </td>
<td width="25px"> </td>
<td width="25px"> </td>
<td>
<div id="lineitem_detail_396030" style="color:#333; text-indent: 10px;"> 3 Mbps Sustained Bandwidth, 2 VLAN's, Up to 20 Rules</div>
</td>
<td width="50px"> </td>
<td width="50px"> </td>
<td width="50px"> </td>
</tr>
<tr class="sf_admin_row_1">
<td width="25px">
<div style="text-align: center;"> 169 </div>
</td>
<td width="25px">
<div style="text-align: center;"> New </div>
</td>
<td width="25px">
<div style="text-align: center;"> 1 </div>
</td>
<td>
<div>
<b>Managed Firewall - Level 2 - Setup and Configuration</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_sale_unit_396018">
<b>0.00</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_nrp_total_396018">
<b>0.00</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_mrp_total_396018">
<b> </b>
</div>
</td>
</tr>
<tr class="sf_admin_row_2">
<td width="25px"> </td>
<td width="25px"> </td>
<td width="25px"> </td>
<td>
<div id="lineitem_detail_396018" style="color:#333; text-indent: 10px;"> Managed Firewall Configuration (2 hours maximum)</div>
</td>
<td width="50px"> </td>
<td width="50px"> </td>
<td width="50px"> </td>
</tr>
<tr>
<td id="submenu" style="background-color: #ddd;text-align:center;" colspan="7">Colocation and Data Center Connectivity</td>
</tr>
<tr class="sf_admin_row_1">
<td width="25px">
<div style="text-align: center;"> 221 </div>
</td>
<td width="25px">
<div style="text-align: center;"> New </div>
</td>
<td width="25px">
<div style="text-align: center;"> 3 </div>
</td>
<td>
<div>
<b>Mbps Dedicated Internet Access to Colocation - Burstable</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_sale_unit_396020">
<b>0.00</b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_nrp_total_396020">
<b></b>
</div>
</td>
<td width="50px" style="text-align: right;">
<div id="lineitem_mrp_total_396020">
<b>0.00</b>
</div>
</td>
</tr>
<tr class="sf_admin_row_2">
<td width="25px"> </td>
<td width="25px"> </td>
<td width="25px"> </td>
<td>
<div id="lineitem_detail_396020" style="color:#333; text-indent: 10px;"> Sustained Internet Access burstable to 10Mbps ($150/Mbps)</div>
</td>
<td width="50px"> </td>
<td width="50px"> </td>
<td width="50px"> </td>
</tr>
<tr class="sf_admin_row_1">
<td colspan="4"></td>
<td width="50px">
<center>
<b>TOTAL</b>
</center>
</td>
<td id="heading-total" width="50px" style="text-align: right;">
<div id="lineitem_nrp_grand">$0.00</div>
</td>
<td id="heading-total" width="50px" style="text-align: right;">
<div id="lineitem_mrp_grand">$0.00</div>
</td>
</tr>
</tbody>
</table>
<div style="border: 1px solid #000;padding: 5px; margin-right: 3px; font-size: 8px;">
<div class="wysiwyg-view"> </div>
All product, service and pricing information is based on latest information available.
<br>
Subject to change without notice or obligation. Quote subject to, and not inclusive of, applicable shipping, handling and tax.
</div>
</div>
</body>
</html>
Thanks to Brian S. He mentioned that it worked for him with 0.6.0 beta 3, but not the latest, unreleased code. That made me double check, and it looks like I HAD swapped in the latest code to test something. Reverting back to that release version, I got this working.
I'm trying to update different rows from mysql that they filtered by some record . in this code first the user should enter two input : classnumber and level .
records that they have this fields will show in table then the user should be able to update this records information . but the problem is all of records are in one table in mysql so their id is different I mean for example the first record that match with two inputs id is 2 and then the next one is 5 and next one 6 and ....
with this kind of situation how should I change the code below ?
<form id="searchform" method="post" dir="rtl" action="">
level :<input name="level" style="margin-top:5px; margin-left:6px;font-family: Tahoma,Geneva,sans-serif; font-size: 12px; margin-top: 5px; padding: 5px; width: 50px;" type="text" id="level" />
classnumber :<input name="classnum" style="margin-top:5px; margin-left:6px;font-family: Tahoma,Geneva,sans-serif; font-size: 12px; margin-top: 5px; padding: 5px; width: 50px;" type="text" id="classnum" />
<input style="margin-top:10px; margin-left:120px; font-size: 14px; padding: 5px 14px;" type="submit" value="جستجو" name="enter" />
</form>
<?php
if(isset($_POST['enter'])){
$sql="SELECT * FROM `".$tbl_name."` where classnum='".$_REQUEST['classnum']."' and level='".$_REQUEST['level']."' ";
$result=mysql_query($sql,$link);
$count=mysql_num_rows($result);
}
?>
<div class="cleaner h30"></div>
<br>
<form name="form1" action="" method="POST">
<center>
<div>
<div align="center" width = 615>
<table class="stats" cellspacing="0" width="615" border="1">
<tr>
<th width="20" scope="col" >Id</th>
<th width="60" scope="col">Name</th>
<th width="60" scope="col">Last Name</th>
<th width="42" scope="col">Midterm</th>
<th width="54" scope="col">Class mark</th>
<th width="42" scope="col">Final Quiz</th>
<th width="54" scope="col">State</th>
<th width="54" scope="col">Details</th>
</tr>
<?php
while($rows=mysql_fetch_array($result)){
$id[]=$rows['id'];
?>
<tr>
<td align="center">
<input name="id[]" type="text" id="id" value="<? echo $rows['id']; ?>" style=" font-family: Tahoma,Geneva,sans-serif; font-size: 12px; padding: 5px; width: 10px;"></td>
<td align="center"><input style=" font-family: Tahoma,Geneva,sans-serif; font-size: 12px; padding: 5px; width: 60px;" type="text" name="name[]" id="name" value= "<? echo $rows['name']; ?>" /></td>
<td align="center"><input style=" font-family: Tahoma,Geneva,sans-serif; font-size: 12px; padding: 5px; width: 60px;" type="text" name="lastname[]" id="lastname" value= "<? echo $rows['lastname']; ?>" /></td>
<td align="center"><input style=" font-family: Tahoma,Geneva,sans-serif; font-size: 12px; padding: 5px; width: 50px;" type="text" name="midmark[]" id="midmark" /></td>
<td align="center"><input style=" font-family: Tahoma,Geneva,sans-serif; font-size: 12px; padding: 5px; width: 50px;" type="text" name="classmark[]" id="classmark" /></td>
<td align="center"><input style=" font-family: Tahoma,Geneva,sans-serif; font-size: 12px; padding: 5px; width: 50px;" type="text" name="finalmark[]" id="finalmark" /></td>
<td align="center"><input style=" font-family: Tahoma,Geneva,sans-serif; font-size: 12px; padding: 5px; width: 50px;" type="text" name="state[]" id="state" /></td>
<td align="center"><input style=" font-family: Tahoma,Geneva,sans-serif; font-size: 12px; padding: 5px; width: 50px;" type="text" name="details[]" id="details" /></td>
</tr>
<?php
}
?>
</table>
</div>
</div>
</center>
<input style="margin-top:10px; float:right; margin-right:175px; font-size: 14px; padding: 5px 14px;" type="submit" value="ثبت" name="Submit" />
</form>
<?php
// Check if button name "Submit" is active, do this
if(isset($_POST['Submit']))
{
for($i=0;$i<$count;$i++)
{
$sql1=mysql_query(" UPDATE `".$tbl_name."` SET midmark='".$_REQUEST['midmark'][$i]."' , classmark='".$_REQUEST['classmark'][$i]."' , finalmark='".$_REQUEST['finalmark'][$i]."' , state='".$_REQUEST['state'][$i]."' , details='".$_REQUEST['details'][$i]."' WHERE id='".$_REQUEST['id'][$i]."' "); $result1=mysql_query($sql1);
}
}
if($result1){
header("location:results.php");
}
mysql_close();
?>