Jump to content

jrodd32

Members
  • Posts

    41
  • Joined

  • Last visited

    Never

Everything posted by jrodd32

  1. Because the query is looking for superintendants they are in charge of more than one school.  Does that make the each of the results different? I implymented the array_unique like this: [code] if($coaches=mysql_fetch_array($coachlist))     {     $nodup=array();     $nodup=array_unique($coaches);     while($nodup=mysql_fetch_array($coachlist))     {       printf('%-25s ',$nodup[$coach]);       printf('%-30s ',$nodup[school]);       printf('%-20s ',$nodup[city]);       printf('%-20s ',$nodup[phone]);       printf('%-20s ',$nodup[faxphone]);       printf('%-50s ',$nodup[$email]);       print('<br>');     }     }[/code] or is that not the proper way to use that function?, because I am still getting the same duplicates. Could I just search for repeating names?
  2. I am trying to remove the duplicates from an array that is being created from a mySQL database.  The array is created like this: [code] function init_coaches($coach,$email,$sport) {    if (!($db = @mysql_connect(*, '*','*')))    {;      print 'Temporarily unable to connect to database server. Please try again later.';      exit;    }    mysql_select_db('Scoreboard',$db);    global $coaches;    $coaches=mysql_fetch_array(mysql_query("SELECT KHSAA_Schools.* FROM KHSAA_Schools where member=\"T\""));    global $coachlist;    $coachlist=mysql_query("SELECT $coach, school, $email, address1, address2, city, zip, phone, athphone, faxphone FROM KHSAA_Schools WHERE member=\"T\" and $sport=\"T\" order by school"); }[/code] and accessed like this: [code]while($coaches=mysql_fetch_array($coachlist))     {       printf('%-25s ',$coaches[$coach]);       printf('%-30s ',$coaches[school]);       printf('%-20s ',$coaches[city]);       printf('%-20s ',$coaches[phone]);       printf('%-20s ',$coaches[faxphone]);       printf('%-50s ',$coaches[$email]);       print('<br>');     }     print ("Total: $count");[/code] I tried to put this in as a fix: [code]    if(in_array($coaches[$coach], $coaches))       next($coaches);     else print stuff above     {[/code] That didn't work.  Any suggestions?
  3. I am not completely sure I understand what you are saying.  Are you saying to save the current question number as a variable then print that question?  If so what would be the code to do something like that? Namely how would I control that on continue the next question would appear?
  4. I read in my php book and I am not sure how saving the question will help, I need to be able to print the 100 questions consequtively, but one at a time following the continue button being pushed
  5. Well my ultimate goal is to have the questions show up one at a time and the user select their answer and hit submit to save the answer and continue to the next question.  Is that possible without making a hundred different pages? Do I need to redo my logic completely?
  6. I have a scrambled test that I need to display one at a time.  However it is displaying all at once.  How would I control this? Thanks By the way, I am using sessions [code] <?php $qnum=0; for($count=0;$count<100;$count++) #count of number of questions { if($qnum>99) #keeps the question number in the proper range of 0-99   $qnum=$qnum-99; else   $qnum=$qnum; if(in_array($qnum,$used )) #checks to see if current question number is already in the array of used numbers {   $qnum=$qnum+1;   $question=$tQ[$qnum];   $used[$count]=$qnum; } else {   $question=$tQ[$qnum];   $used[$count]=$qnum; } echo("Count: $count <br>" . "Random Number: $skip <br>" . "Question Number: $qnum <br>" . "$question <br>"); $qnum=$qnum+$skip; } ?> [/code]
  7. Revamped to code to: [code] <?php $i=0; $a=0; for($i=0;$i<100;$i++) {   $question=$tQ[$a];       echo ("Count - $i");       echo ("Random Number - $skip");       echo ("Current Question - $a <br>");       echo ("$question <br><br>");   $used[$i]=$a;   $a=$a+$skip;   if($a>99)   {     $a=$a-99;     for($b=0;$b<100;$b++)     {       if($used[$b]==$a)         $a=$a+1;       else         $a=$a;     }   } } ?> [/code] So now the only problem is getting the questions to print one at a time instead of: Count - 0Random Number - 8Current Question - 0 Each individual state high school association shall develop and utilize a specified weight-control program, which will discourage excessive weight reduction. Count - 1Random Number - 8Current Question - 8 On matters of judgment, the referee will use the NFHS wrestling rules and interpretations, and his decision shall be final. Count - 2Random Number - 8Current Question - 16 During the end-of-match procedure, the assist referee should be at the scorer's table. Count - 3Random Number - 8Current Question - 24 Hair that is as abrasive as an unshaved face is not included in the wrestler's appearance rule. Count - 4Random Number - 8Current Question - 32 Weigh-in times for dual meets may begin a maximum of one hour prior to the scheduled starting time of the meet. Count - 5Random Number - 8Current Question - 40 A near fall must be held for a minimum of one second in order to earn two points. Count - 6Random Number - 8Current Question - 48 As soon as a wrestler earns a 15-point advantage over his opponent, the match is stopped and a technical fall awarded. Count - 7Random Number - 8Current Question - 56 The first period of all matches shall start from the neutral position. Count - 8Random Number - 8Current Question - 64 For any wrestler who is bleeding, a maximum of five minutes will be allowed to control the bleeding, and there is also a limit of two occurrences per match. Count - 9Random Number - 8Current Question - 72 During the overtime/tiebreaker periods, each wrestler is given an additional time-out for injury, but the 1½ minute timeframe is not to be extended. Count - 10Random Number - 8Current Question - 80 It is illegal when a hold is forced to the limit of normal range of movement. Count - 11Random Number - 8Current Question - 88 Following two cautions, there is a 1-point penalty for each subsequent infraction for false start or incorrect starting position. Count - 12Random Number - 8Current Question - 96 Use of tobacco product by a coach is a warning when first detected. Count - 13Random Number - 8Current Question - 5 A slam can occur from any wrestling position. Count - 14Random Number - 8Current Question - 13 The timekeeper is responsible for all timing during the match. Count - 15Random Number - 8Current Question - 21 Wrestlers shall wear wrestling ear guards, which provide no injury hazard to the opponent. Count - 16Random Number - 8Current Question - 29 During tournament weigh-ins, a wrestler is permitted only one attempt to make the prescribed weight. Count - 17Random Number - 8Current Question - 37 Wrestlers are not required to shake hands at the end of each match. Count - 18Random Number - 8Current Question - 45 Near-fall criteria is met when one shoulder is on the mat and the other shoulder is held less than 90 degrees from the mat. Count - 19Random Number - 8Current Question - 53 The coach of a wrestler or the wrestler does not have the prerogative to default a match in progress or during an injury time-out by informing the referee. Count - 20Random Number - 8Current Question - 61 When no points are scored in the regular match, the referee flips a disk before the overtime begins to determine choice of position in the event of a tiebreaker. Count - 21Random Number - 8Current Question - 69 Only the first offensive points shall be considered in determining which wrestler has the choice to begin the ultimate tiebreaker. Count - 22Random Number - 8Current Question - 77 Any wrestler applying a legal hold shall not be penalized when the opponent turns it into an illegal hold. Count - 23Random Number - 8Current Question - 85 The chicken wing is categorized as an illegal hold. Count - 24Random Number - 8Current Question - 93 The rules state that a maximum of two team personnel are permitted at the edge of the mat, but this does not include medical personnel. Count - 25Random Number - 8Current Question - 2 There can be a technical violation of fleeing the mat even if near-fall points have been earned. Count - 26Random Number - 8Current Question - 10 The referee has final authority as to an artificial limb even though a state association has approved its use. Count - 27Random Number - 8Current Question - 18 The timekeeper shall determine if a situation occurred before or after the expiration of a period. Count - 28Random Number - 8Current Question - 26 If a state uses the growth allowance, all wrestlers are eligible for the allowance. Count - 29Random Number - 8Current Question - 34 The conclusion of wrestling occurs when the wrestlers complete their handshake. Count - 30Random Number - 8Current Question - 42 When a defensive wrestler refuses to aggressively attempt escapes or reversals, it is stalling. Count - 31Random Number - 8Current Question - 50 In dual-meet competition, a forfeit is scored the same number of points as a fall. Count - 32Random Number - 8Current Question - 58 At the meeting with the captains, prior to the start of a dual meet, the team winning the disk flip may choose either the odd or even matches or may defer the choice. Count - 33Random Number - 8Current Question - 66 If a coach believes the referee has made an error concerning a judgment call, he may request a referee-coach conference. Count - 34Random Number - 8Current Question - 74 Special equipment is defined as anything other than what is required by rule. Count - 35Random Number - 8Current Question - 82 The referee shall promptly stop all holds that are being used for punishment. Count - 36Random Number - 8Current Question - 90 Each infraction has its specific penalty. Count - 37Random Number - 8Current Question - 98 When a wrestler, coach, other team personnel or spectator is removed for unsportsmanlike conduct, the team score will be reduced by two points. Count - 38Random Number - 8Current Question - 7 The assistant referee is responsible for communications to the coaches. Count - 39Random Number - 8Current Question - 15 If the assistant referee disagrees with the referee, the referee shall stop the match to discuss the situation. Count - 40Random Number - 8Current Question - 23 A shirt worn underneath the sleeveless shirt need not be approved by the referee. Count - 41Random Number - 8Current Question - 31 All wrestlers must be in the designated weigh-in area at the time weigh-ins are scheduled to begin. Count - 42Random Number - 8Current Question - 39 A default is awarded when a wrestler fails to appear for a match. Count - 43Random Number - 8Current Question - 47 The mat area is only the wrestling mat. Count - 44Random Number - 8Current Question - 55 Overtime is not an extension of the regular match. Count - 45Random Number - 8Current Question - 63 Either coach may request a time-out, if he thinks his wrestler is injured. Count - 46Random Number - 8Current Question - 71 If no scoring occurs during the ultimate tiebreaker, the offensive wrestler will be declared the winner. Count - 47Random Number - 8Current Question - 79 Grasping the ear guards of one's opponent is considered an illegal hold. Count - 48Random Number - 8Current Question - 87 The figure-four around the head, from the neutral position, is an illegal hold. Count - 49Random Number - 8Current Question - 95 Penalties and warnings are cumulative throughout the match. Count - 50Random Number - 8Current Question - 4 When it becomes necessary for the referee and assistant referee to confer, the conference shall be held at the scoring table. Count - 51Random Number - 8Current Question - 12 Anytime a wrestler is out of bounds, the referee shall stop the match. Count - 52Random Number - 8Current Question - 20 It is permissible for the referee to view a TV monitor to assist in making a decision relative to the match. Count - 53Random Number - 8Current Question - 28 The actual weight of a wrestler determines in which two weight classes the competitors may compete. Count - 54Random Number - 8Current Question - 36 The first period of a consolation match may be one or two minutes in length. Count - 55Random Number - 8Current Question - 44 A match is from the start of the first period until the conclusion of wrestling. Count - 56Random Number - 8Current Question - 52 Errors involving the recording or computation of team scores must be corrected within 15 minutes of the conclusion of the dual meet. Count - 57Random Number - 8Current Question - 60 If a wrestler is injured or indicates an injury, the referee must stop the match. Count - 58Random Number - 8Current Question - 68 The wrestler who scores the first points in the one-minute sudden victory period will be declared the winner. Count - 59Random Number - 8Current Question - 76 Any hold used for punishment is illegal. Count - 60Random Number - 8Current Question - 84 Wrestlers should know the dangers of potentially dangerous holds. Count - 61Random Number - 8Current Question - 92 Flagrant misconduct will disqualify any individual from the remainder of a multiple school event or tournament. Count - 62Random Number - 8Current Question - 1 Pulling back as opposed to grasping the thumb or one, two or three fingers of an opponent's hand is an illegal hold. Count - 63Random Number - 8Current Question - 9 The assistant referee shall use his whistle in the same manner as the referee. Count - 64Random Number - 8Current Question - 17 The official scorer shall circle the first point(s) scored in the match. Count - 65Random Number - 8Current Question - 25 State associations may adopt different weigh-in procedures for dual meets than those outlined by the NFHS rules book. Count - 66Random Number - 8Current Question - 33 If an artificial limb is to be used, the wrestler must weigh in with the artificial limb. Count - 67Random Number - 8Current Question - 41 Biting is an act of flagrant misconduct. Count - 68Random Number - 8Current Question - 49 The opponent of a wrestler who has used his five minutes of bleeding time will be awarded one point for each additional stoppage for bleeding. Count - 69Random Number - 8Current Question - 57 There is no rest period between periods in a wrestling contest. Count - 70Random Number - 8Current Question - 65 After three stoppages for adjustment of ear guards, the official may award one penalty point to the opponent. Count - 71Random Number - 8Current Question - 73 If a takedown or reversal straight to the back occurs, the match will be stopped as points have been scored. Count - 72Random Number - 8Current Question - 81 A double arm bar from the front, with the hands locked under the armpit, is illegal. Count - 73Random Number - 8Current Question - 89 Coach misconduct occurs when a coach improperly questions the referee. Count - 74Random Number - 8Current Question - 97 If a coach receives an unsportsmanlike conduct penalty on the first day of a tournament and, on the second day of the tournament he receives an additional unsportsmanlike conduct penalty, he shall be removed from the premises for the remainder of the tournament. Count - 75Random Number - 8Current Question - 6 The referee shall meet promptly and in the spirit of good sportsmanship when any situation develops unexpectedly. Count - 76Random Number - 8Current Question - 14 When officials penalize individuals and award points, they shall only use NFHS authorized signals. Count - 77Random Number - 8Current Question - 22 A bandanna is permissible as a hair cover. Count - 78Random Number - 8Current Question - 30 Multiple scales must be provided for weigh-in at tournaments. Count - 79Random Number - 8Current Question - 38 In tournament competition, the choice at the start of the second period is determined by a toss of the disk. Count - 80Random Number - 8Current Question - 46 A series of matches, one in each of the 14 weight classifications, constitutes a dual meet. Count - 81Random Number - 8Current Question - 54 In matches involving visually handicapped wrestlers, contact is to be maintained throughout the match. Count - 82Random Number - 8Current Question - 62 When penalizing any infraction, the match shall be stopped. Count - 83Random Number - 8Current Question - 70 When beginning the tiebreaker period, all points are removed and the score reverts to 0-0. Count - 84Random Number - 8Current Question - 78 A slam is considered illegal regardless of whether or not one's opponent is injured. Count - 85Random Number - 8Current Question - 86 When bringing your opponent to the mat, hands overlapping or interlocking beyond reaction time is a technical violation. Count - 86Random Number - 8Current Question - 94 Reporting to the mat not properly equipped or not ready to wrestle is a technical violation. Count - 87Random Number - 8Current Question - 3 The wrestler who scores the first point(s) during the ultimate tiebreaker of the overtime will be declared the winner. Count - 88Random Number - 8Current Question - 11 If the referee can determine the amount of time that should have been run off the clock, and it was because of a timer's error, he may deduct the time. Count - 89Random Number - 8Current Question - 19 State associations must adopt the assistant referee position before it can be used. Count - 90Random Number - 8Current Question - 27 More than one wrestler from each team may weigh in for a weight class for dual-meet-competitions. Count - 91Random Number - 8Current Question - 35 The order of weight class competition cannot be altered following the random draw. Count - 92Random Number - 8Current Question - 43 Control does not determine the awarding of points. Count - 93Random Number - 8Current Question - 51 If a takedown straight to the back from the neutral position is held for a period of two to four seconds, a total of four points will be scored. Count - 94Random Number - 8Current Question - 59 There is a one-minute rest between the third period and the start of the overtime. Count - 95Random Number - 8Current Question - 67 It is considered bad time when the wrong wrestler is given the choice of position at the start of the second period. Count - 96Random Number - 8Current Question - 75 The referee is the final authority as to a wrestler wearing eye protection. Count - 97Random Number - 8Current Question - 83 Should a body part be forced to its limit of normal range of motion, the hold should be considered potentially dangerous. Count - 98Random Number - 8Current Question - 91 Unsportsmanlike conduct penalties do not carry over in a multiple-day event. Count - 99Random Number - 8Current Question - 99 Unsportsmanlike conduct can occur by a coach prior to, during or after a contest.
  8. I am attempting to write a program that scrambles a 100 question test that I have saved into an array.  I generate a random number ($skip) and that is the way I am randomizing the test.  It automatically selects the first question of the test then it uses the $skip variable for progressing through the test.  The problem comes when I trying to print the test because I naturally want one question at a time to appear and the user to press the continue button to advance.  However it is printing like this: 1.3-Each individual state high school association shall develop and utilize a specified weight-control program, which will discourage excessive weight reduction.1.3-Pulling back as opposed to grasping the thumb or one, two or three fingers of an opponent's hand is an illegal hold.4.3-When it becomes necessary for the referee and assistant referee to confer, the conference shall be held at the scoring table.7.3-The assistant referee is responsible for communications to the coaches.10.3-The referee has final authority as to an artificial limb even though a state association has approved its use.13.3-The timekeeper is responsible for all timing during the match.16.3-During the end-of-match procedure, the assist referee should be at the scorer's table.19.3-State associations must adopt the assistant referee position before it can be used.22.3-A bandanna is permissible as a hair cover.25.3-State associations may adopt different weigh-in procedures for dual meets than those outlined by the NFHS rules book.28.3-The actual weight of a wrestler determines in which two weight classes the competitors may compete.31.3-All wrestlers must be in the designated weigh-in area at the time weigh-ins are scheduled to begin.34.3-The conclusion of wrestling occurs when the wrestlers complete their handshake.37.3-Wrestlers are not required to shake hands at the end of each match.40.3-A near fall must be held for a minimum of one second in order to earn two points.43.3-Control does not determine the awarding of points.46.3-A series of matches, one in each of the 14 weight classifications, constitutes a dual meet.49.3-The opponent of a wrestler who has used his five minutes of bleeding time will be awarded one point for each additional stoppage for bleeding.52.3-Errors involving the recording or computation of team scores must be corrected within 15 minutes of the conclusion of the dual meet.55.3-Overtime is not an extension of the regular match.58.3-At the meeting with the captains, prior to the start of a dual meet, the team winning the disk flip may choose either the odd or even matches or may defer the choice.61.3-When no points are scored in the regular match, the referee flips a disk before the overtime begins to determine choice of position in the event of a tiebreaker.64.3-For any wrestler who is bleeding, a maximum of five minutes will be allowed to control the bleeding, and there is also a limit of two occurrences per match.67.3-It is considered bad time when the wrong wrestler is given the choice of position at the start of the second period.70.3-When beginning the tiebreaker period, all points are removed and the score reverts to 0-0.73.3-If a takedown or reversal straight to the back occurs, the match will be stopped as points have been scored.76.3-Any hold used for punishment is illegal.79.3-Grasping the ear guards of one's opponent is considered an illegal hold.82.3-The referee shall promptly stop all holds that are being used for punishment.85.3-The chicken wing is categorized as an illegal hold.88.3-Following two cautions, there is a 1-point penalty for each subsequent infraction for false start or incorrect starting position.91.3-Unsportsmanlike conduct penalties do not carry over in a multiple-day event.94.3-Reporting to the mat not properly equipped or not ready to wrestle is a technical violation.97.3-If a coach receives an unsportsmanlike conduct penalty on the first day of a tournament and, on the second day of the tournament he receives an additional unsportsmanlike conduct penalty, he shall be removed from the premises for the remainder of the tournament.100.3-103.3-106.3-109.3-112.3-115.3-118.3-121.3-124.3-127.3-130.3-133.3-136.3-139.3-142.3-145.3-148.3-151.3-154.3-157.3-160.3-163.3-166.3-169.3-172.3-175.3-178.3-181.3-184.3-187.3-190.3-193.3-196.3-199.3-202.3-205.3-208.3-211.3-214.3-217.3-220.3-223.3-226.3-229.3-232.3-235.3-238.3-241.3-244.3-247.3-250.3-253.3-256.3-259.3-262.3-265.3-268.3-271.3-274.3-277.3-280.3-283.3-286.3-289.3-292.3-295.3-298.3- so my question is how to make the questions appear one at a time. [code] <?php session_start(); include 'vars.inc'; echo $header; global $PHP_SELF; ?> <HTML> <body> <form action="<?php echo($PHP_SELF) ?>" method="POST"> <div align="left"> <table border="1" cellpadding="1" cellspacing="1" width="50%"> <tr> <td> <?php   for ($i=0; $i<100; $i++)   {     if($i==0)      {       $question=0;       $question=$tQ[$i];       $used[0]=$i;       $i++;       echo $i;       echo ".";       echo $skip;       echo "-";       echo $question;      }     else      {       $i=$i+$skip;       if($i>100)       {         $i=$i-100;         for($j=0;$j<100;$j++)         {           if($used[$j]==$i)             $i++;           else     {               $used[$j]=$i;               $question=0;       $question=$tQ[$i];                     echo $i;     echo ".";     echo $skip;                     echo "-";                     echo $question;               $i=$i+$skip;             }         }        }      }    } ?> </td> </tr> <td> <input type="radio" name="True" value="True">True <input type="radio" name="False" value="False">False </td> <tr> <td> <input type="submit" name="signin" value="Submit"> <input type="??????" name="save" value="Save Button to Be"> </td> </tr> </table> </form> </body> </HTML>[/code]
  9. No if i had some html code it would appear like this: Ex. message=" <html><b>ID#:</b></hmtl> $row[id]; etc." would print exact like: <html><b>ID#:</b></html> 1002 in the message because PHP prints exactly what is within the " " and I am trying to either get around this or have some other solution to building the message body within the " ".
  10. Yeah, that's not the problem.  I am talking about getting around a PHP issue because it will print exactly what is contained within the " "'s.  I need to alter the script so that I can format my output, but I don't know how.
  11. I have a script that sends e-mail and I am trying to format the body of the message.  right now the code looks like: [code] $message="         ID: $row[id]         Name: $row[lname] $row[suffix], $row[fname]         Home Phone: $row[homephone]         Work Phone: $row[workphone]         E-Mail: $row[email] $explaination"; [/code] I would like for it to be in a table and some other HTML tags that would make it look nicer and more professional.  However, because it is inside the " " the HTML tags just print as they are instead of being functional.  Is there a way around this method of using the " " to build my message body? thanks
  12. Now the mysql.error() is telling me i have an error near    ="T" (notice the space), there is supposed to be $sport in there.  However, if I tell it to print $sport it will print the proper info. [code] function init_coaches($coach,$email,[b]$sport[/b]) {   $db = @mysql_connect('localhost', 'khsaa','executivedrive') or die ('Unable to Connect');   mysql_select_db('Scoreboard',$db) or die ("Unable to select database");   $query = "SELECT $coach, school, $email, address1, address2, city, zip, phone, athphone, faxphone FROM KHSAA_Schools WHERE member=\"T\" and [b]$sport[/b]=\"T\" order by school";   $coaches = mysql_query($query) or die ("Error in query: $query".mysql_error());   return $coaches; } [/code] error: Error in query: SELECT xcgcoach, school, xcgcoemail, address1, address2, city, zip, phone, athphone, faxphone FROM KHSAA_Schools WHERE member="T" and (notice the space) ="T" order by schoolYou have an error in your SQL syntax near '="T" order by school' at line 1
  13. Found that error, I am an idiot
  14. that took care of that error but caused Parse error: parse error, unexpected T_STRING, expecting T_VARIABLE or '$' in /home/httpd/vhosts/khsaa.org/subdomains/admin/httpdocs/jerrod/coaches/tool_kit.inc on line 148 however, there is a $ on line 148 which reads   $coaches=init_coaches(&coach,$email,$sport);
  15. [code] function init_coaches($coach,$email,$sport) {   $db = @mysql_connect('*', '*','*') or die ('Unable to Connect');   mysql_select_db('*',$db) or die ("Unable to select database");   $query = "SELECT $coach, school, $email, address1, address2, city, zip, phone, athphone, faxphone FROM KHSAA_Schools WHERE    member=\"T\" and $sport=\"T\" order by school";   $coaches = mysql_query($query) or die ("Error in query: $query".mysql_error()); } [/code] That is obviously my query.  Here is the line with the error [code] while($row=mysql_fetch_assoc($coaches)) //Line that contains error     {       printf('%-25s ',$row[$coach]);       printf('%-30s ',$row[school]);       printf('%-20s ',$row[city]);       printf('%-20s ',$row[phone]);       printf('%-20s ',$row[faxphone]);       printf('%-50s ',$row[$email]);       print('<br>');     } [/code]
  16. Linux server...and it does point to sendmail
  17. I am not recieving any errors yet I am also not recieving any email.  I checked the php.ini file and my sendmail binary is in the right spot so I am lost... [code] <?php while($row = mysql_fetch_assoc($officialslist))   {   if(($ID==$row[id])&&($SSWEB==$row[SSWEB]))   {     if(($sport == 'BA')||($sport == 'FB')||($sport == 'TR')||($sport == 'WR'))       {         $to='user1@webmail.khsaa.org,user2@webmail.khsaa.org,user3@webmail.khsaa.org';         foreach($source as $concern)           $subject=$concern;         $message="<br> $explaination         <br>         $row[id];         <br>         $row[lname].$row[suffix].', '.$row[fname];         <br>         $row[homephone];         <br>         $row[workphone];         <br>         $row[email]";         $headers='X-Mailer: PHP/' .phpversion();         mail($to, $subject, $message, $headers);       } ?>[/code]
  18. I am trying to send mail automatically within my form.  I have read the php manual and it says that it will display errors if there is a problem with the function.  However, I am getting no errors and no emails. [code] <?php while($row = mysql_fetch_assoc($officialslist))   {   if(($ID==$row[id])&&($SSWEB==$row[SSWEB]))   {     if(($sport == 'BA')||($sport == 'FB')||($sport == 'TR')||($sport == 'WR'))       {         $to='user1@webmail.khsaa.org,user2@webmail.khsaa.org,user3@webmail.khsaa.org';         foreach($source as $concern)           $subject=$concern;         $message="<br> $explaination         <br>         $row[id];         <br>         $row[lname].$row[suffix].', '.$row[fname];         <br>         $row[homephone];         <br>         $row[workphone];         <br>         $row[email]";         $headers='X-Mailer: PHP/' .phpversion();         mail($to, $subject, $message, $headers);       }     if(($sport == 'BK')||($sport == 'VB'))       {         $to='user1@webmail.khsaa.org,user2@webmail.khsaa.org,user3@webmail.khsaa.org';         foreach($source as $concern)           $subject=$concern;         $message="<br> $explaination         <br>         $row[id];         <br>         $row[lname].$row[suffix].', '.$row[fname];         <br>         $row[homephone];         <br>         $row[workphone];         <br>         $row[email]";         $headers='From: $row[email]' . "\r\n" . 'X-Mailer: PHP/' . phpversion();         mail($to, $subject, $message, $headers);       }     if(($sport == 'SO')||($sport == 'SW')||($sport == 'SP')||($sport == 'FP'))       {         $to='user1@webmail.khsaa.org,user2@webmail.khsaa.org,user3@webmail.khsaa.org';         foreach($source as $concern)           $subject=$concern;         $message="<br> $explaination         <br>         $row[id];         <br>         $row[lname].$row[suffix].', '.$row[fname];         <br>         $row[homephone];         <br>         $row[workphone];         <br>         $row[email]";         $headers='X-Mailer: PHP/' .phpversion();         mail($to, $subject, $message, $headers);       }     }   else   $row=mysql_fetch_assoc($officialslist);   } ?> [/code]
  19. I assume that mail function you are using is the one kenrbnsn was refering to?  Also, is: 'X-Mailer: PHP/' . phpversion(); exactally what I need to put or is that individual to my system. Thanks for the help
  20. I don't get any errors it just isn't sending the email to the people.  And when you hover over the code that is printed to the page it isn't formatted correctly at the bottom of the browser.  Ex.) mailto:....?&subject=Issue?&body=        %OA%OA      %OA  %OA there should be info where the blank spaces are.
  21. trying again... [code] <html> <a href="mailto:jtackett@khsaa.org,MDAY@KHSAA.ORG,JLONG@WEBMAIL.KHSAA.ORG?subject=<?php       foreach($source as $concern)         echo($concern);         ?>?&body=<?php            $explaination;            ?>            %OA%OA            <?php           $row[id];           ?>           %OA           <?php           $row[lname].$row[suffix].', '.$row[fname];           ?>           %OA           <?php           $row[homephone];           ?>           %OA           <?php           $row[workphone];           ?>           %OA           <?php           $row[email];           ?>           "> </html> [/code] By the way I can print out the data in all the fields of my php variables so I am gettting the information that I want it just isn't getting into the email properly
  22. It is not posting what i am putting into the text box area, it is cutting alot of the code off. I will attach the file [attachment deleted by admin]
  23. <a href="mailto:jtackett@khsaa.org,MDAY@KHSAA.ORG,JLONG@WEBMAIL.KHSAA.ORG?subject=<?php       foreach($source as $concern)         echo($concern);         ?>?&body=<?php           $explaination;           ?>           %OA%OA           <?php           $row[id];           ?>           %OA           <?php           $row[lname].$row[suffix].', '.$row[fname];           ?>           %OA           <?php           $row[homephone];           ?>           %OA           <?php           $row[workphone];           ?>           %OA           <?php           $row[email];           ?>           "> I must have missed some of it when I copied it...that is how it looks, that might actually be the problem, i am very new to php and having problems when i have to combine it and html
  24. This is a co-problem between php and html so I am not sure where to put it...but anyway... I am trying to get the information that people are entering into my form into an email that is automatically sent to the proper people upon submit.  However, it is not working properly, it is not picking up the body of the message that I would like it to see. Here is the code: <a href="mailto:user1@webmail.khsaa.org,USER2@WEBMAIL.KHSAA.ORG,USER3@WEBMAIL.KHSAA.ORG?subject=<?php       foreach($source as $concern)         echo($concern);         ?>?&body=<?php           $explaination;           ?>           %OA%OA           <?php           $row[id];           ?>           %OA           <?php           $row[lname].$row[suffix].', '.$row[fname];           ?>           %OA           <?php           $row[homephone];           ?>           %OA           <?php           $row[workphone];           ?>           %OA           <?php           $row[email];           ?>           ">
×
×
  • 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.