about dd & dd-check

tracy329
05:17:11
I stall the db and change the servername & username & pw.
but it show me

"0 and !is_numeric($cat)) { echo "Data Error"; exit; } //@$cat=$HTTP_GET_VARS['cat']; // Use this line or above line if register_global is off //Getting the data from Mysql table for first list box////////// $quer2=mysql_query("SELECT DISTINCT category,cat_id FROM category order by category"); //End of query for first list box//////////// // for second drop down list we will check if category is selected else we will display all the subcategory///// if(isset($cat) and strlen($cat) > 0){ $quer=mysql_query("SELECT DISTINCT subcategory FROM subcategory where cat_id=$cat order by subcategory"); }else{$quer=mysql_query("SELECT DISTINCT subcategory FROM subcategory order by subcategory"); } // end of query for second subcategory drop down list box /////////////////////////// echo "
"; // Add your form processing page address "

on the page. and just can see two drop Drown box,but no data get in.
Why it can't work?
smo1234
05-18-2011
Try by adding <?Php in place of <? while starting your PHP code.
cabalsdemon
06-08-2012
$dbservertype='mysql';
$servername='localhost';
// username and password to log onto db server
$dbusername='username';
$dbpassword=password';
// name of database
$dbname='database name';

you did put your info in this config right
azizah66
08-12-2012
I also download the dd3.php and other files related . Everything will work fine after user select the first and second drop down, but before they choose the dropdown list i got this message,

Notice: Undefined index: cat in C:\xampp\htdocs\jhep\dd3\dd3.php on line 48

Notice: Undefined index: cat3 in C:\xampp\htdocs\jhep\dd3\dd3.php on line 56

Need help. thank you



Thank you, manage to understand and modified using isset before i declare the cat and cat3, now no more error. Thank so much for the suggesstion.

it's working fine now. Thanks a lot for sharing the dd3.zip. I learnt a lot from it.

smo1234
08-11-2012
This is because the script started using the variables before declaring them. We will take care of this and update the script. You can suppress this message and continue your script. Read this on how to read or suppress error messages in PHP
Please Login to post your reply or start a new topic