View Single Post
ישן 25-10-08, 20:18   # 1
the-shadow
חבר מתקדם
 
מיני פרופיל
תאריך הצטרפות: Oct 2005
גיל: 44
הודעות: 434

the-shadow לא מחובר  

עזרה: עם טופס לשליחה לאימייל php

בניתי טופס לשליחת אימייל מהאתר

והבעיה שהוא מתקבל אצלי במייל אבל בסימנים. ניסיתי הכל ולא הלך



זה הקוד של ה - html הקידוד של כל האתר הוא ב utf-8



[CODE]


<font face="arial" size="2" color="ffffff">
<form action="mail.php" method="post">
<input type="text" name="name">&nbsp;&nbsp;&nbsp;&nbsp;& nbsp; : שם פרטי
<br>
<input type="text" name="mail">&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: אימייל
<br>
<input type="text" name="phone"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;: טלפון
<br>
<input type="text" name="web">&nbsp;&nbsp;&nbsp;: כתובת אתר
<br>
<input type="text" name="subject">: נושא ההודעה
<br>
: תוכן ההודעה<br>
<textarea cols="42" rows="5" name="message"></textarea><br><br>
<input type="submit" value="שלח">
<input type="reset" value="נקה טופס">
</form>
</font>

[CODE/]

מה הבעיה כאן? ואיך אני מכניס אותו לטבלה שאני לא אצטרך לעשות רווחים שבפיירפפוקס

הוא לא מראה אותו טוב את כל הטופס.



וזה הקוד של ה php :

[CODE]

<?php



$subject = $_POST['subject'];
$message = "Name: " . $_POST["name"] . "\n";
$message .= "mail: " . $_POST["mail"] . "\n";
$message .= "phone: " . $_POST["phone"] . "\n";
$message .= "web: " . $_POST["web"] . "\n";
$message .= "message: " . $_POST["message"] . "\n";
mail('admin@i-l.co.il', $subject, $message, "From:".$sender);


$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'content-type: text/html; charset=utf-8' . "\r\n";
$message .= "content-type: text/html; charset=utf-8\n";






?>

ההודעה נשלחה בהצלחה,
<a href="index.html">חזרה לדף הבית</a>

[CODE/]

נשלח אליי לאימייל ככה:

Name: ׳’׳¢׳’׳¢׳’׳¢
mail: ׳’׳›׳¢׳’׳¢
phone: ׳›׳’׳¢׳’׳¢
web: ׳’׳¢׳’׳¢׳’
message: ׳¢׳’׳›׳¢׳’׳¢ ׳’׳›׳¢׳’׳›׳¢ ׳’׳›׳¢׳›׳’׳¢׳’





תודה רבה
  Reply With Quote