Php To Html

Discussion in 'Gaming' started by S1lence, Feb 19, 2006.

  1. S1lence

    S1lence Well-Known Member

    Posts:
    440
    Likes Received:
    0
    Joined:
    Feb 24, 2005
    I have a full html index site. I want to put a PHP form in there. Theres a html form in there. So I take it out and replace it with the php script? Or do I put it at the beginning?
     
  2. johndapunk FTW

    johndapunk FTW Senior Member

    Age:
    34
    Posts:
    2,513
    Likes Received:
    0
    Joined:
    Jan 19, 2006
    Location:
    Palm Beach
    ok, im assuming you have something to this affect:
    <html>
    <head>
    blahblah
    </head>
    <body>
    Index fun stuff
    ----Want the php script in here (with html)-----
    regular html
    </body></html>
    ok, if your going like that, you would annouce your begining php in where you need it, and ending it where it isnt used again. as for the html elements in the php, simply use echo ('<form method="blah" action="blah">');
    echo ('<input blah blah blah>');

    If you get a parse error, make sure you didnt use the beginging mark you used for the echo INSIDE the echo:
    example (bad):
    echo ("<form method="post" action="blah.html">");
    WILL NOT WORK!!!, php thinks your ending the echo after method=, but then it sees no ; , so it wont parse.
     

Share This Page