Contact Form not displaying processed input
Posted by: Chukwura (197.210.24.---)
Date: August 29, 2017 06:12PM

Please I am designing a website with Bootstrap framework, but my contact form does not display the processed input. I am a newbie and need help in correcting my mistakes to get the "contact us" form work as expected.

Meanwhile, I am using Wamp and have the following codes:



<div class="container">
<div class="col-sm-12">
<div class="row">
<form id="contact-form" method="post" action="welcome2.php" role="form">
<div class="form-group has-error has-feedback">
<label for="name">Name</label>
<input type="text" class="form-control" id="name" placeholder="Enter your name*"
required="required" data-error="Name is required">
<div class="help-block with errors" value="<?php echo $name; ?>"></div>
</div><br>
<div class="form-group has-error has-feedback">
<label for="email">Email</label>
<input type="text" class="form-control" id="email" placeholder="Enter your email*"
required="required" data-error="Email is required">
<div class="help-block with errors" value="<?php echo $email; ?>"></div>
</div><br>
<div class="form-group has-error has-feedback">
<label for="message">Message</label>
<textarea class="form-control" id="form-message" name="message placeholder="Message for me *" rows="4"
required="required" value="<?php echo $message; ?>"></textarea>
<div class="help-block with errors"></div>
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
</div>
</div>
</div>


<body>



Welcome <?php echo $_POST["name"]; ?><br>
Your email address is: <?php echo $_POST["email"]; ?><br>
Your message: <?php echo $_POST["message"]; ?><br>

</body>
</html>

So, I expect the <?php echo $_POST[""]; ?> to display the values in the input field after the user clicks the submit button.

Chuks

Options: ReplyQuote
Re: Contact Form not displaying processed input
Posted by: RiggsFolly (Moderator)
Date: August 30, 2017 04:02PM

Hi

Very sorry, but this site is here for issues with getting WAMPSevrer running.

We are not here as a remote code debugger.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote


Sorry, only registered users may post in this forum.