I gave it a try and I'm not getting what I'm wanting. I am still having headaches with the Google Ad string that's being passed to the URL from the advertising company my customer hired. You helped me with that last month. I was thinking if something failed, instead of getting "record not found" then at least the viewer could view the webpage. Maybe even the ad may still convert; I don't know.
I have the following:
<?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('/var/www/html/rossinimanagement.com/','','../','../../','../../../');
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 viewer library
$libraryPath = 'cmsAdmin/lib/viewer_functions.php';
$dirsToCheck = array('/var/www/html/rossinimanagement.com/','','../','../../','../../../');
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 records
list($awardsRecords, $awardsMetaData) = getRecords(array(
'tableName' => 'awards',
'where' => whereRecordNumberInUrl(1),
'limit' => '1',
));
$awardsRecord = @$awardsRecords[0]; // get first record
// show error message if no matching record is found
if (!$first_pageRecord) { header('Location: http://kuecker.com/awards-test.php'); exit; }
?>
I have a test file out there with the ad info tacked onto the URL where you can see the error message I received: http://kuecker.com/awards-test.php/?keyword=%2Bkuecker%20%2Blogistics&gclid=CIL55sDS9NMCFdC4wAodApULLQ
Am I just not able to "send" it to the same URL? Circular reasoning, I know, but, just looking for some options.
Thank you.