Jump to content

reading the field to post to a template


alltest

Recommended Posts

I have a little snippet of a code below, that is from my php formmail template that *should* print from a replicated content (done through js), returning the replicated content from the form to an HTML template. for instance, the user clicks on "add" and a chunk of fields on the form are replicated (this works fine through js). Then the information should write to a php template that is emailed with the form reports. However, this doesn't work. somewhere the code isn't reading properly. I'm not a php programmer so I'm finding my way around by trial and error. here's the php template code that is used to say replicate these fields

 

<!-- start of replicatable content -->

 

<?php

//this should be obtained from the page

$numfields=1;

if($FieldCounter != "")

{

$numfields=intval($FieldCounter);

}

 

for($i=1; $i<=$numfields; $i++)

{

?>

<table border="0" width="99%">

<tr>

<td><strong>Courses</strong> </td>

<td>

<i>$QQQ_CourseCode_<?php print $i?>_EEE</i>

</td></tr>

<tr>

<td width="96">Grade</td>

<td width="169"><i>$QQQ_Grade_<?php print $i?>_EEE</i></td>

<td width="42">Status</td>

<td width="248"><i>$QQQ_Status_<?php print $i?>_EEE</i></td>

</tr>

<tr>

<td valign="top">Completion Month </td>

<td valign="top"><i>$QQQ_CompletionDate_<?php print $i?>_EEE</i></td>

<td>Year</td>

<td><i>$QQQ_Year_<?php print $i?>_EEE</i></td></tr>

</table>

<?php }?>

<!-- End of replicatable content -->

 

does this code seem ok? any suggestions? anyone ever done this replication through js and then use formmail templates?

Thanks TONS guys!

 

Link to comment
https://forums.phpfreaks.com/topic/44629-reading-the-field-to-post-to-a-template/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.