Html form submit button to activate the php script

Hello everyone, i am very new to PHP. I’ve created a html form and I have the php script with it reference into the index file. Unfortunately when I click the submit button nothing happens.

<div class=“span9”>
<form action=“connect.php” method=“post” form id=“contact-form” class=“contact-form” action=“#”>
<p class=“contact-name”>
<input id=“contact_name” type=“text” placeholder=“Full Name” value=“” name=“contact_name”
</p>
<p class=“contact-email”>
<input id=“contact_email” type=“text” placeholder=“Email Address” value=“” name=“contact_email” />
</p>
<p class=“contact-email”>
<input id=“Groupon_number” type=“text” placeholder=“Groupon Number” value=“” name=“groupon_number” />
</p>
<p class=“contact-message”>
<textarea id=“contact_message” placeholder=“Your Message” name=“contact_message” rows=“15” cols=“40”></textarea>
</p>
<p class=“contact-submit”>
<a id=“contact-submit” input type=“submit” class=“submit”>Send Your Email</a>
</p>

			&lt;div id="response"&gt;
            
            &lt;/div&gt;
        &lt;/form&gt;
     
    &lt;/div&gt;

If it’s the HTML let me know whats wrong. please and thank you.

you don’t have a submit button, only a link.

a submit button is either

<input type="submit" value="display text">

or

<button type="submit">
    // whatever the button should contain comes here
</button>

You also seem to have a few HTML markup errors that you may want to tend to:


<form action="connect.php" method="post" form id="contact-form" class="contact-form" action="#">

should be


<form action="connect.php" method="post" id="contact-form" class="contact-form">

I’ve omitted your second action attribute and removed the form part of form id.

Also, the following html tag isn’t being closed:

<input id="contact_name" type="text" placeholder="Full Name" value="" name="contact_name"

<form action=“connect.php” method=“post” form id=“contact-form” class=“contact-form” action=“#”>

to b <form action=“connect.php” method=“post” id=“contact-form” class=“contact-form”> and try different class and id name

I’ve changed the code, thank you guys. But now i am getting an error message that the mail-it.php file can’t be found.

<form action=“mail-it.php” method=“post” id=“contact-form” class=“contact-form”>
<p class=“contact-name”>
<input id=“contact_name” type=“text” placeholder=“Full Name” value=“” name=“contact_name”>
</p>
<p class=“contact-email”>
<input id=“contact_email” type=“text” placeholder=“Email Address” value=“” name=“contact_email” />
</p>
<p class=“contact-email”>
<input id=“Groupon_number” type=“text” placeholder=“Groupon Number” value=“” name=“groupon_number” />
</p>
<p class=“contact-message”>
<textarea id=“contact_message” placeholder=“Your Message” name=“contact_message” rows=“15” cols=“40”></textarea>
</p>
<input type=‘text’ p class=“contact-submit”> <input type=“submit” value=“Send Your Message”>
</p>
<div id=“response”>

            &lt;/div&gt;

        &lt;/form

Where is the location of your PHP script that handles the form data? According to your form, it should be located in a file called mail-it.php that is in the same directory.