Jump to content

taquitosensei

Members
  • Posts

    676
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by taquitosensei

  1. or if(!$_SESSION['auth'])
  2. where does the $sec1 array come from? I don't see it in the code you posted. probably supposed to be $sec1 = unserialize ($data['sec1']);
  3. it looks like you're modifying oscmax or oscommerce. You should ask on one of their forums. They would be more help.
  4. if you put this ini_set('display_errors',1); error_reporting(E_ALL); at the top of your script it should've give you something along these lines PHP Parse error: syntax error, unexpected T_BOOLEAN_AND, expecting ',' or ')' in test.php on line 19 Parse error: syntax error, unexpected T_BOOLEAN_AND, expecting ',' or ')' in test.php on line 19 which is this line if (isset($row['id2'] && $row['id2'] != $id2 )) which should be if (isset($row['id2']) && $row['id2'] != $id2 )
  5. use sprintf to format it echo sprintf("%04d",$time);
  6. your live server was set to not display warnings. You localhost is set to show them. They were there you just couldn't see them. You have output either in your config.php or in this file before the session_start(); probably the extra line between <html> and <head>. But could be something in your config.php also.
  7. you could do something like this $query = "SELECT * FROM product_stockist WHERE $cat='Y' ORDER BY Region"; $result = mysql_query($query); while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $results[$region]=$row; } echo "<table>"; foreach($results as $regionname=>$region) { echo "<tr><td>"; echo "<table width=100% align=center callpadding=2 cellspacing=0>"; echo "<tr><td colspan='5' align='center'>$regionname</td></tr>"; foreach($region as $row) { echo "<tr>"; echo "<td>{$row['Account_Name']} </td>". "<td>{$row['Address_Line_1']} </td>". "<td>{$row['Address_Line_2']} </td>". "<td>{$row['Address_Line_4']} </td>". "<td>{$row['Post_Code']} </td>". "<td>{$row['Region']} </td>"; echo "</tr>"; } echo "</td></tr></table>"; } echo "</table>";
  8. Usually a blank page means you have a fatal error in your script and displaying errors is turned off. You can put this at the top of your script while developing to help out with debugging and it would have given you the same information jl5501 gave. Plus any other errors on the page. ini_set('display_errors',1); error_reporting(E_ALL);
  9. $consultsq1 = "SELECT *,thecorrecttable.pod FROM icu INNER JOIN bundle ON icu.id_incr = bundle.pt_id "; $result = mysql_query ($consultsq1) or die ("Invalid query: " . mysql_error ()); for($n=0;$row = mysql_fetch_assoc ($result);$n++) { echo $row['pod']; }
  10. something like this. There's probably an easier way. function getMaxIndex($array) { $oldindex=0; foreach($array as $index=>$value) { if($index>$oldindex) { $savedindex=$index; } $oldindex=$index; } return $savedindex; } then $array=array(21=>33,19=>3,12=>2); $maxindex=getMaxIndex($array);
  11. probably because you don't have your encodings setup properly. try this in your <head></head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> also if you're storing it in your database the database may not be setup to use the right encoding.
  12. I don't think it will parse the php that way. Try this >>>>>>>>>PHP CODES<<<<<<<<<<<<<< mysql_connect("localhost", "admin", "Pass") or die(mysql_error()); mysql_select_db("movedb") or die(mysql_error()); $find = strtoupper($find); $find = strip_tags($find); $find = trim ($find); $data = mysql_query("SELECT * FROM sheet1sa WHERE upper($field) LIKE'%$find%'"); while($result = mysql_fetch_array( $data )) { // ?> <table width="400" border="0" class="sample"> <tr> <td width="97" rowspan="5"><?php echo $F6; ?></td> <td width="125">Name, Lastname</td> <td width="164"><?php echo $name; ?></td> </tr> <tr> <td>Cell Number </td> <td><?php echo $cell; ?></td> </tr> <tr> <td>Extension Number </td> <td><?php echo $ext; ?></td> </tr> <tr> <td>Office Number </td> <td><?php $F2; ?></td> </tr> <tr> <td>Department</td> <td><?php echo $dep; ?></td> </tr> </table> <br> <br> <?php }
  13. no because it's not a style. You're telling the browser not to cache content.
  14. if $col is actually a whole number you could do this fwrite($this->fp,"<td class=xl24 width=64 >".(int)$col."</td>");
  15. I think what you're really after is not caching at all put this in your <head></head> <head> <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <META HTTP-EQUIV="Expires" CONTENT="-1"> </head> then do another head section after </body> with the same content </body> <head> <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <META HTTP-EQUIV="Expires" CONTENT="-1"> </head>
  16. or... age between 16 and 20
  17. you were pretty damn close row2['assignment_number'] = $assign; if(strlen($assign)>50){ $assign= substr($assign, 0, 50); }
  18. the default value is in the function definition function makeSportList($name="Default Value Goes Here", $sportlist=$sport_list) { }
  19. close <?php $varto = "myemail@domain.com";?> <input type="hidden" type="text" name="email" value="<?php echo $varto; ?>" <br />
  20. use rsort then
  21. nm I didn't read the post thoroughly
  22. It all depends. Will all your numbers 2 digit numbers? Do you want to keep the highest number or the lowest? for 2 digits and keeping the lowest digit something like this should work. foreach($array as $digit) { if(isset($array[strrev($digit)]) && $digit < strrev($digit)) { unset($array[$strrev[$digit]); } }
  23. sprintf echo sprintf("%02d",$code_array['code']); should do it
  24. try this $my_var=8; $array=array(7,9,11,6); // make sure it's in numerical order sort($array); foreach($array as $test_var) { echo $my_var." | ".$test_var."\r\n"; if($my_var < $test_var) { $result=$test_var; break; } } echo $result;
  25. do this print_r($result); die(); after your switch for the CatID the should tell you what the error is.
×
×
  • 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.