Jump to content

Problem Of Sending Email To User


Recommended Posts

  • Replies 304
  • Created
  • Last Reply

Top Posters In This Topic

VALUES ('','$id','$name','$receiver','$titlee','$mbody','$today_date','$ad','0','1','1')");Table structure for table hendawy_mailField Type Null Defaultid int(10) Yes NULLmem_id int(10) Yes 0sender varchar(100) Yes NULLreceiver varchar(100) Yes NULLtitle varchar(100) Yes NULLbody mediumtext Yes NULLdate varchar(100) Yes NULLtime time Yes 00:00:00eread enum('0', '1') Yes 0mshowi enum('0', '1') Yes 1mshowo enum('0', '1') Yes 1subject varchar(100) Yes NULLactivate varchar(100) Yes NULLmessage varchar(100) Yes NULL

Link to post
Share on other sites

There are 2 ways to do an INSERT. You can either list the columns, or not. If you don't list the columns then you have to give a value for every column in the table. That's what your queries are doing, they aren't listing the columns, only the values. If you don't want to give a value for every column, then you need to list which columns you're inserting. The columns and the values need to be in the same order. e.g.:$INSERTVALUES = mysql_query("INSERT INTO hendawy_mail (mem_id, sender, receiver, ...)VALUES ('$id','$name','$receiver','$titlee','$mbody','$today_date','$ad','0','1','1')");

Link to post
Share on other sites

thank you sir i did it and i fix itanother helpthis code for delet replay frome replayed table <? $asmemr1_select = mysql_query ("SELECT * from ssubject where id='$ssub_id' and active='1'"); while ($Row515=mysql_fetch_array($asmemr1_select)) { $memberr_id = $Row515[mem_id]; $asmm_select = mysql_query ("SELECT * from members where id='$member_id' and active='1'"); while ($Row16=mysql_fetch_array($asmm_select)) { $speciall = $Row16 [special]; } }if ($special == "1" AND $mem_id == $memberid){?> <tr> <td colspan="2" bgcolor="#efe8d6"> <p align="center"> <a href="index.php?action=delete_subject&rep_id=<? echo $repid; ?>&subjectid=<? echo $subjectid; ?>" ><span lang="ar-eg">حـــذف</span></a></td> </tr><? } else {}?> this special member can delet his repllay and also delet member's repllays on his adv and also the member can delet only his reply it this code wright ?becouse it is not work

Link to post
Share on other sites

All the code above does is print the delete links. If all you want to do is print the link for special members, wouldn't you just add an OR here to check if special is 2:if ($special == "1" AND $mem_id == $memberid){Or maybe you could just change that AND to an OR.

Link to post
Share on other sites

this is delet code if ($action == "delete_subject") { $delete=mysql_query("DELETE from subject_replays WHERE id='$rep_id'"); if($delete){echo "تم الحذف بنجاح";} else {echo "هناك خطأ في عملية الحذف";}echo "<meta http-equiv=\"refresh\" content=\"2; URL=index.php?action=subject_disc&subjectid=$subjectid\">";}i need to the special only can delet his replay and other members replaybut member can only delet his replay not members replayes in his subject

Link to post
Share on other sites

this is the code of delet if ($action == "delete_subject") {$delete=mysql_query("DELETE from subject_replays WHERE id='$rep_id'");if($delete){echo "تم الحذف بنجاح";} else {echo "هناك خطأ في عملية الحذف";}echo "<meta http-equiv=\"refresh\" content=\"2; URL=index.php?action=subject_disc&subjectid=$subjectid\">";}so i need you to corect it sir

Link to post
Share on other sites

You said it's not deleting when you click the link, right? The code you posted is saying to print a link like this:<a href="index.php?action=delete_subject&rep_id=...And the code to delete checks that:if ($action == "delete_subject") {...So according to the code, all you need in order to delete something is action=delete_subject on the link. If it's not deleting, the reason is in some other code that you haven't posted.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...