When I check the $POST superglobal variable in the action script file after form Submit, I see that $POST isset but its count is zero.
The idea comes from the example "Building Web Forums" in the book "PHP and MySQL Web Development". The code for the form is generated in a function script file.
I had trouble getting $_SESSION to work; it works nicely after I found the correct placement of session_start(); in "each" script file.
I'm using PHP 4.3.44. I've reviewed several threads on the web. I get the impression that populating $_POST is rather straight forward.
Thanks for your Help.
This is the function file which generates the form:
<?
// display_fns.php
$table_width = "323";
function display_name_address_form()
{
global $table_width;
$table_width = '';
$myname = 'Mystery Man';
$citystate = 'Poulsbo WA';
$npa = '';
$nxx = '';
$line = '';
$timetocall = '';
$emailaddr = '';
?>
<FORM action="store_name_entry.php" method="post" enctype="text/plain">
<TABLE cellpadding=0 cellspacing=0 border=0 align=center width=<?=$table_width?>>
<TR>
<TD width="142" align=left>Your Name:
</TD>
<TD width="154" align=right>
<INPUT type="text" name="myname" value="<? echo htmlspecialchars($myname); ?>"
size=30 maxLength=72 >
</TD>
<TD width="5"> </TD>
</TR>
<TR>
<TD align=left>Your City & State
</TD>
<TD align=right>
<INPUT type="text" name="citystate" value="<? echo htmlspecialchars($citystate); ?>"
length=30 maxLength=72 >
</TD>
<TD width="5"> </TD>
</TR>
<TR>
<TD align=left>Telephone Number
</TD>
<TD align=right>
(<INPUT type="text" name="npa" value="<?=$npa?>"
size=3 maxLength=5 />)
<INPUT type="text" name="nxx" value="<?=$nxx?>"
size=3 maxLength=5 />
- <INPUT type="text" name="line" value="<?=$line?>"
size=4 maxLength=6 />
</TD>
<TD width="5"> </TD>
</TR>
<TR>
<TD align=left>Best Time to Call
</TD>
<TD align=right>
<INPUT type="text" name="timetocall" value="<?=$timetocall?>"
size=12 maxLength=72 />
</TD>
<TD width="5"> </TD>
</TR>
<TR>
<TD align=left>E-mail Address
</TD>
<TD align=right>
<INPUT type="text" name="emailaddr" value="<?=$emailaddr?>"
size=30 maxLength=72 />
</TD>
<TD width="5"> </TD>
</TR>
<TR align=middle><!--onclick="alert('Thank you. Your message has been submitted.');"-->
<TD colSpan=3><br>
<input type="hidden" name="action" value="submitted" />
<INPUT type="submit" name="submit" value="Send" /><br>
Click here to view our <a href= "javascript:window.open('display_privacy_policy.htm', 'Policy','width=700,height=400,scrollbars=yes');Void();">Privacy Policy.</A></TD>
</TR>
</TABLE>
</FORM>
<?
}
?>
[/code]