At present, I have a form which the users from my site fill in and once submitted, it gets saved to my db chronoforms_ce. The forms contains the user name and 10 other bits of information selected from drop down boxes.
What i would like to do now, is create a duplicate of this form that displays the users previously submitted data based on their username. This form will be read only and its purpose is to serve as a reminder for the user to see what they have submitted.
I have used my previous code to get the username of the person, but i'm not sure of the next step:
The next step would be to populate text box 1 with the information submitted by the user in combo box 1, that is stored in the db. I think the code below could be used with some modification (replacing the x's):
Any help would be greatly appreciated
What i would like to do now, is create a duplicate of this form that displays the users previously submitted data based on their username. This form will be read only and its purpose is to serve as a reminder for the user to see what they have submitted.
I have used my previous code to get the username of the person, but i'm not sure of the next step:
<?php
// Get user-information from Joomla
$user = &JFactory::getUser();
?>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" for="name">Name:</label>
<input type="text" readonly="readonly" name="name" id="name" size="20"
maxlength="40" value="<?= $user->name; ?>" />
</div>
The next step would be to populate text box 1 with the information submitted by the user in combo box 1, that is stored in the db. I think the code below could be used with some modification (replacing the x's):
<DIV class=form_item >
<DIV class="form_element cf_textbox" ><LABEL class=cf_label >Selection 1</LABEL>
<?php
$db =& JFactory::getDBO();
$query = "
SELECT *
FROM #__chronoforms_ce ";
$db->setQuery($query) WHERE xxxxx;
$rows = $db->loadResultArray(xxxx);
?>
x
x
x
x
</DIV>
Any help would be greatly appreciated