Post Variable in PHP Mail einbinden
TomCZ20
- php
Servus!
Ich habe die Datei 1.php. Diese beinhaltet ein Formular welches per POST daten an 2.php übergibt.
2.php macht folgendes:
$test = $_POST["testvariable"];
echo $test; gibt den Inhalt auch einwandfrei aus.
Nun versende ich eine eMail:
Der eMailText lautet:
$emailtext = 'blah blah <?php echo $test; ?>';
Die eMail kommt an, Die variable kommt aber nicht mit an, der Platz bleibt leer.
was mache ich da falsch?
Grüße, Thomas
$emailtext = 'blah blah <?php echo $test; ?>';
Die eMail kommt an, Die variable kommt aber nicht mit an, der Platz bleibt leer.
was mache ich da falsch?
$emailtext = 'blah blah '.$test;
Gruß, Samoht
Hi Thomas,
$emailtext = 'blah blah <?php echo $test; ?>';
Da würde ich gerne mal den gesamten Quellcode sehen.
Da du $emailtext ja auch schon in PHP schreibst, brauchst du eigentlich nur:
$emailtext = 'blah blah '.$test;
machen. Wenn $test deine $_POST Variable enthält.