I'm a novice at PHP! For every code I write for the file it never works why is this?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ChristianBurn
    New Member
    • Nov 2010
    • 1

    #1

    I'm a novice at PHP! For every code I write for the file it never works why is this?

    Code:
     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    
    <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <title>Untitled 1</title>
    </head>
    
    <body>
    
    <form action="welcome.php" method="post" name="Submit" target="_self">
    Name: <input type="text" name="fname" />
    Age: <input type="text" name="age" />&nbsp;
    	<input name="Submit" type="hidden" value="$SubmitNameAge" />
    </form> 
    
    <form method="post">
    </form>
    
    </body>
    Here is my PHP code which always seems to give me an eror and all I am wanting to do is adding a working log in/out and a sign up function so visitors are not just visiting but also becoming meembers of part of my clan site.
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    What exactly is the problem?

    Comment

    • code green
      Recognized Expert Top Contributor
      • Mar 2007
      • 1726

      #3
      This is mainly HTML with one php variable.
      You will find it better to seperate HTML and PHP into seperate files, and from PHP include the HTML files.
      Much cleaner.
      Code:
      value="$SubmitNameAge"
      Because of this one variable, the file cannot be a HTML file.
      So have you saved it as a PHP?
      Do you have PHP tags?
      Of the top of my head try
      Code:
      value="<?php echo $SubmitNameAge; ?>"

      Comment

      Working...