Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder bookworm's Avatar
    Join Date
    Oct 2003
    Location
    manitoba canada
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    i keep getting an error and i dont know where to find it.

    okay, im new to php. im trying to make something where when they fill in the box and click submit, it adds to a list on underneath. first off i was trying to figure out how to make one thing post underneath when you click the submit button. I have tried one thing but keep getting an error. It says somethings on line 8 but where to i count from. Also how can i make this work.

    heres the error message that i get:
    Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /data/hosted/bookworm87/test.php on line 8


    heres the code that i used
    Code:
    <html>
    
    <form method="get" action="/test.php>
    <input type="text" name="text">
    <input type=submit />
    </form>
    
    <?php echo "$_GET["text"]; ?>
    
    </html>

  • #2
    Senior Coder missing-score's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    2,194
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <?php echo $_GET["text"]; ?>

  • #3
    New Coder bookworm's Avatar
    Join Date
    Oct 2003
    Location
    manitoba canada
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts
    whats wrong with that part. why does it give the error

  • #4
    Senior Coder missing-score's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    2,194
    Thanks
    0
    Thanked 0 Times in 0 Posts
    you did:

    <?php echo "$_GET["text"]; ?>

    use

    <?php echo $_GET["text"]; ?>, without the "

  • #5
    New Coder bookworm's Avatar
    Join Date
    Oct 2003
    Location
    manitoba canada
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •