Echo problem

Hi, Can some one tell me why this does not echo out in the page source code?

All the other input form fields echo fine, bar the <form> tags!

echo ‘<form action=“another_page.php” method=“post”>’;

Thanks

  1. you have a logic error elsewhere

  2. you have a syntax error elsewhere

  3. file in include doesn’t exist

  4. file in require doesn’t exist

  5. a die statement is executed somewhere

  6. none of the above.

Since you haven’t posted the rest of your code, take your pick from any of the above.

Hi Thanks for the reply, here is the code…

$show_loc_prices = show_prices();

                if ($show_loc_prices)
                {
                    echo '&lt;br /&gt;';
                    echo '&lt;fieldset&gt;&lt;br /&gt;&lt;h1&gt;Payment Options&lt;/h1&gt;&lt;br /&gt;';
                    echo "Please either Pay Now using the PayPal link below or you can manually send us your order via email by submitting our online order form; to do this please click on the 'Email Your Order Button' below.&lt;br&gt;&lt;br&gt;";
                    
                    echo '&lt;table width="712"&gt;
                    &lt;tbody&gt;
                    &lt;tr&gt;
                    &lt;td width="350" align="right"&gt;';
                    print '&lt;form method="GET" action="this.php"&gt;';
                    
                    // SHOW PAY PAL LOGO AND PAYMENT OPTION HERE
                    /*
                    
                    $ask_for_po = false;
                    $ses_id = session_id();
                    $order_values = get_order_details_paypal($ses_id, "");
                    
                    if(!isset($_SESSION))
                    {
                        session_start();  
                    }
                    
                    
                    $web_ref = $_SESSION['wl_nr'];
                    
                    if ($web_ref == "")
                    {
                        //lost number so create a new one
                        $web_ref = $_SESSION['wl_nr'];
                    }

echo ‘<hr />Please click on the Pay Pal button below to process and pay for your items, you will redirected to the secure Pay Pal payment pages where you can either pay using your personal Pay Pal account or by selection the credit card payment option.<br /><br />’;

echo ‘<form action=“another_page.php” method=“post”>
<input type=“hidden” name=“cmd” value=“_xclick”>
<input type=“hidden” name=“on0” value="Items Ordered “>
<input type=“hidden” name=“os0” value=”’.$order_values[‘pp_description’].‘“>
<input type=“hidden” name=“address_override” value=“1”>
<input type=“hidden” name=“currency_code” value=“GBP”>
<input type=“hidden” name=“business” value="myemail@myemail.com”>
<input type=“hidden” name=“tax_rate” value=“20.0”>
<input type=“hidden” name=“item_name” value="’ . “Order Reference: " . $web_ref . " : Please note the total amount shown includes postage for UK mainland only Inc VAT” . ‘“>
<input type=“hidden” name=“amount” value=”’ . $order_values[‘pp_value’] . ‘“>
<input type=“submit” value=”" id=“frm_submit_pp” />
</form>’;

echo ’ <a id=“del_cart_btn2” href=“customer.php?acc=null&wl=show&ml=null&mail_pre=true_pp”>Pay now using Pal Pal</a>';

echo ‘</td>
<td width=“12” align=“center”><span style=“color:#F00; font-size:18px; font-weight:bold;”>OR</span></td>
<td width=“350” align=“left”><a id=“del_cart_btn2” href=“customer.php?acc=null&wl=show&ml=null&mail_pre=true”>Place Order for Invoicing</a></td>
</tr>
</tbody>
</table>
<br>
</fieldset>’;
}
else
{
echo ‘<br />’;
echo ‘<fieldset><br />’;
echo “Please click on the Request Quotation link below to submit your order.<br /><br />You will be able to enter a reference for this order on the next screen.<br><br>”;
echo ‘<table width=“712”>
<tbody>
<tr>
<td align=“left”><a id=“del_cart_btn2” href=“customer.php?acc=null&wl=show&ml=null&mail_pre=true”>Request Quotations</a></td>
</tr>
</tbody>
</table>
<br>
</fieldset>’;
}

You have most of that code commented out at the moment.

Hi Excluding the commented out bit of code (I ment to remove the /* before posting), does this section of code look OK to you?

echo ‘<form action=“another_page.php” method=“post”>
<input type=“hidden” name=“cmd” value=“_xclick”>
<input type=“hidden” name=“on0” value="Items Ordered “>
<input type=“hidden” name=“os0” value=”’.$order_values[‘pp_description’].‘“>
<input type=“hidden” name=“address_override” value=“1”>
<input type=“hidden” name=“currency_code” value=“GBP”>
<input type=“hidden” name=“business” value="myemail@myemail.com”>
<input type=“hidden” name=“tax_rate” value=“20.0”>
<input type=“hidden” name=“item_name” value="’ . “Order Reference: " . $web_ref . " : Please note the total amount shown includes postage for UK mainland only Inc VAT” . ‘“>
<input type=“hidden” name=“amount” value=”’ . $order_values[‘pp_value’] . ‘“>
<input type=“submit” value=”" id=“frm_submit_pp” />
</form>’;

That bit of code looks good to me, but they are all hidden so none of them will render to the viewer. (except for the submit button which has no value but renders a small box nonetheless) Just make sure that
$order_values[‘pp_description’]
$web_ref
$order_values[‘pp_value’]
has the values you want, or can be empty if they are not set.