Jump to content

sasa

Staff Alumni
  • Posts

    2,804
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by sasa

  1. pow($base,$exponent)
  2. Notice: Undefined variable: ItemID in C:\xampp\htdocs\transferprocess.php on line 5 you must set up your variable $ItemID and $Quantity $ItemID=$_POST['Checkbox']; $Quantity=$_POST['Quantity']; use foreach loop
  3. <?php $a = array('2007-12-14', '2007-12-16', '2007-12-17', '2007-12-22', '2007-12-23', '2007-12-26', '2007-12-28', '2008-01-02', '2008-01-06', '2008-01-08', '2008-01-12', '2008-01-14', '2008-02-17', '2008-02-19', '2008-02-20'); foreach ($a as $date){ list($y,$m,$d) = explode('-',$date); $ad[$y][$m][] = $d; } foreach ($ad as $y => $mounts){ foreach ($mounts as $m => $days){ for ($i = 0; $i < count($days)-1; $i++){ if (abs($days[$i]) + 1 == $days[$i + 1]) $days[$i + 1] *= -1; if ($days[$i] < 0 and $days[$i+1]<0) unset($days[$i]); } $out .= date("F", mktime(0, 0, 0, $m, 1, 2000)); $out1 =''; foreach ($days as $d) $out1 .= ($d>0 ? ', ':'').$d; $out .= substr($out1,1).' '; } $out .= "$y "; } echo $out; ?>
  4. yes, just start and ask if you got trouble
  5. / - start and end RECORD_ID= - pattern looking for () - subpart [0-9] - any digit + - one or more times try to print_r($b);
  6. try echo " <button value=\"".$row['punchitems']."\">".$row['punchitems']."</button>\n";
  7. try <?php $a = '&RECORD_ID=123456789&bla'; preg_match('/RECORD_ID=([0-9]+)/i',$a, $b); echo $b[1]; ?>
  8. in line echo "name='left_inout' tabindex=3>\n; add ending "
  9. try <?php function my_h(&$a){$a = htmlentities($a);} $td = array( array('%','&'), array('<','>'), array(5,6) ); array_walk_recursive($td, 'my_h'); print_r($td); ?>
  10. try <?php $x = array('add','xx','yy'); $t = 'Add fg hij yy maxxim'; echo $o = preg_replace('/(('.implode(')|(',$x).'))/i','<span style=\'color: #000066; font-weight: 600\'>$1</span>',$t); ?>
  11. try $AnimalID = $_GET['recordID'];
  12. try <?php $a = array( array("11" , "10", "abc"), array("130", "243", "foo"), array("76" , "107", "qwerty")); rsort($a); print_r($a); ?>
  13. change $_GET['page'] to $_GET['id']
  14. if(($a % $n) == 0) means $a modulo $n = 0
  15. sasa

    php error

    $_SESSION['username'] = $_POST['user']; change this line to $_SESSION['username'] = $_POST['username'];
  16. sasa

    php error

    can we see form part
  17. move this part echo '<a href="'.$_SERVER['PHP_SELF'].'?startrow='.($startrow+10).'">Next</a>'; after you set $startrow variable
  18. try $col=0; $lines = file("file.txt"); //open file $a = "<font style=\"background-color: red\" size=\"3\">"; //red html highlight $b = "<font style=\"background-color: yellow\" size=\"3\">"; //yellow html highlight $c = "<font style=\"background-color: blue\" size=\"3\">"; //blue html highlight $array = array($a, $b, $c); //i think i need to use a array? foreach ($lines as $line) { $data[$key] = explode("|", $line); $catname = trim($data[$key][1]); //define data needed print $array[$col++ % 3].'<strong>'.$catname.'</strong></font>'; // print values and html highlight
  19. try extrasql.=",`$name`='$member[$name]'";
  20. try if((md5($verif_box).'a4xn') == $_COOKIE['tntcon']){ // if verification code was correct send the message and show this page mail("bobrick82@gmail.com", 'online registration: '. "\n\n".$message."Lastname: $lastname"."Phone: $phone"."Address: $address"."City: $city"."Zip: $zip"."Date of birth: $dob"."Wife: $wife"."Husband $husband"."Childred: $children"."more info: $moreinfo". "From: $from"); // delete the cookie so it cannot sent again by refreshing this page setcookie('tntcon',''); } else {
  21. can you echo $extrasql
  22. try <?php $currentcategory = 'category1_sub1_sub2_sub3'; $currentcategory =explode('_', $currentcategory); for($i = 1; $i < count($currentcategory); $i++) $currentcategory[$i] = $currentcategory[$i - 1].'_'.$currentcategory[$i]; $categorytree =implode('.php : ', $currentcategory).'.php'; echo $categorytree; ?>
  23. try <?php $n = 'as3 frz8 . Ok23'; $n1 = preg_replace('/[^0-9\.]/','',$n); echo $n1; ?>
  24. try <?php $number = 2808; $string = sprintf('%06d',$number); echo $string; ?>
  25. X value *= 1.15
×
×
  • 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.