michele:
I am attaching the page for you

ian







________________________________
From: Michele Waldman <mmwald...@nyc.rr.com>
To: NYPHP Talk <talk@lists.nyphp.org>
Sent: Sun, February 14, 2010 2:54:00 PM
Subject: Re: [nyphp-talk] tabs disappearing after mail function

 
Hum.  Bug somewhere.  Lol
 
Why don’t you test it out using
another php module, even one doing next to nothing.
 
I know echos and prints can really skew a
layout.
 
A bug in the php will halt any rendering
below the include, but I haven’t seen the code, so …
 
First, I’d try to identify where the
bug is on the page or the php.  I’m guessing the php.
 
A few experiments might help identify it.
 
Do you have display_errors on?
 
But, my money is on a php error.
 
Michele

________________________________
 
From:talk-boun...@lists.nyphp.org
[mailto:talk-boun...@lists.nyphp.org] On
Behalf Of selyah
Sent: Sunday, February 14, 2010
3:44 PM
To: talk@lists.nyphp.org
Subject: [nyphp-talk] tabs
disappearing after mail function
 
Hello: 
I have an issue.  first let me layout my site which is testing mode. 
I am having problem with the php page that handles the form information.
the pages blocks are controlled by <div> statements, no
tables.   there is a block on the top for the logo, below that is the
content block, and to the right is the block for the tabs, then there is the
footer block at the bottom of the page.  all of the pages work fine. 
problem is when I test the php page to handle the form information, the tabs to
the right with the index and the footer disappears and the thank you
information from the form also appears.   In testing it, i remove the
php part and run it and the blocks appears, when i re-enter the php portion of
the code, they disappears again........any ideas

PS.  I am using wamp and have not configured the mail function in php.ini
(that should not affect it should it ?)
thanks
 
Ian 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Thank You</title>
<link rel="stylesheet" href="../css/freeformstyle3.css" type="text/css" 
charset="utf-8" />
</head>

<body>
<div align="center">
        <!--begin header-->
        <div id="header" >
                <div align="left">
                     <span id="logo" align="left">name</span><br />
                     <font size="-1"><i><span 
style="padding-left:200px">...bottom label</span></i></font>
    </div>
        <!--end header--> 
   
<div id="content" align="left">
  <img src="006.jpg" width="678" height="342" alt="contact us" />
        <span align="left">
                <span id="name1">Thank</span><span id="name2">You</span>
                </span>  

  <?php
if (isset($_POST['submitted'])) {
        $errors=array();
         if(!empty($_POST['fname'])) {
           $first_name=$_POST['fname'];
           }
           else {
           $first_name=NULL;
           $errors[]='Your first name';
           }
           
         if(!empty($_POST['lname'])) {
          $last_name=$_POST['lname'];
          }
           else {
            $last_name=NULL;
                $errors[]='Your last name';
                }
                
                
        if (!empty($_POST['email'])) {
          $email=$_POST['email'];
          }
          else {
          $email=NULL;
          }
          
          if ((!empty($_POST['phone1'])) && (!empty($_POST['phone2'])) && 
(!empty($_POST['phone3'])))  {
           $area_code=$_POST['phone1'];
           $prefix=$_POST['phone2'];
           $extension=$_POST['phone3'];
            }
                else {
                $area_code=NULL;
                 $prefix=NULL;
                  $extension=NULL;
                  }
                 
        if (($email==NULL) && ($area_code==NULL) && ($prefix==NULL) && 
($extension==NULL)) {
            $errors[]='A phone number or an E-mail as a contact ';
                }
                
        if (!empty($_POST['message'])) {
         $message=$_POST['message'];
         }
         else {
         $message=NULL;
         $errors[]='A message for teamfreeform ';
         }
}

if(empty($errors)) {
echo '<p align="left"><font color="cccccc">Hello <b>'.$first_name.' 
'.$last_name.'</b><br>Thank you for visiting <b>teamfreeform\'s 
website</b>.<br>We have recieved your message.  Coach Lee or a representative 
from teamfreeform will contact you at our earliest convience.<br><br>Thanks 
You<br><i>Teamfreeform</i>.</font></p><p><br></p>';


$to      = 'lshab...@aol.com';
$subject = 'information about teamfreeform';
$message = 'Prespective\'s Name :'.$first_name.' '.$last_name.'
E_mail Address :'.$email. ' 
Telephone Number :('.$area_code.')'.$prefix.' - '.$extension.'
'.$message;

$headers = 'From: '.$email. "\r\n" .
   'Reply-To: .$email' . "\r\n" .
   'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);
exit();
}
  else {
    if (!empty($errors))  {
     echo '<h1><font color="red">Error!</font></h1>
            <p align="left"><font color="#000000">The following fields were not 
filled out and <i>must</i> be entered:</font><br>';
             foreach($errors as $msg) {         //print each error
            echo "<font color='#000000'>---> $msg<br /></font><br />";
                }
                echo '<p align="left"><font color="#000000">Please go back and 
correct this missing information&nbsp;&nbsp;</font>
                       <a href="contactus.html">&laquo;back</a></p><p><br></p>';
        }
   }
?>

<script type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) 
{
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) 
x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) 
x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' invalid e-mail address 
formatt.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number 
between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}
//-->
</script>
</div>
<!--</div>-->
                        <div id="index">
                                <span align="left">
                                <a href="../index.html"><span 
style="padding-left:5px">ABOUT US</span></a><br />
                                other index features
                                </span>
                        </div><!--end index-->
        <div id="contact_footer">
                <span id="footer-text"><br>
                <a href="../index.html">About Us</a>&nbsp;&#9674;&nbsp;<a 
href="../assets/Boxing.html">Boxing</a>&nbsp;&#9674;&nbsp;<a 
href="../assets/Womensclub.html">Womens Club</a>&nbsp;&#9674;&nbsp;<a 
href="../assets/testimonials.html">What People are 
Saying</a>&nbsp;&#9674;&nbsp;<a 
href="../assets/Press.html">Press</a>&nbsp;&#9674;&nbsp;<a 
href="../Contact/contactus.html">Contact Us</a><br /><br />
                <font size="-3">ALL RIGHTS RESERVED. DESIGNED BY IGH&nbsp;<a 
href="mailto:ighay...@gmail.com";>contact</a></font>
        </span>
  </div>
</div>
</body>
</html>
_______________________________________________
New York PHP Users Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

http://www.nyphp.org/Show-Participation

Reply via email to