title: adding an apostrophe to submitted variable into database
body: <p>I have been struggling with this code. I am not able to add a name like O'Brian. When using an apostrophe I am receiving the error "Error updating Team details: You have an error in your SQL syntax;" When I take the apostrophe out of the form, it runs ok. Where am I failing?</p>
  
  <pre><code>if (isset($_POST['submit'])): 
  $TeamName = mysql_real_escape_string($_POST['TeamName']); 
  
  $sql = "UPDATE Team SET TeamName = 'TeamName'  WHERE id ='$id'";
  
  else:
  
  $id = $_GET['id']; 
  
  $EditTeam=@mysql_query("SELECT *
                        FROM Team 
                        WHERE ID='$id'"); 
  if (!$EditTeam) { 
  die('&lt;p&gt;Error fetching Team details: ' . 
      mysql_error() . '&lt;/p&gt;'); 
  } 
  
  $Team = mysql_fetch_array($EditTeam); 
  
  $TeamName =  stripslashes($Team['TeamName']); 
  </code></pre>
  
  <hr>
  
  <p>Here is the entire code!
      
      
      
      </p>
  
  <pre><code>&lt;head&gt;
  &lt;title&gt;Update Contact Info&lt;/title&gt;
  &lt;script type="text/javascript"&gt; 
  var newWindow = null; 
  
  function closeWin(){ 
  if (newWindow != null){ 
  if(!newWindow.closed) 
  newWindow.close(); 
  } 
  } 
  
  function popUpWin(url, type, strWidth, strHeight){ 
  
  closeWin(); 
  
  if (type == "fullScreen"){ 
  
  strWidth = screen.availWidth - 10; 
  strHeight = screen.availHeight - 160; 
  } 
  
  var tools=""; 
  if (type == "standard" || type == "fullScreen") tools = "resizable,toolbar=yes,location=yes,scrollbars=yes,menubar=yes,width="+strWidth+",height="+str    Height+",top=0,left=0"; 
  if (type == "console") tools = "resizable,toolbar=no,location=no,scrollbars=yes,width="+strWidth+",height="+strHeight+",left=    0,top=0"; 
  newWindow = window.open(url, 'newWin', tools); 
  newWindow.focus(); 
  } 
  &lt;/script&gt; 
  &lt;/head&gt;
  &lt;body alink="#0033FF"  link="#0033FF" vlink="#0033FF"&gt;
  &lt;center&gt;
  &lt;?php include 'memberheader_b_ball.php';?&gt;
  &lt;/center&gt;
  
  &lt;?php
  $ID = mysql_real_escape_string($_GET['id']); 
  
  
  if (isset($_POST['submit'])): 
  // The team's details have 
  // been updated. 
  
  
  $TeamName = mysql_real_escape_string($_POST['TeamName']); 
  $ID = $_POST['id'];
  $teamage = $_POST['teamage'];
  $teamcity = $_POST['teamcity'];
  $teamstate = $_POST['teamstate'];
  $division = $_POST['division'];
  $contactname = $_POST['contactname'];
  $contactlname = $_POST['contactlname'];
  $contactaddressmore = $_POST['contactaddressmore'];
  $contactaddress = $_POST['contactaddress'];
  $contactcity = $_POST['contactcity'];
  $contactstate = $_POST['contactstate'];
  $contactcountry = $_POST['contactcountry'];
  $contactzip = $_POST['contactzip'];
  $contactphone = $_POST['contactphone'];
  $contactcphone = $_POST['contactcphone'];
  $contactfax = $_POST['contactfax'];
  $contactemail = $_POST['contactemail'];
  $coachname = $_POST['coachname'];
  $coachlname = $_POST['coachlname'];
  $coachaddress = $_POST['coachaddress'];
  $coachcity = $_POST['coachcity'];
  $coachstate = $_POST['coachstate'];
  $coachzip = $_POST['coachzip'];
  $coachsphone = $_POST['coachphone'];
  $coachfax = $_POST['coachfax'];
  $coachemail = $_POST['coachemail'];
  
  
  $sql = "UPDATE Team SET 
  
        TeamName = 'TeamName',
                teamage='$teamage',
        teamcity='$teamcity',
        teamstate='$teamstate',
        division='$division',
        contactname='$contactname',
        contactlname='$contactlname',
        contactaddress='$contactaddress',
        contactaddressmore='$contactaddressmore',
        contactcity='$contactcity',
        contactcountry='$contactcountry',
        contactstate='$contactstate',
        contactzip='$contactzip',
        contactphone='$contactphone',
        contactcphone='$contactcphone',
        contactfax='$contactfax',
        coachname='$coachname',         
        coachlname='$coachlname',
        coachaddress='$coachaddress',
        coachcity='$coachcity',
        coachstate='$coachstate',
        coachzip='$coachzip',
        coachphone='$coachphone',
        coachfax='$coachfax',
        coachemail='$coachemail'
        WHERE id ='$ID'"; 
  
  
  
  if (mysql_query($sql)) { 
  echo("&lt;div align='center'&gt;
  &lt;p&gt;&amp;nbsp;&lt;/p&gt;
  &lt;p&gt;&amp;nbsp;&lt;/p&gt;
  &lt;p&gt;&amp;nbsp;&lt;/p&gt;
  
  &lt;p&gt;&lt;font size='6' face='Arial, Helvetica, sans-serif'&gt;&lt;ul&gt;&lt;strong&gt;Processing your request, one moment.&lt;/strong&gt;&lt;/font&gt;&lt;br&gt;
  &lt;img src=\"images/animated_timer_bar.gif\" width=\"220\" height=\"18\"&gt;&lt;/p&gt;&lt;/div&gt; 
  &lt;meta http-equiv=\"refresh\" content=\"1;URL=editcontact.php?id=$id\"&gt;");      
  
  } else { 
  die('&lt;p&gt;Error updating Team details: ' . mysql_error() . '&lt;/p&gt;'); 
  }
  
  ?&gt;
  &lt;p&gt; 
  &lt;?php
  else: // Allow the user to edit the Team 
    // with ID=$id 
  
  //$ID = mysql_real_escape_string($_GET['id']); 
  
  $EditTeam=@mysql_query("SELECT *
                        FROM Team 
                        WHERE ID='$id'"); 
  if (!$EditTeam) { 
  die('&lt;p&gt;Error fetching Team details: ' . 
      mysql_error() . '&lt;/p&gt;'); 
  } 
  
  $Team = mysql_fetch_array($EditTeam); 
  
  $TeamName =  stripslashes($Team['TeamName']); 
  $id = $Team['ID'];
  $teamage = $Team['teamage'];
  $teamcity = $Team['teamcity'];
  $teamstate = $Team['teamstate'];
  $division = $Team['division'];
  $contactname = $Team['contactname'];
  $contactlname = $Team['contactlname'];
  $contactaddress = $Team['contactaddress'];
  $contactaddressmore = $Team['contactaddressmore'];
  $contactcountry = $Team['contactcountry'];
  $contactcity = $Team['contactcity'];
  $contactstate = $Team['contactstate'];
  $contactzip = $Team['contactzip'];
  $contactphone = $Team['contactphone'];
  $contactcphone = $Team['contactcphone'];
  $contactfax = $Team['contactfax'];
  $contactemail = $Team['contactemail'];
  $coachname = $Team['coachname'];
  $coachlname = $Team['coachlname'];  
  $coachaddress = $Team['coachaddress'];
  $coachcity = $Team['coachcity'];
  $coachstate = $Team['coachstate'];
  $coachzip = $Team['coachzip'];
  $coachphone = $Team['coachphone'];
  $coachfax = $Team['coachfax'];
  $coachemail = $Team['coachemail'];
  $notes = $Team['notes'];
  $wait1 = $Team['wait1'];
  $wait2 = $Team['wait2'];
  $wait3 = $Team['wait3'];
  $wait4 = $Team['wait4'];
  $wait5 = $Team['wait5'];
  
  
  
  
  // Convert HTML special characters 
  // in database value for use in 
  // an HTML document. 
  $contactemail = htmlspecialchars($contactemail);
  $coachemail = htmlspecialchars($coachemail);
  
  $EditGames=@mysql_query("SELECT *
                        FROM Games 
                        WHERE GID='1'"); //GID = Games ID
  if (!$EditGames) { 
  die('&lt;p&gt;Error fetching Team details: ' . 
      mysql_error() . '&lt;/p&gt;'); 
  } 
  
  $Games = mysql_fetch_array($EditGames); 
  
  $tourney1date = $Games['tourney1date']; 
  $tourney2date = $Games['tourney2date']; 
  $tourney3date = $Games['tourney3date']; 
  $tourney4date = $Games['tourney4date']; 
  $tourney5date = $Games['tourney5date']; 
  $tourney1name = $Games['tourney1name']; 
  $tourney2name = $Games['tourney2name']; 
  $tourney3name = $Games['tourney3name']; 
  $tourney4name = $Games['tourney4name']; 
  $tourney5name = $Games['tourney5name']; 
  $tourney1city = $Games['tourney1city']; 
  $tourney2city = $Games['tourney2city']; 
  $tourney3city = $Games['tourney3city']; 
  $tourney4city = $Games['tourney4city']; 
  $tourney5city = $Games['tourney5city'];   
  
  if ($notes == '') {
  $message = '';
  } else {
  $message = 'You have a message! Click to read it';
  }
  if ($wait1 == 'yes') {
  $pay1 = 'Print a personal &lt;a href="paymentform1.php?id=';        
  $id1 = $Team['ID'];
  $end1 = '"&gt;'. $tourney1name .'&lt;/a&gt; payment form.&lt;br&gt;';}
  
  if ($wait2 == 'yes') {
  $pay2 = 'Print a personal &lt;a href="paymentform2.php?id=';        
  $id2 = $Team['ID'];
  $end2 = '"&gt;'. $tourney2name .'&lt;/a&gt; payment form.&lt;br&gt;';}
  
  if ($wait3 == 'yes') {
  $pay3 = 'Print a personal &lt;a href="paymentform3.php?id=';        
  $id3 = $Team['ID'];
  $end3 = '"&gt;'. $tourney3name .'&lt;/a&gt; payment form.&lt;br&gt;';}
  
  if ($wait4 == 'yes') {
  $pay4 = 'Print a personal &lt;a href="paymentform4.php?id=';        
  $id4 = $Team['ID'];
  $end4 = '"&gt;'. $tourney4name .'&lt;/a&gt; payment form.&lt;br&gt;';}
  
  if ($wait5 == 'yes') {
  $pay5 = 'Print a personal &lt;a href="paymentform5.php?id=';        
  $id5 = $Team['ID'];
  $end5 = '"&gt;'. $tourney5name .'&lt;/a&gt; payment form.&lt;br&gt;';}
  
  
  
  
  ?&gt;
  &lt;font face="Arial, Helvetica, sans-serif"&gt;
  &lt;?
  $var =  mysql_real_escape_string("O'Brian");
  echo $var;
  
  $var = stripslashes($var);
  echo $var;
  ?&gt; &lt;/font&gt;
  &lt;form action= "editcontact.php?id=&lt;?=$ID?&gt;" method="post"&gt;
  &lt;font face="Arial, Helvetica, sans-serif"&gt;
  &lt;input type="hidden" name="id" value="&lt;?=$ID?&gt;" /&gt;
  &lt;div align="center"&gt;
  &lt;table width="80%" border="0" cellspacing="0" cellpadding="5"&gt;
    &lt;tr&gt; 
      &lt;td width="15%"&gt;&lt;div align="left"&gt;&lt;font face="Arial, Helvetica, sans-serif"&gt; 
          &lt;input type="submit" name="submit" value="Save Changes" /&gt;
          &lt;/font&gt; &lt;/div&gt;&lt;/td&gt;
     &lt;td width="85%"&gt;&lt;div align="right"&gt;
          &lt;table width="387"&gt;
            &lt;tr&gt; 
              &lt;td width="379"&gt;&amp;nbsp;&lt;/td&gt;
            &lt;/tr&gt;
          &lt;/table&gt;
  
        &lt;/div&gt;
     &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
  
  &lt;/div&gt;
  &lt;/font&gt; &lt;font face="Arial, Helvetica, sans-serif"&gt;
  &lt;hr align="center" width="80%" /&gt;
  &lt;/font&gt; 
  &lt;center&gt;
  &lt;table width="80%" border="0" cellspacing="0" cellpadding="5"&gt;
    &lt;tr&gt; 
      &lt;td&gt;&lt;font face="Arial, Helvetica, sans-serif"&gt;&lt;strong&gt;Select division 
        for team.&lt;/strong&gt; &lt;br /&gt;
        &lt;/font&gt; &lt;table width="98%" border="0" cellspacing="0" cellpadding="5"&gt;
          &lt;tr&gt; 
            &lt;td width="11%"&gt;&lt;div align="center"&gt;&lt;font face="Arial, Helvetica, sans-serif"&gt;&lt;strong&gt;8U&lt;/strong&gt; 
                &lt;input type="radio" name="division" value="8U"&lt;?php if ($division == "8U") echo ("checked");?&gt; /&gt;
                &lt;/font&gt;&lt;/div&gt;&lt;/td&gt;
            &lt;td width="11%"&gt;&lt;div align="center"&gt;&lt;font face="Arial, Helvetica, sans-serif"&gt;&lt;strong&gt;10U&lt;/strong&gt; 
                &lt;input type="radio" name="division" value="10U"&lt;?php if ($division == "10U") echo ("checked");?&gt; /&gt;
                &lt;/font&gt;&lt;/div&gt;&lt;/td&gt;
            &lt;td width="11%"&gt;&lt;div align="center"&gt;&lt;font face="Arial, Helvetica, sans-serif"&gt;&lt;strong&gt;12U&lt;/strong&gt; 
                &lt;input type="radio" name="division" value="12U"&lt;?php if ($division == "12U") echo ("checked");?&gt; /&gt;
                &lt;/font&gt;&lt;/div&gt;&lt;/td&gt;
            &lt;td width="12%"&gt;&lt;div align="center"&gt;&lt;font face="Arial, Helvetica, sans-serif"&gt;&lt;strong&gt;14U&lt;/strong&gt;&lt;br /&gt;
                &lt;input type="radio" name="division" value="14U"&lt;?php if ($division == "14U") echo ("checked");?&gt; /&gt;
                &lt;/font&gt;&lt;/div&gt;&lt;/td&gt;
            &lt;td width="12%"&gt;&lt;div align="center"&gt;&lt;font face="Arial, Helvetica, sans-serif"&gt;&lt;strong&gt;16U&lt;br /&gt;
                &lt;/strong&gt; 
                &lt;input type="radio" name="division" value="16U"&lt;?php if ($division == "16U") echo ("checked");?&gt; /&gt;
                &lt;/font&gt;&lt;/div&gt;&lt;/td&gt;
            &lt;td width="17%"&gt;&lt;div align="center"&gt;&lt;font face="Arial, Helvetica, sans-serif"&gt;&lt;strong&gt;18U&lt;br /&gt;
                &lt;/strong&gt; 
                &lt;input type="radio" name="division" value="18U"&lt;?php if ($division == "18U") echo ("checked");?&gt; /&gt;
                &lt;/font&gt;&lt;/div&gt;&lt;/td&gt;
          &lt;/tr&gt;
        &lt;/table&gt;
        &lt;center&gt;
        &lt;/center&gt;&lt;/td&gt;
      &lt;td width="33%"&gt;&lt;div align="center"&gt;&lt;font face="Arial, Helvetica, sans-serif"&gt;&lt;strong&gt;      &lt;a href="notes.php?id=&lt;?=$ID?&gt;" onclick="popUpWin(this.href,'console',400,350);return false;" onkeypress="popUpWin(this.href,'console',400,350);return false;" title="Link open's in a new window"&gt; 
          &lt;?php if ($notes == '') {  $message = '';} else { $message = 'You have a message! 
      &lt;br /&gt; Click to read it';} 
       print $message ?&gt;
          &lt;/a&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/div&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
  &lt;font face="Arial, Helvetica, sans-serif"&gt;
  &lt;hr align="center" width="80%"&gt;
  &lt;/font&gt; 
  &lt;table width="91%" border="0"&gt;
    &lt;tr&gt; 
      &lt;td height="27" colspan="3"&gt;&lt;font face="Arial, Helvetica, sans-serif"&gt;&lt;strong&gt;Team 
        Name, Contact and Head Coach info&lt;/strong&gt;&lt;/font&gt; &lt;/td&gt;
      &lt;td&gt; &lt;div align="right"&gt;&lt;font size="-1" face="Arial, Helvetica, sans-serif"&gt;Team 
          Age &lt;/font&gt; &lt;/div&gt;
      &lt;td colspan="2"&gt;&lt;font face="Arial, Helvetica, sans-serif"&gt; 
        &lt;select name="teamage" size="1"&gt;
          &lt;option value= ""&gt;Pick Age&lt;/option&gt;
          &lt;option value='10U'&lt;?php if ($teamage == "10U") echo ("selected");?&gt;&gt;10U&lt;/option&gt;
          &lt;option value='12U'&lt;?php if ($teamage == "12U") echo ("selected");?&gt;&gt;12U&lt;/option&gt;
          &lt;option value='14U'&lt;?php if ($teamage == "14U") echo ("selected");?&gt;&gt;14U&lt;/option&gt;
          &lt;option value='16U'&lt;?php if ($teamage == "16U") echo ("selected");?&gt;&gt;16U&lt;/option&gt;
          &lt;option value='18U'&lt;?php if ($teamage == "18U") echo ("selected");?&gt;&gt;18U&lt;/option&gt;
          &lt;option value='18Gold'&lt;?php if ($teamage == "18Gold") echo ("selected");?&gt;&gt;18Gold&lt;/option&gt;
        &lt;/select&gt;
        &lt;/font&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt; 
      &lt;td width="12%" height="29"&gt;&lt;div align="right"&gt;&lt;font size="-1" face="Arial, Helvetica, sans-serif"&gt;Team 
          Name&lt;/font&gt;&lt;/div&gt;&lt;/td&gt;
      &lt;td colspan="2"&gt;&lt;font face="Arial, Helvetica, sans-serif"&gt; 
        &lt;input name="TeamName" type="text" value="&lt;?=$TeamName?&gt;" size="30"&gt;
        &lt;/font&gt;&lt;/td&gt;
      &lt;td width="10%"&gt; &lt;div align="right"&gt;&lt;font size="-1" face="Arial, Helvetica, sans-serif"&gt;Team 
          Location &lt;/font&gt; &lt;/div&gt;
      &lt;td colspan="2"&gt; &lt;font face="Arial, Helvetica, sans-serif"&gt; 
        &lt;input name="teamcity" type="text"  value="&lt;?=$teamcity?&gt;" size="15" /&gt;
        &lt;font size="-1"&gt;State&lt;/font&gt; 
        &lt;input name="teamstate" type="text"  value="&lt;?=$teamstate?&gt;" size="2" /&gt;
        &lt;/font&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt; 
      &lt;td&gt;&lt;div align="right"&gt;&lt;font size="-1"&gt;&lt;font size="-1"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;&lt;/td&gt;
      &lt;td width="18%"&gt;&lt;div align="left"&gt;&lt;font size="-2" face="Arial, Helvetica, sans-serif"&gt;First 
          Name &lt;/font&gt;&lt;/div&gt;&lt;/td&gt;
      &lt;td width="22%"&gt;&lt;font size="-2" face="Arial, Helvetica, sans-serif"&gt;Last 
        Name &lt;/font&gt;&lt;/td&gt;
      &lt;td&gt;&lt;div align="right"&gt;&lt;font size="-1"&gt;&lt;font size="-1"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;&lt;/td&gt;
      &lt;td width="17%"&gt;&lt;div align="left"&gt;&lt;font size="-2" face="Arial, Helvetica, sans-serif"&gt;First 
          Name &lt;/font&gt;&lt;/div&gt;&lt;/td&gt;
      &lt;td width="25%"&gt;&lt;font size="-2" face="Arial, Helvetica, sans-serif"&gt;Last 
        Name &lt;/font&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt; 
      &lt;td&gt;&lt;div align="right"&gt;&lt;font size="-1" face="Arial, Helvetica, sans-serif"&gt;Contact 
          &lt;/font&gt;&lt;/div&gt;&lt;/td&gt;
      &lt;td colspan="2"&gt;&lt;input name="contactname" type="text" value="&lt;?=$contactname?&gt;" size="20" /&gt; 
        &lt;input name="contactlname" type="text" id="contactlname" value="&lt;?=$contactlname?&gt;" size="20" /&gt;&lt;/td&gt;
      &lt;td&gt;&lt;div align="right"&gt;&lt;font size="-1" face="Arial, Helvetica, sans-serif"&gt;Head 
          Coach&lt;/font&gt;&lt;/div&gt;&lt;/td&gt;
      &lt;td colspan="2"&gt;&lt;input name="coachname" type="text" value="&lt;?=$coachname?&gt;" size="20" /&gt; 
        &lt;input name="coachlname" type="text" id="coachlname" value="&lt;?=$coachlname?&gt;" size="20" /&gt; 
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt; 
      &lt;td&gt;&lt;div align="right"&gt;&lt;font size="-1" face="Arial, Helvetica, sans-serif"&gt;Address 
          &lt;/font&gt;&lt;/div&gt;&lt;/td&gt;
      &lt;td colspan="2"&gt;&lt;font face="Arial, Helvetica, sans-serif"&gt; 
        &lt;input name="contactaddress" type="text" value="&lt;?=$contactaddress?&gt;" size="30"&gt;
        &lt;/font&gt;&lt;/td&gt;
      &lt;td&gt;&lt;div align="right"&gt;&lt;font size="-1" face="Arial, Helvetica, sans-serif"&gt;Address&lt;/font&gt;&lt;/div&gt;&lt;/td&gt;
      &lt;td colspan="2"&gt;&lt;font face="Arial, Helvetica, sans-serif"&gt; 
        &lt;input name="coachaddress" type="text" value="&lt;?=$coachaddress?&gt;" size="30"&gt;
        &lt;/font&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt; 
      &lt;td&gt;&lt;div align="right"&gt;&lt;font size="-1" face="Arial, Helvetica, sans-serif"&gt;More 
          add. &lt;/font&gt;&lt;/div&gt;&lt;/td&gt;
      &lt;td colspan="2"&gt;&lt;font face="Arial, Helvetica, sans-serif"&gt; 
        &lt;input name="contactaddressmore" type="text" value="&lt;?=$contactaddressmore?&gt;" size="15" /&gt;
        &lt;/font&gt;&lt;/td&gt;
      &lt;td&gt;&lt;div align="right"&gt;&lt;font size="-1" face="Arial, Helvetica, sans-serif"&gt;City&lt;/font&gt;&lt;/div&gt;&lt;/td&gt;
      &lt;td colspan="2"&gt;&lt;font face="Arial, Helvetica, sans-serif"&gt; 
        &lt;input name="coachcity" type="text" value="&lt;?=$coachcity?&gt;" size="15"&gt;
        &lt;font size="-1"&gt;State&lt;/font&gt; 
        &lt;input name="coachstate" type="text" value="&lt;?=$coachstate?&gt;" size="2"&gt;
        &lt;font size="-1"&gt;Zip&lt;/font&gt; 
        &lt;input name="coachzip" type="text" value="&lt;?=$coachzip?&gt;" size="4"&gt;
        &lt;/font&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt; 
      &lt;td&gt;&lt;div align="right"&gt;&lt;font size="-1" face="Arial, Helvetica, sans-serif"&gt;Country&lt;/font&gt;&lt;/div&gt;&lt;/td&gt;
      &lt;td colspan="2"&gt;&lt;font face="Arial, Helvetica, sans-serif"&gt; 
        &lt;input name="contactcountry" type="text" id="contactcountry" value="&lt;?=$contactcountry?&gt;" size="15" /&gt;
        &lt;/font&gt;&lt;/td&gt;
      &lt;td&gt;&lt;div align="right"&gt;&lt;font size="-1" face="Arial, Helvetica, sans-serif"&gt;Phone&lt;/font&gt;&lt;/div&gt;&lt;/td&gt;
      &lt;td colspan="2"&gt;&lt;font face="Arial, Helvetica, sans-serif"&gt; 
        &lt;input name="coachphone" type="text" value="&lt;?=$coachphone?&gt;" size="12" /&gt;
        &lt;font size="-1"&gt;Fax&lt;/font&gt; 
        &lt;input name="coachfax" type="text" value="&lt;?=$coachfax?&gt;" size="12" /&gt;
        &lt;/font&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt; 
      &lt;td&gt;&lt;div align="right"&gt;&lt;font size="-1" face="Arial, Helvetica, sans-serif"&gt;City&lt;/font&gt;&lt;/div&gt;&lt;/td&gt;
      &lt;td colspan="2"&gt;&lt;font face="Arial, Helvetica, sans-serif"&gt; 
        &lt;input name="contactcity" type="text" value="&lt;?=$contactcity?&gt;" size="15"&gt;
        &lt;font size="-1"&gt;State&lt;/font&gt; 
        &lt;input name="contactstate" type="text" value="&lt;?=$contactstate?&gt;" size="2"&gt;
        &lt;font size="-1"&gt;Zip&lt;/font&gt; 
        &lt;input name="contactzip" type="text" value="&lt;?=$contactzip?&gt;" size="4"&gt;
        &lt;/font&gt;&lt;/td&gt;
      &lt;td&gt;&lt;div align="right"&gt;&lt;font size="-1" face="Arial, Helvetica, sans-serif"&gt;Email&lt;/font&gt;&lt;/div&gt;&lt;/td&gt;
      &lt;td colspan="2"&gt;&lt;font face="Arial, Helvetica, sans-serif"&gt; 
        &lt;input name="coachemail" type="text" value="&lt;?=$coachemail?&gt;" size="30" /&gt;
        &lt;/font&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt; 
      &lt;td&gt;&lt;div align="right"&gt;&lt;font size="-1" face="Arial, Helvetica, sans-serif"&gt;Phone&lt;/font&gt;&lt;/div&gt;&lt;/td&gt;
      &lt;td colspan="2"&gt;&lt;font face="Arial, Helvetica, sans-serif"&gt; 
        &lt;input name="contactphone" type="text" value="&lt;?=$contactphone?&gt;" size="12"&gt;
        &lt;font size="-1"&gt;Fax&lt;/font&gt; 
        &lt;input name="contactfax" type="text" value="&lt;?=$contactfax?&gt;" size="12"&gt;
        &lt;/font&gt;&lt;/td&gt;
      &lt;td&gt;&amp;nbsp;&lt;/td&gt;
      &lt;td colspan="2"&gt;&amp;nbsp;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt; 
      &lt;td&gt;&lt;div align="right"&gt;&lt;font size="-1" face="Arial, Helvetica, sans-serif"&gt;Cell 
          Phone&lt;/font&gt;&lt;/div&gt;&lt;/td&gt;
      &lt;td colspan="2"&gt;&lt;font face="Arial, Helvetica, sans-serif"&gt; 
        &lt;input name="contactcphone" type="text" value="&lt;?=$contactcphone?&gt;" size="12"&gt;
        &lt;/font&gt;&lt;/td&gt;
      &lt;td&gt;&lt;font size="-1"&gt;&amp;nbsp;&lt;/font&gt;&lt;/td&gt;
      &lt;td colspan="2"&gt;&amp;nbsp;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt; 
      &lt;td&gt;&lt;div align="right"&gt;&lt;font size="-1" face="Arial, Helvetica, sans-serif"&gt;Email&lt;/font&gt;&lt;/div&gt;&lt;/td&gt;
      &lt;td colspan="2"&gt;&lt;div align="center"&gt;&lt;font size="-2" face="Arial, Helvetica, sans-serif"&gt;This 
          is your registered email address.&lt;/font&gt;&lt;br /&gt;
          &lt;font face="Arial, Helvetica, sans-serif"&gt;&lt;? echo $contactemail; ?&gt; 
          &lt;/font&gt;&lt;font size="-2" face="Arial, Helvetica, sans-serif"&gt;&lt;br /&gt;
          If this is no longer a valid email, contact system admin.&lt;/font&gt;&lt;/div&gt;&lt;/td&gt;
      &lt;td&gt;&amp;nbsp;&lt;/td&gt;
      &lt;td colspan="2"&gt;&amp;nbsp;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
  &lt;/center&gt;
  &lt;hr align="center" width="80%"&gt;
  &lt;font face="Arial, Helvetica, sans-serif"&gt;&lt;br&gt;
  &lt;/font&gt;
  &lt;p&gt;&lt;/p&gt;
  &lt;/form&gt;
  
  &lt;?php endif;?&gt;
  &lt;/font&gt; 
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>