I have a fairly simple PHP page which is giving me some bother, and I'm hoping someone here can point me in the right direction to correct it.
In the HEAD section there is a bit of CSS...
.messText {
position: absolute;
width: 600px;
top: 250px;
margin: 0 auto;
font-family: 'Comic Sans MS', Arial, sans-serif;
font-size: 14px;
font-weight: bold;
color: red;
text-align: center;
}
Then within the BODY section, at the start is a bit of PHP...
if ($num_rows == 0) {
echo '<div class="messText">Sorry, your postcode could not be found - Please try again!</div>';
}
And lastly, withing some normal HTML, there is another line of PHP...
<td align="center" valign="center"><br/>
<?php echo '<div class="messText">Please click on the Continue button below to view your Times.</div>'; ?>
</td>
Now, the whole page is working correctly, except for one thing, and I think it might have something to do with DIV's?
This page has a text input field and a Continue button. It is linked to a MySQL table which contains a list of UK postcodes. The user is presented with this page with the "Please click..." message just above the continue button. If the user enters an incorrect postcode, then the idea is for the "Sorry, your postcode..." message to appear IN PLACE OF the "Please click..." message.
When the page is first displayed, only the "Please click..." message is shown, but when the user enters an incorrect postcode, the "Sorry, your postcode..." message appears on top of the first message. And then you can't read either message.
I expect there is a very simple remedy for this. Hopefully!
Thanks
Terry