Hey all, I hope someone has an answer or some pointers about this. Here's my deal. I have 3 functions
htmlbegin(), echo's DOCTYPE,,<body>, etc. tags
table(), where I'm looking for some help, and
htmlend(), </body>
I would like the items in table to be dynamic based upon <FORM> submission. For example, I have this based off of steps (step 1, step 2, etc.):
function htmlbegin() {
print (" ....");
}
function table() {
print ("
<table background=black etc.>
<tr>
<td>
<!-- nested table -->
<table background=white etc.>
"); // end print to begin dynamic table rows/data
switch ($step)
{
case "1":
print ("<tr><td>Blah One.
<form method=POST action=$PHP_SELF?step=2>
<input type=submit name=continue value=continue>
</form>
</td></tr>");
break;
case "2":
print ("<tr><td>Blah Two (another form)</td></tr>");
break;
}
print (" </table></td></tr></table>"); //end of nested tables
endhtml() {
print ("</body>");
My problem is twofold. One, I cannot get my special cases to print at all. I just get my background color, and nothing in the HTML code source for the (dynamic) table stuff. Am I supposed to say right below that:
print ("$step=1");
because I've tried that and still the same thing. No dynamic content.
Two, is this the right way to go about this? I would like to have the URL updated each time a person completes a step, such as:
www.host.com/blah.php
www.host.com/blah.php?step=2
www.host.com/blah.php?step=3
etc.
Any helps/tips/pointers/someone telling me that I'm just flat out doing this wrong!! Please let me know. And thank you very much ahead of time (i'm sure I'll thank you again if you answer 🙂
./brm