Hi Greg,
Thanks for answering so fast.
I also think that the issue is that the editor is converting the code so that it appears on the page, as opposed to be run by the browser. But, unfortunately your solution didn´t worked. I wasn´t usig a "wysiwyg" field, i was using a "textfield" field. Anyway, with neither worked
I ´m not using an "htmlspecialchars" function, or anything similar. I need help with this, Greg, this website has a lot of google maps.
.
At this link you can see the issue:
http://www.observatorioirsb.org/cms_googlemaps
this is the code:
<?php header('Content-type: text/html; charset=utf-8'); ?>
<?php
/* STEP 1: LOAD RECORDS - Copy this PHP code block near the TOP of your page */
// load viewer library
$libraryPath = 'cmsAdmin/lib/viewer_functions.php';
$dirsToCheck = array('/home/observat/public_html/','','../','../../','../../../');
foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }
// load record from 'ini_info'
list($ini_infoRecords, $ini_infoMetaData) = getRecords(array(
'tableName' => 'ini_info',
'where' => '', // load first record
'loadUploads' => true,
'allowSearch' => false,
'limit' => '1',
));
$ini_infoRecord = @$ini_infoRecords[0]; // get first record
if (!$ini_infoRecord) { dieWith404("Record not found!"); } // show error message if no record found
?>
<p style="font-family:Arial, Helvetica, sans-serif"><strong>Map Without CMS</strong></p>
<iframe width="440" height="306" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.es/maps?f=q&source=s_q&hl=es&geocode=&q=Islas+San+Bernardo,+Colombia&aq=&sll=9.719722,-75.782778&sspn=0.091874,0.169086&t=h&g=Islas+San+Bernardo,,+Colombia&ie=UTF8&hq=&hnear=Archipi%C3%A9lago+de+San+Bernardo&ll=9.789757,-75.853901&spn=0.051763,0.075359&z=13&output=embed"></iframe><br /><small></small>
<hr>
<p style="font-family:Arial, Helvetica, sans-serif"><strong>Map using a "textfield" field</strong></p>
<?php echo htmlencode($ini_infoRecord['ini_2_map_izq']) ?>
<hr>
<p style="font-family:Arial, Helvetica, sans-serif"><strong>Map using a "wysiwyg" field (adding the html code into the html editor)</strong></p>
<?php echo htmlencode($ini_infoRecord['ini_2_map_iz']) ?>
<hr>
<p style="font-family:Arial, Helvetica, sans-serif; font-size:26"><strong>Please look at the source code</strong></p>