Hi everyone
I have a little problem that I'm sure someone here can help me with.
I have a web page with a text input field and a couple of submit button. The user would enter something in the text field and then click on one of the buttons. Each button opens a new page. But all of this is pretty standard coding, so I'm trying to do this a bit differently...
When the user first arrive at this page, the two button are not visible. The user then enters something, which is checked with PHP, using
if (isset($_POST['Submit'])) {
if ($_POST['Submit'] == "Yes" or "No") {
if (isset($_POST['sPostcode'])) $postcode = $_POST['sPostcode'];
Therefore, if the value of Submit is "Yes", then the postcode line is evaluated.
Then, a bit further down, there is this bit of code for the two buttons.
<?php
if ($postcode != "") {
print "<tr>";
print "<td colspan='2' align='left' valign='top' class='labelSect'><br>";
print "<center>Now select either the Left or Right button below</center>";
print "</td>";
print "</tr>";
}
?>
The above code is actually just a message telling the user that the two buttons are now available. Initially, this message isn't shown, but if the user actually clicks either button, the message is shown.
That isn't exactly how I wanted it to work, as I cannot hide the buttons, and the above code will only work if a button is pressed.
I think what I would like to know is, is there something, perhaps like JavaScript(?), that can tell if something is actually entered into a text input box?
Thanks
Terry