Problem with PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
di52517
Forum Newbie
Posts: 2
Joined: Wed Jul 22, 2009 11:48 pm

Problem with PHP

Post by di52517 »

I have a localhost running Apache 2.2 (on WINXP), and PHP 5.3. When I access a PHP page, it displays the source of the page like this (this is only part of it):

Code: Select all

 
<!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" dir="ltr">
 
<!-- #BeginTemplate "../master.dwt" -->
 
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="MSSmartTagsPreventParsing" content="TRUE">
<meta name="Robots" content="index, nofollow, noarchive, noimageclick">
<meta name="Distribution" content="Global">
<meta name="Revisit-After" content="30 days">
<meta name="Rating" content="General">
 
<!-- #BeginEditable "doctitle" -->
<style type="text/css">
.style2 {
    font-size: xx-small;
}
 
 
Now, I have another page that is a feedback form that uses php to send e-mail feed back. The code is:

Code: Select all

 
<?php
    $to  = my real e-mail removed from here;
    $email   = $_REQUEST['email'];
    $message = $_REQUEST['message'];
    $subject = $_REQUEST['subject'];
    mail( $to
        , "[feedback] $subject"
        , $message
        , "From: $email" );
?>
 
I can access the feed back page AOK, and send feedback successfully. Then, I can continue to access any other PHP pages just fine, and they act as expected. But once I close the browser, and reopen it. The problems resurfaces again, each and every time!

What am I doing wrong? When I installed PHP, it told me that I had to manually edit my httpd.conf file.

Thanks in Advance!!!!!!!!
Last edited by Benjamin on Thu Jul 23, 2009 12:40 am, edited 1 time in total.
Reason: Added [code=php] tags.
User avatar
omniuni
Forum Regular
Posts: 738
Joined: Tue Jul 15, 2008 10:50 pm
Location: Carolina, USA

Re: Problem with PHP

Post by omniuni »

Hm. Can you try attaching a screen shot?
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: Problem with PHP

Post by Benjamin »

:arrow: Moved to PHP - Code
di52517
Forum Newbie
Posts: 2
Joined: Wed Jul 22, 2009 11:48 pm

Re: Problem with PHP

Post by di52517 »

omniuni request for screen print. The php code for sending the e-mail is in the post (less my real e-mail address); and the other HTML is what is seen on the screen. As previously indicated, once I send an e-mail via the form. I can go back to the same page that posted in my original post, and it works AOK.
User avatar
omniuni
Forum Regular
Posts: 738
Joined: Tue Jul 15, 2008 10:50 pm
Location: Carolina, USA

Re: Problem with PHP

Post by omniuni »

Right. It sounds like an odd bug. Please post a screen shot of your browser showing what is going wrong, and then again when the page is working. You can blur out the working page if you want, but seeing the screen shot should give me some more information.
Post Reply