当我尝试为在线商店发布某些内容时,它不会显示用户名,但会显示该项目。
HTML:
<style type="text/css">
body {
background-image: url(abstractsdark6.jpg);
}
body,td,th {
color: #FFF;
}
</style>
<center>
<p> </p>
<p><img src="tengokucraftshop.png" width="1002" height="215">
<p><span style="font-family:'Myriad Web Pro'; font-size:12pt">Thank you for Buying a 1 Time Access to Anything that we listed for $10</span>
<p style="font-family:'Myriad Web Pro'; font-size:12pt">Please Insert Your Minecraft Username Below.</p>
<INPUT TYPE="Text" VALUE="username" NAME="username" method="POST">
<p> </p>
<p style="font-family:'Myriad Web Pro'; font-size:12pt">Item You Wish to Buy:</p>
<form name="myform" action="purchaseconfirm.php" method="POST">
<div align="center">
<select name="item">
<option value="10k Cash ingame ">$10,000.00 In Game Cash - iConomy</option>
<option value="Diamond Set(Armor and Wep/tools x2)">Full Set of All Diamond (Includes Armor and Tools/Wepons) x2</option>
<option value="item">item</option>
</select>
<p style="font-family:'Myriad Web Pro'; font-size:12pt">If you Abuse this and the paypal logs are checked. you will not recieve your item as you are breaking our Rules and as a consequense you will not recieve your item.</p>
<p style="font-family:'Myriad Web Pro'; font-size:12pt">Please Send us A Screenshot of your Payment Proof to Haxconnect24@gmail.com with your Computer Clock Being Shown, it is easy to tell a Fraud Image. Dont Try. </p>
<p style="font-family:'Myriad Web Pro'; font-size:12pt">After your Purchase you will be Banned from Tengokucraft Shop for: 1 week (168 Hours or 10,080 Minutes or 604,800 Seconds), This is a Security Measure</p>
<p style="font-family:'Myriad Web Pro'; font-size:12pt"><BR />
<input type="submit" value="Pressing this Button You agree to the Terms Above and Schedrule the Item to be Given To you">
</p>
</form>
PHP:
<?php
$directory_self = str_replace(basename($_SERVER['PHP_SELF']), '', $_SERVER['PHP_SELF']);
$logfile= $_SERVER['DOCUMENT_ROOT'] . $directory_self . 'purchases.html';
$logdetails= date("F j, Y, g:i a") . ' : <br>Username:<br> ' . $_POST['username'] . ' <br>Item Purchased:<br> ' . $_POST['item'] . '</p>';
$fp = fopen($logfile, "a");
fwrite($fp, $logdetails);
fwrite($fp, " <br>----------------------<br>");
fclose($fp);
echo "Your Purchase And your Item Request Was Recieved. it Will Now be Schedruled to Be given to you in the Post Office!, You have been Banned for 1 Week as a Security Measure. Thank you!";
?>
结果:
DATE(ignore this i removed it) :
Username:
Item Purchased:
10k Cash ingame
----------------------
我已经尝试了几件事,我无法解决这个问题。
无论如何这可以修复吗?我正在使用Dreamweaver CS5.5
答案 0 :(得分:4)
由于
<INPUT TYPE="Text" VALUE="username" NAME="username" method="POST">
位于<form>
之外
您必须在<form name="myform" .....
下复制它。此<input>
也必须如下:
<INPUT TYPE="Text" VALUE="username" NAME="username">
您只能将method=''
参数与<form>
标记一起使用。