Jump to content

ginerjm

Members
  • Posts

    6,906
  • Joined

  • Last visited

  • Days Won

    99

Everything posted by ginerjm

  1. What do YOU mean by thumbnail? Is this data in the form of an image?
  2. This last chunk of dis-associated code does not make sense. The quoting alone is a big problem. Can you provide a LITTLE more code from above and below this? AND please post it with the proper tags for this site.
  3. If you know where the problem is how about only posting the relevant portion? I know I'm not going to pore over 200+ lines of code for you.
  4. Sounds like you are where you want to be. The hover and accompanying text display as well as the click to a larger image are a POC - with JavaScript. Please tell me that you didn't store any images in your db. Not recommended at all.
  5. 1 - nxt time use proper tags to post code snippets here. 2 - your guess at grabbing the 'basic' input s/b: if (!empty($_POST['basic']) $basic = $_POST['basic']; Required or not, you should be grabbing all the field inputs, sanitizing them and validating them before using them.
  6. Two things. 1 - your call to mail() is invalid. Missing the required header arg. 2 - To send an html email you have to have headers indicating such.
  7. Are you sure your own mail provider hasn't got it blacklisted?
  8. Put this code in the header section of your html. <style type='text/css'> .color1 { color:red;} .color2 { color:yellow;} .color3 { color:green;} </style> Then do this to generate your display Note the lack of a font tag since that is SO old and deprecated. $val = intval(100 * $row['win'] / $row['played']); if ($val < 40) $cls = 'color1'; elseif($val > 60) $cls = 'color3'; else $cls = 'color2'; $val = $val."%"; echo "<td align='center class='$cls'><b>$val</b></td>"; Note change from single to double quotes on outer pair.
  9. I was being facetious since I don't think you can. (But I could be wrong.) If I were doing it I would capture the comment from the file upload page and then store the image in my images folder and at the same time save the comment in a table under the image's saved name, obviously checking the table before both actions to ensure that I don't have a dupe image name. I would also store some other pertinent data in the table too, such as date added, contributor(?) name or id, dimensions (w/h), and maybe a keyword or two to provide some rudimentary search capabilities. Then my display page (that we just worked on) would use a query instead of a glob to get the image names (and comments) and then build the page.
  10. So - now you can teach me something. How do you get a comment out of an image file?
  11. A comment tag in the file? The image file?
  12. Normally I don't provide such help to someone who doesn't apparently have a clue, but here goes: <?php echo "<html><body>"; echo "<center><h1>Family Photos</h1></center>"; $dirname = "img/"; $images = glob($dirname."*.png"); foreach($images as $img) { $img_cap = "???"; echo "<div><img src='$img'><br>$img_cap</div>"; } ?> Where are you going to get the captions for each image as you cycle thru them?
  13. That echo will only occur if there is an error which should interrupt your script. I would add an exit() line to that connect file since I wouldn't want to continue with my script if my connection was not available.
  14. What do you think? I though my post was pretty direct, as in: " That includes even a single space character or blank line.".
  15. You must ensure that you are not outputting anything prior to your header call. That includes even a single space character or blank line. That is what the messages are telling you.
  16. Yes - what is the error message?
  17. Wrap each image and text in a div tag. <div> <center> <img><br> This is my caption </div>
  18. Let's try this again. Please show us lines 1-20 and point out the line that is giving you the error.
  19. You only have one query running here and you are NOT checking the result of it. // figure out the total pages in the database $result = mysql_query("SELECT * FROM albums ORDER BY album_id"); //***** CHECK QUERY RESULTS !!!!!!! $total_results = mysql_num_rows($result); $total_pages = ceil($total_results / $per_page); You are also doing two things wrong with your data retrieval 1 - you are not retrieving a row 2 - you are using a horribly wasteful function to get the columns. Look up MySQL_fetch_assoc in the manual and stop getting your data field by field. MySQL_result is perfect if you are only seeking one piece of data, but if you want the entire row (as you do here), you should get the whole row at one time.
  20. Nice explanation, but you still aren't showing the code.....
  21. I see nothing in this code snippet that would cause a second transmission of your mail message. I do however see at least one php syntax error which if you turned on error checking would be revealed to you. ini_set('display_errors', '1'); ini_set('log_errors','1'); // turn this off once done with development.
  22. Your problem is that you didn't check for an error in your query. ALWAYS ALWAYS ALWAYS check the result of a function call before assuming that you have something to continue on with.
×
×
  • 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.