iframes and info pulledfrom database
3 posts by 2 authors in: Forums > CMS Builder
Last Post: March 10, 2008 (RSS)
By mawebplus - March 10, 2008
hello i have been testing some iframes but have a question, i have3 records record 1 pulls info ok for the i frame but record 2 and 3 still show record 1 picture in iframe, ill send you the link to the pages so you can see what i mean:
http://www.awebolovendo.com/resultados.php?search_fd0=1
change the 1 for 2 or 3 at the end of the link to see other records.
this is build as follows:
resultados.php file[/#333366]
<table width="683" border="0">
<?php if (empty($record)): ?><!-- Display "No Records Found" Message -->
No se encontraron registros!<br/>
<br/>
<?php endif ?>
<?php require_once ".........../viewer_functions.php";
$options = array(); // NOTE: see online documentation for more details on these options
$options['tableName'] = 'vehiculos'; // (REQUIRED) MySQL tablename to list record from. Example: "article";
$options['recordNum'] = ''; // (optional) Record number to display. Example: "1"; Defaults to number on end of url, then 1
$options['where'] = ''; // (ADVANCED) MySQL WHERE conditions to use INSTEAD of recordNum to look up record. Example: "fieldname = 'value'"
$record = getRecord($options);
?>
<tr>
<td>
<iframe name="producto" src="iframe.php" width="425" height="337" frameborder="0" scrolling="no"></iframe>
</td>
<td width="77%" valign="top">
<?php if (empty($record)): ?><!-- Display "No Records Found" Message -->
No se encontraron registros!<br/>
<br/>
<?php endif ?>
<?php if ($record): ?>
<?php foreach (getUploads($options['tableName'], 'images', $record['num']) as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>
<a href="<?php echo $upload['urlPath'] ?>" target="producto">
<img src="<?php echo $upload['thumbUrlPath'] ?>" alt=""
width="120" border="0" /></a>
<?php endif ?>
<?php endforeach ?>
<?php endif ?>
</td>
</tr>
</table>
iframe file: http://www.awebolovendo.com/iframe.php
i hope you see what this is doing and how can i make itload the right picture to show, also all pictures have links and work fine
http://www.awebolovendo.com/resultados.php?search_fd0=1
change the 1 for 2 or 3 at the end of the link to see other records.
this is build as follows:
resultados.php file[/#333366]
<table width="683" border="0">
<?php if (empty($record)): ?><!-- Display "No Records Found" Message -->
No se encontraron registros!<br/>
<br/>
<?php endif ?>
<?php require_once ".........../viewer_functions.php";
$options = array(); // NOTE: see online documentation for more details on these options
$options['tableName'] = 'vehiculos'; // (REQUIRED) MySQL tablename to list record from. Example: "article";
$options['recordNum'] = ''; // (optional) Record number to display. Example: "1"; Defaults to number on end of url, then 1
$options['where'] = ''; // (ADVANCED) MySQL WHERE conditions to use INSTEAD of recordNum to look up record. Example: "fieldname = 'value'"
$record = getRecord($options);
?>
<tr>
<td>
<iframe name="producto" src="iframe.php" width="425" height="337" frameborder="0" scrolling="no"></iframe>
</td>
<td width="77%" valign="top">
<?php if (empty($record)): ?><!-- Display "No Records Found" Message -->
No se encontraron registros!<br/>
<br/>
<?php endif ?>
<?php if ($record): ?>
<?php foreach (getUploads($options['tableName'], 'images', $record['num']) as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>
<a href="<?php echo $upload['urlPath'] ?>" target="producto">
<img src="<?php echo $upload['thumbUrlPath'] ?>" alt=""
width="120" border="0" /></a>
<?php endif ?>
<?php endforeach ?>
<?php endif ?>
</td>
</tr>
</table>
iframe file: http://www.awebolovendo.com/iframe.php
i hope you see what this is doing and how can i make itload the right picture to show, also all pictures have links and work fine
Re: [mawebplus] iframes and info pulledfrom database
By mawebplus - March 10, 2008
never mind i fixed it, lol with this line
<iframe name="producto" src="iframe.php?<? echo $record['num']; ?>"[/#ff0000] width="425" height="337" frameborder="0" scrolling="no"></iframe>
<iframe name="producto" src="iframe.php?<? echo $record['num']; ?>"[/#ff0000] width="425" height="337" frameborder="0" scrolling="no"></iframe>
Re: [mawebplus] iframes and info pulledfrom database
By Dave - March 10, 2008
Good to hear it's working! Let us know if you need anything else.
Dave Edis - Senior Developer
interactivetools.com
interactivetools.com