Forum Moderators: coopster
I am using a single index.php file which "includes" header, footer, and sidebar information. The page content is also included and changes dependant upon which nav link is clicked.
Content is mostly html and is stored in the $content variable and is echoed to the page.
However, I have an html form which displays correctly, but the form processing is done using php. Resulting messages are assigned to variables and "should" be displayed accordingly. But I just can't get the thing to work correctly.
Below is a section of my code. $legend and $errmsg are set by the form_functions.php file which is included before the $content variable [removed to reduce code posting]. The table displays ok, but not the $legend or $errmsg
Must be something simple but I've been trying to solve this for about 4 hours - problem is, I only take care of my own sites so don't get too much practice - any advice much appreciated.
TIA - Spook
<?php
$content = '
<table width="100%" height="600" border="1" bgcolor="#CCCCCC" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<fieldset>
<legend><?php echo $legend;?></legend>
<?php echo $errmsg;?>
</fieldset></td>
</tr>
</table>
';?>
The form now functions correctly using panos's code, but if I could impose on you a little further. Can you point me to where i can find out about the full stop before and after the variable as in: >".$legend."</ I have searched both the forum and php.net but can only find information about "Hyperwave Functions" which doesn't seem appropriate.
The $$variables looks interesting, but will take a little longer to get my head around.
Thanks again.