[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

12/12/2005 at 11:25PM PST, ID: 21662468
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.6

how do i send an email to this person ...

Asked by yuanzhun in PHP and Databases

Tags: php, email, send, person

hi there .. this is my question how do i combine this two code together .. 1 is the sending of email code, the other is the page where i can click on submit email and the mail will be generated and send to the user ...

1. email code

$query = "SELECT * FROM Auth.Auth, Staff.Staff from Auth, Staff where Auth.staffID = Staff.staffID";

          $result = mysql_query ($query, $mysql_connection) or die(mysql_error());
   
         // There is only one matching row
         $row = mysql_fetch_array($result);
 
          // Start by setting up the "to" address

            $to = $row["staffName"] . " " .
                  $row["staffID"] . ">";
                         
    // Now, setup the "subject" line
    $subject = "<p align=center class='text'><b>Account Confirmation</b></p>";
 
    // Now, put together the body of the email
    $out = "<p class='text'>Dear User,<br>" .
            "<br>Welcome to Infused Computer Fault System<br>";
 
            $out.= "<br>Your account (reference#" . $authID .") has been created successfully. " ;
         
       
       $mail = mail(" ".$row["email"]. " ",
                                                "Infused Solution Computer Fault System Reference No.",
                                                                        "Your account (reference#" . $authID ." )has been created successfully. " .
                                                                  " Your User ID ( ".$staffID.") and Password (".password." )" .  
                                                                 "Please quote this reference number in any correspondence. " ,
                                                                        "From: The CFS Team");

2. Page to submit the email

<?php
include ("topbar.php");
?>

<body>

<table width="800" border="0" align="center">
  <tr>
    <td><table width="334" border="0
  " align="left" cellpadding="1">
      <tr></tr>
        <td colspan="2"><span class="style1">Register Account</span></td>
      </tr><form action="addaccountconfirm.php" method="post">
        <?
        print("<tr>");
     print("<td align=left>Department: &nbsp");
     print("<td>");
     $query = "select * from Department order by deptName";
$query_result = mysql_query ($query, $mysql_connection);

print("<form action='staffaddconfirm.php' method=POST name='department'>");
     // Use a droplist to display all categories from the Category table
   
     $displaydepartment = "<select name='deptID' onchange='return refresh_page(this.value)'> <option value=0> -- Select One -- </option>";
                      
                           while ($departmentlist = mysql_fetch_array($query_result))
                         {
                                     
                                   $deptID = $departmentlist["deptID"];
                                   $deptName = $departmentlist["deptName"];
                             
                                            if (!empty($_GET['deptID']))
                                             {
                                          //       $displaydepartment .= "<option value = ".$deptID.">".$deptName."</option>";
                                          $displaydepartment .= "<option value ='".$deptID."' ". ($deptID==$_REQUEST["deptID"]?"selected":"").">".$deptName."</option>";
                                          }
                                          else
                                          {
                                          //$displaydepartment .= "<option value ='".$deptID."' ". ($deptID==$_REQUEST["deptID"]?"selected":"").">".$deptName."</option>";
                               $displaydepartment .= "<option value = ".$deptID.">".$deptName."</option>";
                                          }
                                     }
                                     
$displaydepartment .= "</select>";
print $displaydepartment;    
     
?>
      <tr>
        <td><div align="left">Staff Name: </div></td>
            <td>
            <?
            if (!empty($_GET['deptID']))
       {
    $query1 = "select * from Staff where deptID='".$_REQUEST["deptID"]."' order by staffName";
   //  $query1 = "select * from Staff where deptID= '$deptID' order by staffName";
     $query_result1 = mysql_query ($query1, $mysql_connection);
}
else
{
$query1 = "select * from Staff where deptID= '0' order by staffName";
     $query_result1 = mysql_query ($query1, $mysql_connection);
       }
print("<form action='staffaddconfirm.php' method=POST>");
     // Use a droplist to display all categories from the Category table
     
     $displaystaff = "<select name='staffID'> <option value=0> -- Select One -- </option>";
               while ($stafflist = mysql_fetch_array($query_result1))
                         {
                                   $staffID = $stafflist["staffID"];
                                   $staffName = $stafflist["staffName"];
                                   $displaystaff .= "<option value = ".$staffID.">".$staffName."</option>";
                         }
$displaystaff .= "</select>";
print $displaystaff;    

     
?>
 </td>
      </tr>
      <tr>
        <td><div align="left">Password:</div></td>
        <td><input type="password" name="apass"></td>
      </tr>
      <tr>
        <td><div align="left">Re-Type Password: </div></td>
        <td><input type="password" name="repass"></td>
      </tr>
      <tr>
        <td><div align="left">Account Type: </div></td>
            <? $query1 = "select * from Account_Type order by accountType";
$query_result1 = mysql_query ($query1, $mysql_connection); ?>
<td>
<? $displayaccountType = "<select name='accountType'> <option value=0> -- Select -- </option>";
                  while ($accountTypelist = mysql_fetch_array($query_result1))
                              {
                                          $accountType = $accountTypelist["accountType"];
                                          $displayaccountType .= "<option value = '.accountType.'>".$accountType."</option>";
                              }
      $displayaccountType .= "</select>";
      print $displayaccountType;      
      
      
       
?>
</td>
      </tr>
        
        <tr>
        <td align="center">
          <div align="left"> </div>
          <input name="Clear2" type="reset" id="Clear" value="Clear"><input type="submit" name="Submit2" value="Submit"></td>
       </td>
      </tr>
      <tr>
        <td colspan="2" align="right">&nbsp;</td>
      </tr>
    </table>
  </tr>
</table>
</form>
</body>
</html>
<?php

include ("bottombar.php");
?>
<script language="javascript">
function refresh_page(dept_id)
{
     top.location.href= "addaccount.php?deptID=" + dept_id; //change department.php with your php file name
     return false;
}
</script>

thanks
[+][-]12/13/05 12:21 AM, ID: 15472327

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/13/05 01:47 AM, ID: 15472650

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/13/05 01:48 AM, ID: 15472652

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/13/05 02:01 AM, ID: 15472701

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/13/05 02:21 AM, ID: 15472763

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: PHP and Databases
Tags: php, email, send, person
Sign Up Now!
Solution Provided By: WoodyRoundUp
Participating Experts: 2
Solution Grade: A
 
 
[+][-]12/13/05 03:18 AM, ID: 15472994

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]03/17/06 08:21 AM, ID: 16217242

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]03/21/06 02:28 AM, ID: 16245376

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-91