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 7 Pro 32bit) (Wampserver 3.0.6 32bit)
<Apache 2.4.23/2.2.31> <PHP 7.1.2/7.0.16/5.6.28/5.5.38/5.4.45/5.3.29> <MySQL 5.7.10/5.6.17/5.5.28>
<MariaDB 10.1.21> <phpMyAdmin4.6.5.2> <MySQL Workbench 6.3.6.511>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin -- WAMPServer alternate Repo
-?-?-?- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -?-?-?-

Options: ReplyQuote


Sorry, only registered users may post in this forum.