$indent) { if (!$newPID) die("Indented too much ???\n"); if ($bonlyallowaddinlowest) { $qry = "UPDATE phplinks_categories set AllowSites = 'N' where ID = $newPID"; } get_cats($newPID, $newindent); } else if ($newindent < $indent) break; else { $linedata = split('%', $linedata); //split at '%' delimiter //initialize fields and values used in query with 'ParentID' (which ofcourse can not be found in the textfile) $qryfields = 'PID'; $qryvalues = $PID; //Check which values were found, add them (and corresponding tablefields) to query for($i = 0; $i if output in browser $nline++; } } } $db = mysql_connect($mysql_server, $mysql_user, $mysql_pw); mysql_select_db($mysql_db, $db); $data = file($catfile) or die('Could not read file!'); //uncomment to delete all current category entries mysql_query("delete from $tablename", $db); get_cats(0, 0); ?>