Here's what I've got (using includePHP plugin to do it in an article, since making a component is beyond my ability and I don't have time to figure it out):
Code: Select all
{php}
$db = JFactory::getDBO();
$user = &JFactory::getUser();
$sqlout = "SELECT * FROM `jos_chronoforms_3` WHERE `username` ='$user->username'";
$db->setQuery($sqlout);
$resultout = mysql_query($sqlout);
while ($myrow = mysql_fetch_assoc($resultout)) {
?>
Name: <?php echo $user->name; ?><br />
Date: <?php echo $myrow['recordtime']; ?><br />
Topic 1: <?php echo $myrow['topic1']; ?><br /><br />
<form name="getreport" action="index.php?option=com_content&view=article&id=47&Itemid=58" method="post">
<input type="textbox" name="recorded" value="<?php echo $myrow['recordtime']; ?>">
<input type="submit" value="Get Report"><br /><br />
<?php
}
?>
{/php}
I think I probably need some kind of foreach statement so that the value of "recorded" that gets passed is the right one.
I made the input type a textbox just so I could verify it was pulling the right 'recordtime' values for the records (I had it hidden) - and that's fine.
Suggestions?