hummerton Posted October 25, 2009 Share Posted October 25, 2009 Hello all I am trying my sister in laws site and I keep getting an error with my coding. I am more of a designer than coder and I can't figure this out. It is on the following page: http://faceandbodyportorange.com/contact-us.php Here is my coding.. I call different PHP pages (header and left) so I didn't have to change on all pages, just once. Here is the coding for this page: <?php include 'header.php'; ?> <?php include 'left.php'; ?> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="265" align="left" valign="top"><img src="images/inner_main1.jpg" alt="Welcome to Face&Body.com!" width="268" height="123" /></td> <td align="left" valign="top"><img src="images/inner_main2.jpg" alt="Welcome to Face&Body.com!" width="262" height="123" /></td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> </td> </tr> <tr> <td height="45" align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="8" align="left" valign="top"><img src="images/br_cor1.jpg" alt="cor" width="8" height="32" /></td> <td align="right" valign="middle" bgcolor="#674007"> <table width="98%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="left" valign="middle" class="inner_txtheader">Contact Face & Body Healthy Aging</td> </tr> </table> </td> <td width="8" align="left" valign="top"><img src="images/br_cor2.jpg" alt="cor" width="8" height="32" /></td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> </td> </tr> <tr> <td align="left" valign="middle" class="txt_nor"><b>Face & Body Healthy Aging</b><br>900 N. Swallowtail Drive, #105<br>Port Orange, FL 32129<br>(386) 788-8480 (Office)<br>(386) 679-5346 (Jen)<br>(386) 212-1386 (Tami)<br>(386) 589-7197 (Mariah) </td> </tr> <tr> <td><?php include 'html-contact-form.php'; ?></td> </tr> </table> </td> </tr> </table> </table> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top"> </td> </tr> <?php include 'footer.php'; ?> Anyone know this? I am about to lose my mind! I did read the READ FIRST thread at http://www.phpfreaks.com/forums/index.php/topic,37442.0.html, but I am not sure what it means by closing the code?! Remember, designed not programmer.. I am lucky I got this far Thanks, Rob Quote Link to comment Share on other sites More sharing options...
Alex Posted October 25, 2009 Share Posted October 25, 2009 session_start() must be placed before any output. Quote Link to comment Share on other sites More sharing options...
hummerton Posted October 25, 2009 Author Share Posted October 25, 2009 Do I place on top of the contact-us.php page? Or header.php page? Quote Link to comment Share on other sites More sharing options...
hummerton Posted October 25, 2009 Author Share Posted October 25, 2009 I put session_start() at the very top of contact-us.php page, but still the error... Quote Link to comment Share on other sites More sharing options...
cags Posted October 25, 2009 Share Posted October 25, 2009 Do you have session_start in any of the files that you are including in the main page? If you have that could cause problems, it isn't needed so you can safely remove it. Quote Link to comment Share on other sites More sharing options...
hummerton Posted October 25, 2009 Author Share Posted October 25, 2009 No, I do not have that in the header.php file (first file called). I tried removing before, but then my capthca didn't work Quote Link to comment Share on other sites More sharing options...
cags Posted October 25, 2009 Share Posted October 25, 2009 Your contradicting yourself. I do not have that directly contradicts I tried removing before, but then my capthca didn't work. You only need session_start once. Remove it from ALL the included files and place it at the top of the main file. Ensure that there are no whitespaces before the opening PHP block. Quote Link to comment Share on other sites More sharing options...
hummerton Posted October 25, 2009 Author Share Posted October 25, 2009 I meant, no I don't have anywhere else. The only place it shows up at is at html-contact-form.php I tried removing from the file html-contact-form.php, but then my capthca didn't work. Quote Link to comment Share on other sites More sharing options...
hummerton Posted October 25, 2009 Author Share Posted October 25, 2009 Ok, I removed it from the file and put at the very top (first line) of the header.php file. The error is gone at http://faceandbodyportorange.com/contact-us.php BUT now the captcha doesn't work! Quote Link to comment Share on other sites More sharing options...
cags Posted October 25, 2009 Share Posted October 25, 2009 You have entered it as plain text. Load up your website and you'll see it quite plainly written in the top corner of the screen. It is PHP it must be in PHP tags. <?php session_start(); ?> Quote Link to comment Share on other sites More sharing options...
hummerton Posted October 25, 2009 Author Share Posted October 25, 2009 Ok, did that but still had error. I removed the redirect to the thank you page and all works good now. I will jsut see if I can put a message in red saying the email was sent. Thank you for your help. Got a Paypal addy? Rob Quote Link to comment Share on other sites More sharing options...
cags Posted October 25, 2009 Share Posted October 25, 2009 The header function used to direct also sends headers (as the name suggests ) You could echo out an html redirect if you really wanted to forward to a different page. You could just change the order of your code, but that could get complicated. Quote Link to comment Share on other sites More sharing options...
hummerton Posted October 25, 2009 Author Share Posted October 25, 2009 Yep, complicated I don't do. Lucky I know HTML, let alone PHP. I really appreciate your help Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.