Jump to content

litebearer

Members
  • Posts

    2,356
  • Joined

  • Last visited

Everything posted by litebearer

  1. You need to modify your table. the fields that contain values that are in reality numbers should NOT be varchar
  2. Perhaps these may help... crop an image - http://www.nstoia.com/sat/crop/ resize an image - http://www.nstoia.com/sat/resize/ add a drop shadow - http://www.nstoia.com/sat/dropShadow/
  3. $query = "Update grocery_cart SET order_size='$box_selection', pp_check='$agree', payment='$payment' WHERE userid='$user'"; /* put query into a variable */ echo $query; /* testing the query */
  4. Also, for debugging purposes, it helps if you place your queries in a variable. You then can echo the variable to ascertain it contains what you expect.
  5. try... <?php $question = $_POST['fname']; if ($question=="Bob Jones") { $answer = "admin"; }else{ $answer = "nobody"; } echo $question . ", " . $answer; ?>
  6. if the above code is the complete code for that test script, where did you define $limit?
  7. http://www.tizag.com/mysqlTutorial/mysqlcount.php
  8. Neverbegosu, that quote is simply part of his signature. It appears on EVERY post he makes. It is NOT intended for you personally.
  9. Some psuedo code... $num = date('d'); if($num&1) { $odd = TRUE; } else { $odd = FALSE; } switch $count case: 2 if $odd display div 1 image 2 display div 2 image 1 else display div1 image 1 display div2 image 2 } case: 1 display div1 image 1 }
  10. Rough concept div 1 if day value is even display image 1 else display image1 div 2 if day value is odd display image 2 else display image 1
  11. Presuming each image is in a separate row... $q = "SELECT image_name FROM images WHERE image_type = 'ad' AND user = '$id'"; $r = mysqli_query( $dbc, $q ); while ( $row = mysqli_fetch_array( $r, MYSQLI_ASSOC)) { $imageName[] = $row['image_name']; } $count = count($imageName); if($count>0) { ?> <div class="add1"><?php echo $imageName[0]; ?></div> <?php } if($count>1) { ?> <div class="add2"><?php echo $imageName[1]; ?></div> <?php }
  12. Quote from: http://www.directadmin.com/forum/showthread.php?t=43819&p=223089 ================== Aaron_E Aaron_E is offline Registered User Join Date Jun 2012 Posts 1 Mirrors are still up, just like the php git repo. http://nl.php.net/ http://git.php.net/?p=php-src.git;a=summary ==================
  13. why??? perhaps... $dest = "./images/album_thumb/"; while the actual folder that works is... "/images/photo_thumbs" Obviously NOT the same folder
  14. try changing this... $dest = "./images/album_thumb/"; to this... $dest = "/images/album_thumb/";
  15. Simple test (tell us what happens)... $src = ($target.$name.".jpg"); echo $src; ?> <img src="<?php echo $src; ?>"> <?php
  16. the type you are using is fine. the real question is, how do you want the value displayed on the web page?
  17. http://davidwalsh.name/return-random-records-mysql
  18. show us the code where are you creating the $result[] array
  19. Perhaps my eyes are bleary, but where are you connecting to the database?
  20. this may help ... http://www.phpfreaks.com/forums/index.php?topic=95426.0
  21. rough way to list them all... $query = "SELECT `Schedule`, `EMMA`, `Aircraft` FROM `Aircraft_Daily_Status` "; $result = mysql_query($query); echo "<table>"; while($row = mysql_fetch_array($result)) { ?> <tr><td><?php echo $row['Aircraft']; ?></td><td id="cell2display"><?php echo $row['Schedule']; ?></td><td id="cell3display"><?php echo $row['EMMA']; ?></td></tr> <?php } echo "</table>";
×
×
  • 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.