Morning all, Has anyone ever come across an issue in PHP where all the pages except one can create a class properly?
My site is sup as follows: class page contains all the information about how to format a page, including a function called "setContent" and another called "display". class newsroom contains a number of functions to display news headlines etc. as part of the display() funtion, the newsHeadline function of newsroom() is called. The content for the page is set using the following code: $p = new page(); $content = "Page text and images etc here."; $p->setContent($content); $p->display(); This works fine for all of my pages apart from one. I have checked the source over and over again of the page that creates the error and the only thing I can see different is that the page with the issue contains a form: require_once("includes/page.class.php"); $p = new page(); /*$cm = $_GET['cm']; if($cm == 1) { // form has been submited, so put the email together and send it to the appropriate // email account. $emailBody = $_POST['custBody']; $from = $_POST['custEmail']; $custTopic = $_POST['custTopic']; switch($custTopic){ case "Sales": $to = "[EMAIL PROTECTED]"; $subject = "Sales Enquiry"; break; case "suppReq": $to = "[EMAIL PROTECTED]"; $subject = "Support Request"; $headers = "x-mail-priority: high"; break; case "infoReq": $to = "[EMAIL PROTECTED]"; $subject = "Information Request"; break; default: $to = "[EMAIL PROTECTED]"; $subject = "Information Request"; break; } $content = "<h2>Thank you</h2><p>Thank you for getting in contact with us. We will endevour to respond to your email within 12 hours of this message. An email has been sent to you confirming this.</p><p>Kind regards,</p><p>The Interactive Networks Team</p>"; mail($to,$subject,$body,"FROM: $from,$headers"); } else {*/ $content = "<h2>Contact Us</h2> <p>Please complete the form below to contact our team.</p> <form name=\"contactUs\" action=\"contact.php?cm=1\" method=\"post\" > <fieldset> Your Name: <input type=\"text\" name=\"custName\" id=\"custName\" size= \"50\" /> Your Email Address: <input type=\"text\" name=\"custEmail\" id= \"custEmail\" size=\"50\" /><br /> What would you like to talk to us about? <select name=\"custTopic\" id=\"custTopic\"> <option selected=\"selected\" value=\"Sales\">I have a sales Enquiry</option> <option value=\"infoReq\">I have an information request</option> <option value=\"supportReq\">I have a support request</option> </select> Please type your request in the box below and click the \"Contact\" button to continue. <textarea name=\"custBody\" id=\"custBody\" cols=\"50\" rows=\"10 \"></textarea> <button type=\"submit\" value=\"1\"> Contact Us</button> </fieldset> </form>"; If I do an echo $content, the page displays the normal text fine but without the formatting applied. This is driving me nuts, so if anyone can spot the issue, that would be great, I'm sure it's really simple. Cheers, Matt ____ The WDVL Discussion List from WDVL.COM ____ To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or use the web interface http://e-newsletters.internet.com/discussionlists.html/ Send Your Posts To: wdvltalk@lists.wdvl.com To change subscription settings, add a password or view the web interface: http://intm-dl.sparklist.com/read/?forum=wdvltalk ________________ http://www.wdvl.com _______________________ You are currently subscribed to wdvltalk as: archive@jab.org To unsubscribe send a blank email to [EMAIL PROTECTED] To unsubscribe via postal mail, please contact us at: Jupitermedia Corp. Attn: Discussion List Management 475 Park Avenue South New York, NY 10016 Please include the email address which you have been contacted with.