the issue is resolved
the issue is resolved
Last edited by xaverius; 10-17-2011 at 08:59 PM. Reason: the issue is resolved
use the forum [.php.] tags to make your code more readable.
the variable names you use in your email template do not match the names you assign to the form values:for example,PHP Code:$emailField = $_POST['email'];
$bankField = $_POST['bank'];
$rekeningField = $_POST['rekening'];
$namaField = $_POST['nama'];
$gameField = $_POST['game'];
$body = <<<EOD
<br><hr><br>
Email: $email <br>
Lokasi: $bank <br>
Rekening: $rekening <br>
Nama: $nama<br>
Game: $game <br>
EOD;
$_POST['bank']is assigned to$bankField, but later, you try to use$bank.
in addition, you need to sanitize user input before sending it to your email. Since your email is being sent with a text/html mime type, a malicious user could send some javascript or an image tag inside their message, which could be executed when you read the email (depending on your email client settings). You should use something likestrip_tags()on every form field before putting them in the email.
xaverius (10-13-2011)
the issue is resolved
Last edited by xaverius; 10-17-2011 at 08:57 PM. Reason: the issue is resolved
the issue is resolved
Last edited by xaverius; 10-17-2011 at 08:57 PM. Reason: the issue is resolved
the issue is resolved
Last edited by xaverius; 10-17-2011 at 08:58 PM.
You haven't changed them. for example:
PHP Code:// name of variable holding form data: $bankField
$bankField = $_POST['bank'];
This problem exists with every variable you are using.PHP Code:// name of variable used in email: $bank
Bank: $bank <br>
// this variable is empty (actually, it is not even set), so there is no info in you email.
// you must use the name you assigned to the value - random names will not work.
xaverius (10-14-2011)
thanks for the explanation. The fault is I have to upload all my files first to hosting. Thanks for helping.
no problem. glad I could help
If your question has been answered, please mark your thread "resolved":
- On your original post (post #1), click [edit], then click [go advanced].
- In the "thread prefix" box, select "Resolved". Click [save changes].
xaverius (10-17-2011)
Bookmarks