Jump to content

sasa

Staff Alumni
  • Posts

    2,804
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by sasa

  1. change line <?echo "$offspring";?> to <? if($offspring != $tmp) {$tmp = $offspring;echo "$offspring";} else echo ' ';?> you must order your query by offspring
  2. in 1st page after found=Adams+Normer#121 is found=Adams+Oscar#123 where is #122? etc.
  3. look your 1st page your 1st record #1(Aanstoos Edward & Virginia M) isn't 1st
  4. i see that you remove 7 in front this forum convert'np' to np if confused me
  5. remove part np=blah from your link try use link http://www.eastlancsmedicalservices.co.uk/checkCompletedJobs.php?s=10
  6. no we don't understand each other i say that you run script and look the line that scrip outputs just before warning can you post that line (line that echoed by script) it must look like SELECT * FROM teachersname WHERE etc.
  7. i can not find out relations between yours tables. can you explain this
  8. remove np=7 from your link, you calculate from s in which page you are i see in your page that you don't use no problem (it is no problem, i think) name with space is not regular from form field, convert space to '_'
  9. change name 'no problem' to 'no_problem'
  10. you have line echo $qve_data = "SELECT * FROM teachersname".$where.$lm; it echo sql on screen. what is echoed line look like? try echoed line in phpMyAdmin if you get echoed output "SELECT * FROM teachersname".$where.$lm; remove single quote in this line
  11. your 1st array element (index = 0) is string '2 Whole breasts of chicken, cut into 1-in cubes ";i:1;s:25:"1 md Onion, sliced thick ' it has 48 caracters but in your serialized variable is s:49 (string(49))
  12. try <?php $month =($_GET['month']=='')?date("m")-2:$_GET['month']-2; $year =($_GET['year']=='')?date("Y"):$_GET['year']; $month = $month > 0 ? $month : $month +12; for($i=1;$i<=5;$i++) { calendar($month,$year,NULL,1,$class); $month++; if ($month > 12) { $month = 1; } // end if if($month < 1){ $month=11; } } // end for ?>
  13. change if(isset($_GET['poitype']) and count($_GET['poitype']) > 0) $poitype = implode(",", $_GET['poitype']); to if(isset($_GET['poitype']) and count($_GET['poitype']) > 0) $poitype = implode(",", $_GET['poitype']); else $poitype = 'Nothing selected! ';
  14. try <?php $a = 'wwW*.sasa.l*'; if(preg_match('/^(www|\*)[\*]?\.[a-z0-9]+\.([a-z0-9]+|\*)[\*]?$/i',$a,$b)) echo 'OK'; else echo 'NO'; ?>
  15. change $poitype = implode(",", $_GET['poitype']); to if(isset($_GET['poitype']) and count($_GET['poitype']) > 0) $poitype = implode(",", $_GET['poitype']);
  16. you $recordnum = $limit => number of pages is 1 you must count all records without limit part $recordnum = mysql_result(mysql_query("SELECT count(*) FROM `Tutorials` WHERE `Section`='".Secure($_GET['section'])."' AND `Approved`='1' "),0,0);
  17. change line[code]<strong> <a href="showcategory.php?cid=<? echo $rst["id"]?>" class="biglink"?>" class="biglink" ><? echo $rst["cat_name"]; ?></a> to<a href="showcategory.php?cid=<? echo $rst["id"]?>" class="biglink"><? echo $rst["cat_name"]; ?></a>[/code]
  18. this solution don't work 100% if you have in path part '/../../' (two directory up) optimized path is wrong look <?php function OptimizeCurpath($curpath){ $a=$curpath; $a = explode('/',$a); $count = count($a); for ($i = 1; $i < $count; $i++) { if ($a[$i] == '..' && $a[$i-1]!='..') { unset($a[$i]); unset($a[$i - 1]); } } $a=implode('/',$a); return $a; } function OptimizeCurpath1($curpath){ $x = ''; while (($curpath = preg_replace('/\/[^\/\.]+\/\.\.\//','/',$curpath)) != $x) $x = $curpath; return $curpath; } function opti_path($path, $is_opti = false) { if ($is_opti) return $path; $path = explode('/',$path); $count = count($path); $is_opti = true; for ($i = 1; $i < $count; $i++) { if ($path[$i] == '..') { if (isset($path[$i-1])) { unset($path[$i]); unset($path[$i - 1]); $is_opti = false; } } } return opti_path(implode('/',$path), $is_opti); } $a = '../dev/sample1/../sample2/subsample2_1/../../sample3/../'; echo OptimizeCurpath($a); echo "\n<hr />\n"; echo opti_path($a); echo "\n<hr />\n"; echo OptimizeCurpath1($a); ?> you can see 3th possibility for do that
  19. what is type is that file ?
  20. can you post structure of your db
  21. try <?php $a = '../dev/sample1/../sample2/../sample3/../'; $a = explode('/',$a); $count = count($a); for ($i = 1; $i < $count; $i++) { if ($a[$i] == '..') { unset($a[$i]); unset($a[$i - 1]); } } echo $a = implode('/',$a); ?> or <?php function opti_path($path, $is_opti = false) { if ($is_opti) return $path; $path = explode('/',$path); $count = count($path); $is_opti = true; for ($i = 1; $i < $count; $i++) { if ($path[$i] == '..') { if (isset($path[$i-1])) { unset($path[$i]); unset($path[$i - 1]); $is_opti = false; } } } return opti_path(implode('/',$path), $is_opti); } $a = '../dev/sample1/../../sample2/../sample3/'; echo opti_path($a); ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.