Forum Moderators: coopster
If you understand my question and can answer it, I certainly would appreciate it.
I hate being so new at this.
Thanks,
Teresa
we were all there, one day it will be like someone flicked on the light, an epiphany of sorts, and it won't be as overwhelming after that.
So I don't exactly know the scenario but I can give you an example of sorts.
The data submitted will be in the $_POST array (assuming it is posted data), so we could loop through the post array and see what happens. We will include our formatting in the echo'ed line so that line breaks will only be inserted if there is data present.
foreach($_POST as $key => $value) {
this will loop through the key/value pairs in the POST array. $key is the name of the variable and $value is the value entered/selected in that form element.
So for our next line we could echo a line unless the value is empty
if (!empty($value)) echo "<p>$key: $value";
you could also exclude certain things that you don't want to display by adding to this if statement, such as the submit button
if (!empty($value) && $key!= 'submit') echo "<p>$key: $value";
id we throw it together
foreach($_POST as $key => $value) {
if (!empty($value) && $key!= 'submit') echo "<p>$key: $value";
} let's start with that and see what we get
<added>too slow and long winded it seems ;)