php script is executing normally but when used in html forms it displays it self why?

Discussion in 'PHP' started by SOMU240, Mar 22, 2013.

  1. #1
    hai i am new to php i am using WAMP server to work offline. problem is when i execute a php script in browsr it executing properly.but the same when used along with the html forms it displays the code it self. i have saved them properly and started all services well.how to overcome this where is the problem
     
    Last edited: Mar 22, 2013
    SOMU240, Mar 22, 2013 IP
  2. edduvs

    edduvs Well-Known Member

    Messages:
    394
    Likes Received:
    31
    Best Answers:
    3
    Trophy Points:
    160
    #2
    Check if your forms file does end with .html extension. If it does, change it to .php since the apache server can't know there's php code inside so it's being parsed as HTML.
     
    edduvs, Mar 22, 2013 IP