Jump to content



Recommended Posts

I Can't find out what is wrong with code.I'm a newbie to PHP and i created a form and embedded the script in the same page using if else statement. The Problem is that whenever i fill the form and then hit Submit button, the browser again asks me to fill the form instead of showing me the details i just entered. Below is The code. Please help me.. soon..


Fill up this simple form to get started:<br/>

<form action="<?php $_SERVER['PHP_SELF']; ?>" method="post">
<p>Enter Your Name:</p>
<p><input type="text" name="name"></p>
<p>Select Your Age Group</p>
<p><select name="age">
<textarea name="comments" rows="5" cols="20">Your Comments Here..</textarea>
<input type="submit" value"Submit" name="Submit">

    echo "YOU SUBMITTED THIS:<br/>";    
    echo "$name<br/>";
    echo "$age_grp<br/>";
    echo "$comments<br/>";

Edited by xxhK
Link to comment
Share on other sites

This thread is more than a year old. Are you sure you have something important to add to it?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.