s l s l - 5 months ago 15
CSS Question

PHP not detecting css custom made button when submitted?

so I have a design i'm using, however for some reason i can't get the button to get detected on my form, i've tried many things such as, trying to detect the class name, changing the name, assigning it an name via html for some reason nothing's working. Here is my button.

.blue_button
{
background: #005b66;
background: -moz-linear-gradient(top, #005b66 0%, #07252d 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#005b66), color-stop(100%,#07252d));
background: -webkit-linear-gradient(top, #005b66 0%,#07252d 100%);
background: -o-linear-gradient(top, #005b66 0%,#07252d 100%);
background: -ms-linear-gradient(top, #005b66 0%,#07252d 100%);
background: linear-gradient(to bottom, #005b66 0%,#07252d 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#005b66', endColorstr='#07252d',GradientType=0 );
border-radius: 3px;
display: inline-block;
position: relative;
margin: 0 auto;
bottom: 58px;
border: 1px solid #033f47;
width: 128px;
height: 30px;
color: white;
font-weight: 100;
}


and how i'm calling it on my html form:

<form method="POST">
<div type="submit" name="register" class="blue_button"><div class="blue_button_text noselect" name="register" type="submit">Register</div></div>
</form>


I've tried blue_button & register with my PHP code, still couldn't detect it, there's no issues with my php code i tested it on a blank html form a second ago.

Answer

If you don't want to use <input type="submit" .../> you can submit a form with the help of javascript (example with classic inline js):

<form method="POST" name="myForm">
<div ... onClick="myForm.submit();"></div>
</form>
Comments