Jump to content


This topic is now archived and is closed to further replies.


What's Wrong With This COMPOSE Mail Function?

Recommended Posts

Ok, the way i have it set up is when a user clicks the "mail me" link it echos there name in the compose form but i want to make also make it so they can compose a new mail, without the id link.
Its set up to get a name from there favorites, then a new compose  but keeps getting an error: ???
[code]Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/public_html/datingsite/compose.php on line 134
"Witch Is: $rowuser=mysql_fetch_object($ruser);"[/code]
Here is the php, any thoughts.
[code]<? include("cookie.php");
$quser1=mysql_query("select * from users where identity='$sendto'",$db);
$subject="RE: $subject";
$rcuser=mysql_query("select * from users where identity='$UsErCoOkIe'",$db);

$remail=mysql_query("select email from users where userid='$to_client_id'",$db);


$que="insert into inbox(title,msg,userid,sender,time) values('$subject','$body','$to_client_id','$cuser',now())";
mysql_query("insert into outbox(title,msg,userid,sender,time)
mysql_query("insert into email(userid,sender,time) values('$to_client_id','$cuser',now())",$db);

// Edit the following variables to customize the message sent to the recipient

$sub="New mail in your dating account";
$content="There is new mail in your account at darkwaterstusio.net dating
To check the mail visit http://darkwaterstudio.net/datingsite/index.php";

// You should not need to edit any active code beneath this line


The Form:
[code]<FORM method=post name=CFForm_1>
              <table border=0 cellspacing=5 class=blue_text>
                    <td align=right bgcolor="#E1E1E1" class="big_txt">To:</td>
                    <td bgcolor="#E1E1E1" class="normal_txt"><input type="text" name="sendto" value=<?echo $send?>>
                    <td bgcolor="#E1E1E1" class="normal_txt"><?
  $quser="select * from users where username='$UsErCoOkIe'";
  $query="select * from lovebasket where userid='$userid'";
                        <select name=to_client_id>
                          <option value="">Select</option>
  $quser="select * from users where userid='$rowto->loveid'";
                          <option selected value=<?echo $rowto->loveid?>> <?echo $name?> </option>
                      (from your Favourites) </td>
                    <td align=right class="big_txt">Subject:</td>
                    <td class="normal_txt"><input maxlength=48 name=subject size=48>
                    <td align=right valign=top bgcolor="#F7F7F7" class="big_txt">Your Message:</td>
                    <td bgcolor="#F7F7F7" class="normal_txt"><textarea class=general_text cols=50 name=body rows=10><?
if($original){echo "\n\n";
for($i=0; $i<30;$i++){
echo "-";}echo "\n";?>Original Message:<?echo "\n"."\n";?><?echo stripslashes($original);}?></textarea>
                    <td align=middle colspan=2><input name="imageField" type="image" src="images/send_me.jpg" width="81" height="13" border="0">
                        <input type=hidden name=submit value="Send message">
                        <input type=hidden name=original value="<?echo $original?>">
          </FORM>[/code] ::)

Share this post

Link to post
Share on other sites
Any help on fixing this error would be mutch apreciated! :P

Share this post

Link to post
Share on other sites
Well thanks for all the help guys... Oh wait i fixed it my self haha.
I used this instead of the menu cause it seems no one know how to make it work:
<input type="text" name="sendto" value=<?echo $send?>>
Now its ok but might be hard for people who dont knoe users ID

Share this post

Link to post
Share on other sites


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.