Bu sorunun bolca sorulmuş olduğunu biliyorum, ancak diğer iş parçacıklarının genel özünü kavramak için çok acemiyim; bu yüzden kendi koduma özgü kendi sorumu soruyorum.Dışsal bir Stil Sayfası ile PHP Çıktısı Oluşturma
PHP formumun, formun gönderilmesini takiben kullanıcıya metin, arka plan, düzen vb. Stilleri ekleyerek harici CSS aracılığıyla şekillendirmesini istiyorum.
Benim şu anki PHP şudur:
<?php
// pull out the values from the request stream sent by the form
// and store those values into memory variables
$email = $_REQUEST['email'];
$webmail = $_REQUEST['subject'];
$firstName = $_REQUEST['Firstname'];
$lastName = $_REQUEST['Lastname'];
$sex = $_REQUEST['sex'];
$to = '[email protected]';
$comment =$_REQUEST['comment'];
$subject =$_REQUEST['subject'];
$header = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"';
$header .= ' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
$htmlhead = '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">';
$htmlhead .= '<head><title>Getting Student Info</title>';
$htmlhead .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head>';
$htmlbody = '<body>';
// use the variables that store the information sent from the form.
mail($to, $subject,"You have received the following feedback:". $comment, "from " . $firstName . " " . $lastName, "From: $email");
$htmlbody .= '<div class="formSubmissionText">';
$htmlbody .= "<h1>Processing a form</h1>";
$htmlbody .= "<p>Thank you " . $firstName . " " . $lastName;
$htmlbody .= ". We've recieved an email from your email address: " . $email . ", and will be respond as soon as possible!</p>";
$htmlbody .= "</div></body></html>";
// use echo to write all the information out back to the browser
echo $header . $htmlhead . $htmlbody;
?>
Sorununuzun tam olarak ne olduğunu anlatmadınız mı? Kodunuzu çalıştırdığınızda ne olur? Ve çıktı ile hedef arasındaki fark nedir? –
Yanıtı takdir ediyorum, ancak bu benim bilgi eksikliğim ve şu anda 'onu kanatladığım' nedeniyle ne anlama geldiğini anlamıyorum, üzgünüm:/ – Billy
Kullanmakta olduğum harici stil sayfalarından birini bağlamak istiyorum. formun açık olacağı web sitesi için. Ama nasıl yapılacağından emin değilim. Sebep olduğum karışıklık için özür dilerim. – Billy