לפטישי הPHP

Arik FL

New member
לפטישי הPHP

האם יש מצב שליחת טופס להגדיר שמתי שאני יפתח אותו באימיל הוא יהיה מימין לשמאול כמו בדף HTML? ובכלל האם ניתן לשנות צבע? או בולד וכו'? עניתם לי על שאלה זו ע"יהגרת ה הסוג טקסט, אבל משום מה זה לא עובד. אם תוכלו בבקשה לתת לי דוגמא של טופס ששולח עברית (תרשמו מילה או שנים) זה יכול לעזור לי המון. תודה, אריק
 

Raful

New member
הוא מחפש

פיתרון של Content-type. בעמוד הפונקציה mail () יש דוגמה יפה של זה (שיניתי אותה קצת, מישהו יודע איפה?):
* recipients */ $to = "Moshe <[email protected]>" . ", " ; //אל תשכח את הפסיק! $to .= "David <[email protected]>"; /* subject */ $subject = "Birthday Reminders for August"; /* message */ $message = ' <html> <head> <title>Birthday Reminders for August</title> </head> <body> <p>Here are the birthdays upcoming in August!</p> <table> <tr> <th>Person</th><th>Day</th><th>Month</th><th>Year</th> </tr> <tr> <td>Joe</td><td>3rd</td><td>August</td><td>1970</td> <td>Sally</td><td>17th</td><td>August</td><td>1973</td> </tr> </table> </body> </html> '; /* בכדי לשלוח דואר מסוג HTML, את יכול לקבוע את כותרות סוג התוכן (Content-type).*/ $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=windows-1255\r\n"; /* כותרות נוספות */ $headers .= "From: Birthday Reminder <[email protected]>\r\n"; $headers .= "Cc: [email protected]\r\n"; $headers .= "Bcc: [email protected]\r\n"; /* ועכשיו - שלח את זה! */ mail($to, $subject, $message, $headers);​
 
למעלה