嘿,伙计们,我做了一个发送电子邮件的表单。当你得到一个确认,它已发送我已经把一个贝宝链接按钮在页面上以及。当我试图将它围绕php标签时,我一直得到一个空白的白色屏幕。我知道我在代码中做错了什么,但找不到它。
<html>
<head>
<title>Order Is Processing</title>
</head>
<body>
<?php $name = $_POST['name'];
$address = $_POST['address'];
$phone = $_POST['phone'];
$mobile = $_POST['mobile'];
$email = $_POST['email'];
$date = $_POST['date'];
$star = $_POST['star'];
$log = $_POST['log'];
$round = $_POST['round'];
$totalcakes = $_POST['totalcakes'];
$totalprice = $_POST['totalprice'];
$formcontent="From: $name n Address: $address n Phone: $phone n Mobile: $mobile n Email: $email n Date: $date n Star: $star n Log: $log n Round: $round n Total Cakes: $totalcakes n Total Price $totalprice";
$recipient = "demondestiny@hotmail.com";
$subject = "New Order From Christmas Cakes For Cancer Research";
$mailheader = "From: $email rn";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
echo("Your order has been sent. Please <a href='http://www.christmascakesforcancerresearch.com.au/order_form.html'>click here</a> to go back and send through the money as a Direct Bank Deposit otherwise <form action='https://www.paypal.com/cgi-bin/webscr' method="'post' target='_top'>");
echo("<input type='hidden' name='cmd' value='_xclick'>");
echo("<input type='hidden' name='business' value='test@test.com'>");
echo("<input type='hidden' name='lc' value='AUD'>");
echo("<input type='hidden' name='item_name' value='Christmas Cakes'>");
echo("<input type='hidden' name='button_subtype' value='services'>");
echo("<input type='hidden' name='no_note' value='0'>");
echo("<input type='hidden' name='currency_code' value='AUD'>");
echo("<input type='hidden' name='bn' value='PP-BuyNowBF:btn_buynowCC_LG.gif:NonHostedGuest'>");
echo("<table>");
echo("<tr><td><input type='hidden' name='on0' value='Cakes'>Cakes</td></tr><tr><td><select name='os0'>");
echo("<option value='Star'>Star $15.00 AUD</option>");
echo("<option value='Log'>Log $25.00 AUD</option>");
echo("<option value='Round'>Round $60.00 AUD</option>");
echo("</select> </td></tr>");
echo("</table>");
echo("<input type='hidden' name='currency_code' value='AUD'>");
echo("<input type='hidden' name='option_select0' value='Star'>");
echo("<input type='hidden' name='option_amount0' value='15.00'>");
echo("<input type='hidden' name='option_select1' value='Log'>");
echo("<input type='hidden' name='option_amount1' value='25.00'>");
echo("<input type='hidden' name='option_select2' value='Round'>");
echo("<input type='hidden' name='option_amount2' value='60.00'>");
echo("<input type='hidden' name='option_index' value='0'>");
echo("<input type='image' src='https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif' border='0' name='submit' alt='PayPal - The safer, easier way to pay online!'>");
echo("<img alt='' border='0' src='https://www.paypalobjects.com/en_US/i/scr/pixel.gif' width='1' height='1'>
</form>");
?>
</body>
</html>
你能帮我解决一下我做错的地方吗? 你的"post"打错了。
echo("Your order has been sent. Please
<a href=
'http://www.christmascakesforcancerresearch.com.au/order_form.html'>
click here</a> to go back and send through the money as a Direct Bank
Deposit otherwise <form action='https://www.paypal.com/cgi-bin/webscr'
method="'post' target='_top'>");
见上图:方法= "post"