Autor Zpráva
jarolim
Profil
Nasel jsem na netu skriptik na kontaktni formular, potrebuji do neho zaclenit pole PRedmet a ADRESA - jake reseni navrhujete? diky
...
<input type="text" name="jmeno" size="20" value="" />
<input type="text" name="email" size="20" value="@" />
<input type="text" name="predmet" size="20" value="" />
<input type="text" name="adresa" size="20" value="" />

<textarea name="zprava" cols="40" rows="10"></textarea>



<input type="submit" value="Odešli vzkaz" />

</form>

<?


function to_7bit($txt){
$txt = Base64_Encode($txt);
return($txt);
}

function send($sender, $msg) {
global $receiver;
global $subject;
$headers = "MIME-Version: 1.0 ";
$headers .= "Content-Transfer-Encoding: base64 ";
$headers .= "Content-type: text/plain; charset=utf-8 ";
$headers .= "X-Priority: 3 ";
$headers .= "X-MSMail-Priority: Normal ";
$headers .= "X-Mailer: php ";
$headers .= "From: $sender ";
return(mail($receiver, $subject, $msg, $headers));

}

$action=0;

if($_POST['zprava']){
$m=$_POST['email'];
$s=$_POST['jmeno']." <".$m.">";
$m=to_7bit($_POST['zprava']);
if(!send($s,$m))
$action=1;
else
$action=2;
}


switch($action){

case 1:print_error();
break;
case 2:print_ok();
break;
}
t2001
Profil
adresa ceho?

a místo tohoto <input type="text" name="predmet" size="20" value="" />
napis toto <input type="text" name="subject" size="20" value="" />

a nezapomen si prejmenovat
v tomto radku return(mail($receiver, $subject, $msg, $headers));

místo $subject, napiš $_POST['subject']

a bude ti fungovat predmet
jarolim
Profil
Ad adresa --> adresa odesilatel..., muze to byt i telefon...
jarolim
Profil
Uz jsem problem vyresil :)
Toto téma je uzamčeno. Odpověď nelze zaslat.