Question
The current script I'm working on has one form to get the location then after that is submitted and confirmed without errors it will allow the next button to be available to the user prior to updating it to the database.
The main reason for this is to update the map, to give the user a chance to change their mind before proceeding.
The problem is, I want to keep the data they've already submitted. By doing this
<div class="col-md-6">
<div class="form-group">
<label>Country</label>
<select class="form-control" name="country" value=<?php if (isset($_POST['locate'])) { echo '"'.$_POST['country'].'"'; } else { echo '""'; } ?> required>
<?php include('includes/country_list.php');?>
</select>
</div>
<div class="form-group">
<label>Address</label>
<div>
<input type="text" value=<?php if (isset($_POST['locate'])) { echo '"'.$_POST['address'].'"'; } else { echo '""'; } ?> class="form-control" data name="address" data-parsley-required="true" placeholder="First line address, postcode, zip code etc.." data-parsley-trigger="change">
</div>
</div>
<div class="form-group">
<label>Site Name</label>
<div>
<input type="text" value=<?php if (isset($_POST['locate'])) { echo '"'.$_POST['site_name'].'"'; } else { echo '""'; } ?> class="form-control" data name="site_name" data-parsley-required="true" placeholder="//example: Fawley Refinery, Cottam Powerstation.." data-parsley-trigger="change">
</div>
</div>
</div>
The problem is, I don't want to touch the country_list.php I want to select a default value in the part. However, what I'm currently using does not work.