HTML Form submit button won't go to php - html

First of all i would like to say that i'm a real newbie, learing HTML, CSS and PHP by this website and trail&error.
My problem is as following:
My HTML button won't submit the form to my PHP. I can't really see what im doing wrong. Can anyone help me?
My code is:
<div class="contact-inner">
<form class="contact-form" method="post" action="emailcontact.php">
<div class="col-md-6">
<input type="text" name="naam" class="form-control wow bounceInLeft" placeholder="Uw naam">
</div>
<div class="col-md-6">
<input type="text" name="email" class="form-control wow bounceInLeft" placeholder="Uw emailadres">
</div>
<div class="col-md-12 ">
<textarea name="bericht" class="form-control" cols="30" rows="6" placeholder="Uw bericht"></textarea>
</div>
<div class="btn-container col-md-12 text-center submit">
<button type="submit" name="submit">Verstuur!</button>
</div>
</form>
I hope it not a too stupid mistake.
Thanks in advance for your help!
Gr. Tom

Please do the following to try out if your html's problem or PHP's
If you got an 404 error, you may be writing a wrong location for emailcontact.php
Add following code to the top of emailcontact.php:
<?php
var_dump($_POST);
If you got var_dump the same data as what you've post, it means you program actually works.

change
<button type="submit" name="submit">Verstuur!</button>
to
<input type="submit" name="submit">Verstuur!</input>

add an id to your form ( for example "myform" )
then in your button code :
<button type="submit" name="submit" onclick="document.getElementById("myform").submit()">Verstuur!</button>

Related

Problems with the date attribute in HTML5

I have this code that I am building for my internship. I am trying to use the "date"input type in my code to add a pop up calender, however it isn't working. I have look at numerous websites, but i have yet to find someone who is having this problem. Any ideas on how to make this work? Here is my code:
<body>
<h1> Time Logging Form</h1>
<form method="post" id='datetime'>
<div class="form-row" id='datacell'>
<div class="editor-cell">
<input type="date" id="date">
</div>
<div class="editor-cell">
<input placeholder="Time in 00:00" type="text" id="timein">
</div>
<div class="editor-cell">
<input placeholder="Time out 00:00" type="text" id="timeout">
</div>
</div>
<input type="submit" value="+" id='plus'>
<input type="submit" value="submit" id='submit'>
</form>
</body>
What exactly you want to do with data attributs? When you run this html code in your browser, the calendar appears:
https://jsfiddle.net/6w5b5r5h/
<body>
<h1> Time Logging Form</h1>
<form method="post" id='datetime'>
...
</form>
</body>

how to use form control class in bootstrap templates?

I use a bootstrap Template. I use bootstrap modal for register in my website.
for textboxes, I use form-control class but it does not work.
Can anyone help me?
...<div class="modal-body" dir="rtl" style="font-family:BYekan; text-align:center">
<center>
<div class="form-group">
<asp:TextBox ID="txtemail_reg" runat="server" CssClass="form-control" placeholder=" Email Address" Width="300px"></asp:TextBox>
</div> ....
Make sure that you placed class="form-group". For example
<form class="form-inline">
<div class="form-group">
<input type="text" class="form-control" id="" placeholder="Amount">
</div>
</div>
<button type="submit" class="btn btn-primary">Transfer cash</button>
</form>
I checked the css of template. the input tag has some css,I remove those and my problem fixed.

Create glow effect on save

I want to make the borders of my form glow when a function is executed.
Something like a pulse that's gonna happen when the uptdate function, which is called every 5 seconds, is called. Just as a way to show that the content was saved. How can I do that? I looked in so many places and over many CSS properties but I couldn't come up with something that would create that effect. I am using AngularJS and Bootstrap.
the html
<div class=" container col-lg-8" id="right" >
<div id="delete-button" class="row">
<a ng-really-message="Are you sure you want to delete this note?" ng-really-click="deleteNote(note)" class="glyphicon glyphicon-trash " style="float:left;">Delete</a>
</div>
<form >
<div class="row">
<input id="note-title" type="text" class="form-control" ng-model="title" placeholder="Untitled">
<div>
<textarea id="note-body" class="form-control fadein" rows="2" cols="25"
ng-model="body" placeholder="Write your note here..." ></textarea>
</div>
</div>
</form>
<div data-fb-like=""></div>
</div>
Try this CSS library, hope it will works for you :
https://daneden.github.io/animate.css/

Submitting/detecting a submit a form by clicking on a CSS button

I am experiencing a issue detecting if the submit button was clicked. I was give the following form by a CSS designer:
<form action="" method="post">
<div class="form-group">
<label>Username</label>
<input name="username" type="text" class="form-control span12">
</div>
<div class="form-group">
<label>Password</label>
<input name="password" type="password" class="form-controlspan12 form-control">
</div>
Sign In
<div class="clearfix"></div>
</form>
I would like submit the captured information by clicking on the Sign In CSS button. I am used to the usual:
<input type="Submit" value="Sign-In>
button, but not this is different, I am stuck. Any assistance will be appreciated.
try to change
Sign In
with
<button type="submit" class="btn btn-primary pull-right">Sign In</button>
Furthermore you need to set an action attribute on your form element
Give your form and ID = "myform" And try below:
Sign In

CSS, not sure how to move things around

I'm trying to remove the message box and I want to move the e-mail box to the right of the name, so that it all fits into the top bar.
I have tried removing the message box through the html code, but when I do, I get errors and it doesn't function properly.
I assume I have to remove something in the PHP because it's obviously not able to find the missing html code, but as I don't understand PHP I don't know what to remove.
this is the html code for the subscribe button
<div class="subscribe">
<div class="containerContact">
<div id="contactFormContainer">
<div id="contactForm">
<div class="loader"></div>
<div class="bar"></div>
<form action="mail.php" class="contactForm" name="cform" method="post">
<div class="input_boxes">
<p><label for="name">Name</label><span class="name-missing">Please enter your name</span><br />
<input id="name" type="text" value="" name="name" />
</p>
<p>
<label for="e-mail">E-mail</label><span class="email-missing">Please enter a valid e-mail</span><br />
<input id="e-mail" type="text" value="" name="email" />
</p>
<p><label for="message">Message</label><span class="message-missing">Say something!</span><br />
<textarea id="message" rows="" cols="" name="message"></textarea>
</p>
</div>
<input class="submit" type="submit" name="submit" value="Submit Form" onfocus="this.blur()" />
</form>
</div>
<div class="contact"></div>
</div>
</div>
<!-- this is the overlay which hides the rest of the website when the Subscribe button is pressed. -->
<div id="backgroundPopup"></div>
</div>
I can't post more than one link, so here is a text dump to the PHP and CSS for the subscribe button
any help would be much appreciated!!