Jump to content

ToonMariner

Members
  • Posts

    3,342
  • Joined

  • Last visited

Everything posted by ToonMariner

  1. you could even use the thing designed for it!!! SELECT * FROM `tablename` WHERE `score` BETWEEN 8 AND 11
  2. if you are storing the images in the database then you could simply echo out the sum of the size of all the blob fields and the number of rows of the table containing all the images. if they are in a folder you could read the contents of the folder and echo out the number of files in there and grab the size of each file - but that will be very slow if you're hosting thousands of images
  3. red did you actually read his first post? ;)
  4. I have seen a post on this a long time ago..... The only thing I can think of is to store images in your database - that way they can olny be called from a script and you can control which script may call them.... But there is surely an easier way.
  5. ToonMariner

    HeLp?

    preg_match_all('/' . $string . '.{0,50}/',......
  6. no what you had initiall is fine... and the multisort will work fine on that to put it all in a table.... [code] <table> <thead>   <tr>   <th>Team</th>   <th>GF</th>   <th>GA</th>   <th>GD</th>   <th>Points</th>   </tr> </thead> <tbody> <?php $i = 0; $stop = count($team['index']); while ($i < $stop) { ?>   <tr>   <td><?php echo $team['name'][$i]; ?></td>   <td><?php echo $team['goals_for'][$i]; ?></td>   <td><?php echo $team['goals_against'][$i]; ?></td>   <td><?php echo $team['goal_difference'][$i]; ?></td>   <td><?php echo $team['conference_points'][$i]; ?></td>   </tr> <?php $i++; } ?> </tbody> </table> [/code]
  7. check your spelling! $_POST['prevvor3']; vs prevwor3 note the v's and w's
  8. array_multi_sort( $team['conference_points'],SORT_NUMERIC, SORT_DESC, $team['goal_differential'],SORT_NUMERIC, SORT_DESC, $team['goals_for'],SORT_NUMERIC, SORT_DESC, $team['goals_against'],SORT_NUMERIC, SORT_ASC, $team['name'],SORT_STRING, SORT_ASC, $team['index'],SORT_NUMERIC, SORT_ASC ); I include all teh fields in this multisort as I have tried in the past to just sort on the sub-arrays required but then indices got lost......
  9. if you use double quoted string you must escape any double quotes within that string! so each time you have anything like width="534" you shoudl use width=\"534\"
  10. put time() - 3600 in parenthesis fwrite($datei, $uniqid."|". (time() - 3600) ."|".$_SERVER["REMOTE_ADDR"]."|".$_POST['comment_id']."|".$name."|".$email_hp."|".$comment_text."\n"); You need to know your operator precedence to know that...
  11. If you want all the data from your query stored into an associative array (keeping the field names) try this... [code] <?php $qry = "SELECT * FROM `yourtable`"; $qry = mysql_query($qry); $arr = array(); while ($row = mysql_fetch_assoc($qry)) { foreach ($row as $key => $val) {   $arr[$key][] = $value; } } ?> [/code] I think that is pretty elegant........
  12. get on msn (toonmariner@hotmail.com) or googletlak (toonmariner@gmail.com)
  13. is that in the file you expect to see the new log info or on screen as a result of teh script running? What OS you using?
  14. Do you get ANY feedback off the script? take out the header and the exit and see if any erros are reported... I suspect a case of open_base_dir here.....
  15. OOP is great but in many cases its a bit overkill... Unless you have a massive site i see few reasons to use it - especially in this case when its only a file path that needs to be defined.
  16. you could define the absolute path instead. so if the image was in www.ursite.com/global/images/image1.gif you could just define the path as: "/global/images/image1.gif"
  17. error reporting supression - it means if there is an error there no warning will be printed to the screen - I only use this on lines that are not critical to the scripts completion.
  18. I can olny suggest you use the DOM and simply have the calendar style set to hidden initially and then position it absoluetly (not ideal mind you!).
  19. you could use shtml to include something that NEVER changes (unless you alter the file you are including). use php if you want this particluar element to beable to show different content - content that may change daily or content created randomly from the information you have provided in that file.
  20. php is dynamic - you can use certain information either submitted by a client or drawing database records etc. etc. shtml and server side includes are simply that. They cant be dynamic like php. the only thing you could do is include certain pages on certain pages but they will always look the same.
  21. go and have a look at this... [url=http://www.w3schools.com/html/html_forms.asp]http://www.w3schools.com/html/html_forms.asp[/url]
  22. only probelsm i can see there are missing ';'     //returns the row of the MySQL Query 25  $row = mysql_num_rows($result);     $i = 0; //HERE         //Selects the Stock Code of the Stock     $asking = mysql_result($result,$i,"code"); // HERE 30      <? 90  ++$i; // HERE     ?> ALSO Good practice NOT to use short tags (<?) for php use <?php instead.....
×
×
  • 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.