guys i have problem with else , if i reload my page else show text before send value from form why ? else text aways visible. I want after send some option from checkbox php check and after checked do something .....
<?php
if (isset($_POST['pravilen'])) {
echo ('pravileneee');
}else{
echo ('greshen');
}
?>
<form action="" method="post" role="form">
<div class="col-md-12">
<h1 class="gameh1">Моля отговорете на нашите въпроси за да продължите</h1>
<div class="alerts alert-info">
dsadsadass
</div>
</div>
<div class="form-group col-md-6 col-sm-12">
<div class="question"><input type="checkbox" id="check1" name="pravilen" value="pravilen" onclick="selectOnlyThis(this.id)"> Pravilen</br></div>
</div>
<div class="form-group col-md-6 col-sm-12">
<div class="question"><input type="checkbox" id="check2" name="answer" value="greshen" onclick="selectOnlyThis(this.id)"> greshen</br></div>
</div>
<div class="form-group col-md-6 col-sm-12">
<div class="question"><input type="checkbox" id="check3" name="answer" value="greshen" onclick="selectOnlyThis(this.id)"> greshen</br></div>
</div>
<div class="form-group col-md-6 col-sm-12">
<div class="question"><input type="checkbox" id="check4" name="answer" value="greshen" onclick="selectOnlyThis(this.id)"> greshen</br></div>
</div>
<div class="form-group col-md-12">
<input type="submit" class="questionbtn" value="Submit">
</div>
</form>
$_POST['pravilen']
will be set -checkbox
data is only sent through with the HTTP Request if the checkbox is checked (ditto on radio buttons and textarea)