PHP recordset Array
Posted: Mon Jun 13, 2005 5:49 am
Hi Guys
Can anyone help with this
I am passing (submiting) the following values to a report page from a textfield called ..(sqlvar)
...........
these are in one hidden field as you see above and the length can change dynamically
i am using the following on the receiving page
how can i proccess $strarray2[$i] as the var $row_recordset['fields']from the database
Can anyone help with this
I am passing (submiting) the following values to a report page from a textfield called ..(sqlvar)
Code: Select all
input name="e;sqlvar"e; type="e;hidden"e; value= ...
$row_recordsetї'field1']¦$row_recordsetї'field2']¦$row_recordsetї'field3']¦$row_recordsetї'field4']these are in one hidden field as you see above and the length can change dynamically
i am using the following on the receiving page
Code: Select all
$sqlvariable = $_POSTї'sqlvar'];
$sqlvariable =stripslashes($sqlvariable);
if ($sqlvariable!=''){
$strarray2 = explode('¦',$sqlvariable );
$carray = count($strarray2 );
for ($i=0; $i < $carray; $i++){
$td2 = $td2.'<td><?php echo'.$strarray2ї$i].'?></td>';
}Code: Select all
<body >
<table>
<? this will be a DO loop { ?>
<tr>
<?php echo $td2; ?>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>how can i proccess $strarray2[$i] as the var $row_recordset['fields']from the database