Re: How to check form -> email



Den 24.06.2006 09:49, skriblet l3vi501@xxxxxxxxx følgende:
I think this is what your looking for.
http://www.boogybonbon.com/2006/06/24/php-email-script-security-form-email-anti-hacking-script/

Hm. Yes, maybe. I don't know PHP all that well, and I'm trying to learn, but if someone could give me some pointers as to how to implement the PHP code from that webpage (or, of course, other ways to do it) into my current code, I'd appreciate it a lot.

My current code:

<?php
$henv = "Henvendelsen gjelder: " . $_POST["hnvd"] . "\n\n";
$user = "Navn: " . $_POST["user_name"] . "\n";
$adrs .= $_POST["mail_adresse"] . "\n";
$gadrs .= "Gateadresse: " . $_POST["gate_adresse"] . "\n";
$tlf .= "Telefonnummer: " . $_POST["tlf_number"] . "\n\n";
$kom .= "" . $_POST["babbel"] . "\n\n";
$valkode .= "" . $_POST["kode"] . "\n";
$sjekkode .= "" . $_POST["validering"] . "\n";
if ($valkode != $sjekkode) {
header( "Location: error.php" );
}
else {
mail("hjelp@xxxxxxxxxxxxxx","Anmodning om hjelp","$henv$user\rMailadresse: $adrs$gadrs$tlf$kom", "From: $adrs" );
}
?>

<?php include 'takk.php' ?>

This code is called from a form (separate file) - if the forms code is needed also, please tell me.


--
mvh
Ørjan Langbakk
.



Relevant Pages

  • Re: PHP5 and class inheritance question
    ... You're so dense you can't even see the contradiction in your own statement, ... about an easy way to describe to & references in *php* to someone who doesn't have any experience with the construct. ... PHP doesn't have pointers. ... You cant describe references in relationship to something which doesn't exist. ...
    (comp.lang.php)
  • Re: =& when creating new object
    ... $reference point to the same memory location. ... Please read the chapter called "references are not pointers" in the ... should not consider it an address in PHP. ...
    (comp.lang.php)
  • Re: PHP5 and class inheritance question
    ... describe references in relationship to something which doesn't exist. ... knowledge of pointers as defined by another language. ... You're the one who tried to compare PHP references to something which ... get a clue jerry. ...
    (comp.lang.php)
  • Re: PHP5 and class inheritance question
    ... You're so dense you can't even see the contradiction on your own ... you're referring to c-style language pointers. ... about an easy way to describe to & references in *php* to someone who ...
    (comp.lang.php)
  • Re: PHP5 and class inheritance question
    ... And C doesn't have references, just as PHP doesn't have pointers. ... A more appropriate place for him would be alt.stoopid.trolls instead of someplace real programmers hang out. ...
    (comp.lang.php)