Hey i m trying to make a website and little bit confuse to make a contact form Is there is anyone who can guide me Thank you
There are literally thousands of hits on "contact form php" on Google. And, seriously, if you're that green, I'd advice on maybe installing WordPress if you need the site up and running quickly, or sit down with basic PHP tutorials if you're just starting.
It's very easy to do it. The following is a very simple example without any Input Validations <html> <body> <form action="myform.php" method="post"> <p>Your Name: <input type="text" name="yourname" /><br /> E-mail: <input type="text" name="email" /></p> <p>Do you like this website? <input type="radio" name="likeit" value="Yes" checked="checked" /> Yes <input type="radio" name="likeit" value="No" /> No <input type="radio" name="likeit" value="Not sure" /> Not sure</p> <p>Your comments:<br /> <textarea name="comments" rows="10" cols="40"></textarea></p> <p><input type="submit" value="Send it!"></p> </form> </body> </html> HTML: <html> <body> Your name is: <?php echo $_POST['yourname']; ?><br /> Your e-mail: <?php echo $_POST['email']; ?><br /> <br /> Do you like this website? <?php echo $_POST['likeit']; ?><br /> <br /> Comments:<br /> <?php echo $_POST['comments']; ?> </body> </html> PHP:
And that's why the Web keeps going to the dogs. Fucked up markup, and no real usefulness, no doctype... I get that it's a basic example, but... Provide basic coding, at least?
While the example didn't actually do anything (like email the form), it does show you basically how to post a form to a PHP script. You probably want to do as everyone in here is suggesting and look at some PHP tutorials or just install a content management system like WordPress.