View Full Version : page went blank on adding 2nd array
bsaid1_acu419164
11-29-2010, 07:07 AM
Hi, i have tried to reproduce cars example given in this url: http://www.i-cre8.co.uk/webassist/multiple-dynamic-dropdowns/cars.php , using DW CS5 , Apache 2.2.15 (Win32), PHP 5.2.13 , Mysql 5.1.
When i add the first array, the drop down "models" work fine. but when I add the second array for the "engine size" the browser's page went blank.
I have tried my owns tests with different tables but same results.
would please take a look to the attachement :
Jason Byrnes
11-29-2010, 08:31 AM
a blank p[age means that a php error is occuring.
add the following at line 1 to turn error reporting on:
<?php
error_reporting(E_ALL);
ini_set('display_errors','on');
?>[/php]
from your source, it looks like you are using an older version of dynamic drop downs.
the error is that this function is being repeated on the page:
function WA_DD_Replace($startStr) {
$startStr = str_replace("'", "|WA|", $startStr);
$startStr = str_replace("\\", "\\\\", $startStr);
$startStr = preg_replace("/[\r\n]{1,}/", " ", $startStr);
return $startStr;
}
this is a bug that was corrected in the latest version of Dynamic Dropdowns.
bsaid1_acu419164
11-29-2010, 11:53 PM
Thanks for relpy
dropdowns v.2.7.0
I have added the lines as you advice to get errors displayed but page always turns blank.
I have modified the php.ini file so that display_errors = On but same result.
tested this on FF and IExplorer
any ideas?
Please help.
bsaid1_acu419164
11-30-2010, 12:25 AM
finally it's resolved
the error was :
Fatal error: Cannot redeclare wa_dd_replace() (previously declared in F:\UniServer5_6b\UniServer56b\www\pdrmt\cars.php:9 2) in F:\UniServer5_6b\UniServer56b\www\pdrmt\cars.php on line 144
I have deleted :
function WA_DD_Replace($startStr) {
$startStr = str_replace("'", "|WA|", $startStr);
$startStr = str_replace("\\", "\\\\", $startStr);
$startStr = preg_replace("/[\r\n]{1,}/", " ", $startStr);
return $startStr;
}
Now it's OK
very thanks for the help
Jason Byrnes
11-30-2010, 06:56 AM
glad to hear it is working.
Dave Buchholz
12-01-2010, 12:21 AM
Just to add that the latest version of Dynamic Dropdowns (2.7.5) solves this issue, so you should download it from the downloads section of your account.
vBulletin® v3.8.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.