Jump to content

oduth

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Everything posted by oduth

  1. At last, I solved the issue. Just put "ini_set" commands at the top of the code; ini_set ("SMTP","<ip_address>"); ini_set ("sendmail_from","XYZ@abc.com"); $headers = "From: XYZ <XYZ@abc.com>\n"; $headers .= "Content-Type: text/html; charset=UTF-8";
  2. Yes, the domain is avea.com.tr. Actually, below code works fine. ... $headers .= "From: ITServiceDesk@Avea.com.tr\r\n"; ... But not with Display name.
  3. Hi, I have a problem with Mail Display name. I would really appreciate If you could help me with this. A part of my PHP file: ... ... $headers = 'From: IT Service Desk <ITServiceDesk@Avea.com.tr>' . "\r\n"; $headers .= 'Content-Type: text/html; charset=UTF-8'; ... ... Here is the (echo $headers) result: (You can see there is no <e-mail_address> part of headers) From: IT Service Desk Content-Type: text/html; charset=UTF-8 So, my mail could not be sent. I tried this as well; ... ... $headers = 'From: IT Service Desk <ITServiceDesk@Avea.com.tr>' . "\r\n"; $headers .= 'Content-Type: text/html; charset=UTF-8'; ... ... The output: > From: IT Service Desk <ITServiceDesk@Avea.com.tr> Content-Type: text/html; charset=UTF-8 Although the output looks correct, my mail could not be sent once again. What could the possible problems be? Thanks & Regards.
  4. Hello again, My mistake, i checked the wrong output page. It worked actually! Thanks so much for your help!
  5. Thanks for the correction, i totally missed it. But, the problem still remains the same. The array is empty. bla..bla.. <html> <form id="SK" action="post.php" method="POST"> <tr> <td> <?php $conn = getConn(); mysql_select_db(getDBName(),$conn); $query = "select MEMBERS,NAME from mail;"; $result = mysql_query($query,$conn); echo "<select name=\"mail_select[]\" id=\"mail_select[]\" multiple=\"multiple\">"; while($row = mysql_fetch_array($result)) { $NAME = $row['NAME ']; $MEMBERS = $row['MEMBERS']; echo "<option value='$MEMBERS'>$NAME</option>"; } echo "</select>"; mysql_close($conn); ?> </td> </tr> <tr><td> <?php $conn = getConn(); mysql_select_db(getDBName(),$conn); $query = "select mark from olsystem;"; $result = mysql_query($query,$conn); echo "<select name=\"OS[]\" id=\"OS[]\" multiple=\"multiple\">"; while($row = mysql_fetch_array($result)) { $isim = $row['mark']; echo "<option value='$mark'>$mark</option>"; } echo "</select>"; mysql_close($conn); ?> </td> </tr> <tr height="40"><td width="170"><div class="rowElem"><input type="submit" value="GO!" /><input type="reset" value="Clear" /></div></td></tr> </form> </html>
  6. Hi, I have an HTML and a PHP script inserting data into DB. My problem is when i submit the form, one of the arrays cannot be posted to my PHP Script. The first SELECT-OPTION Values (mail_select[]) are being posted correctly, however the second SELECT-OPTION Values (OS[]) are not. It brings empty value at all. If i put OS[] SELECT TAG to first place, -i mean put it before mail_select[] SELECT TAG-, this time mail_select[] brings nothing. And OS[] is being posted correctly. What could the possible problems be? Here is the HTML: bla..bla.. <html> <form id="SK" action="post.php" method="POST"> <tr> <td> <?php $conn = getConn(); mysql_select_db(getDBName(),$conn); $query = "select MEMBERS,NAME from mail;"; $result = mysql_query($query,$conn); echo "<form>"; echo "<select name=\"mail_select[]\" id=\"mail_select[]\" multiple=\"multiple\">"; while($row = mysql_fetch_array($result)) { $NAME = $row['NAME ']; $MEMBERS = $row['MEMBERS']; echo "<option value='$MEMBERS'>$NAME</option>"; } echo "</select></form>"; mysql_close($conn); ?> </td> </tr> <tr><td> <?php $conn = getConn(); mysql_select_db(getDBName(),$conn); $query = "select mark from olsystem;"; $result = mysql_query($query,$conn); echo "<form style=\"margin:20px 0\">"; echo "<select name=\"OS[]\" id=\"OS[]\" multiple=\"multiple\">"; while($row = mysql_fetch_array($result)) { $isim = $row['mark']; echo "<option value='$mark'>$mark</option>"; } echo "</select></form>"; mysql_close($conn); ?> </td> </tr> <tr height="40"><td width="170"><div class="rowElem"><input type="submit" value="GO!" /><input type="reset" value="Clear" /></div></td></tr> </form> </html> Here is my PHP script: <?php include("DB.php"); if(isset($_POST['OS'])){ $OS = implode(",",$_POST['OS']); $mail_select = implode(",",$_POST['mail_select']); register($OS,$mail_select); } function register($OS,$mail_select) { $conn = getConn(); mysql_select_db(getDBName(),$conn); $query ="insert into outage(OS,mail_select) values ('$OS','$mail_select')"; mysql_query($query,$conn); if(mysql_affected_rows()>0){ BLA BLA } else { } mysql_close($conn); } ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.