Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hello, I have a question on behalf of the tutorial »How to create a contact form«: How can I change the font-family, size, etc. in the ›echo‹ within the PHP-Script? |
||||
|
To be concrete, I am talking about this script: $text = ""; foreach($_POST as $name => $value) { $text .= "$name : $value\n"; } if ($text != "") { echo 'Thanks for contacting us.'; mail("youremail@example.com", "Contact form request", $text); } |
||||
|
You could either embed your php code in a section with that font set ( havent tried this out yet, so I'm not 100% sure), or you could also write out a font or style with the echo command. Its not restricted to only text. Like echo '<div style="font-size: 16px">your text</div> |
||||
|
Thank you for the rapid answer, which was helping me much. My final PHP-script which is defining the font-familiy (Saira Condensed) and the size (48 pixels) now looks like this – and it works well: $text = ""; foreach($_POST as $name => $value) { $text .= "$name : $value\n"; } if ($text != "") { echo '<div style="font-family: Saira Condensed; font-size: 48px">Thanks for contacting us.</div>'; mail("test@example.de", "Contact form request", $text); } |
|