Jump to content

richardk1

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Everything posted by richardk1

  1. Thank you for your help, I appreciate it. Unfortunately, it didn't work. Here's what I have so far: <? if (@mysql_num_rows($pres)) { $i = 0; ?> <?php $var = strstr($link, 'http://') elseif ($var) { ?> <img src="<?php echo "{$row[picfile]}"; ?>" id="adimg<?php echo $i; ?>" width="<?php echo $imgsize[0]; ?>" height="<?php echo $imgsize[1]; ?>" alt="<?php echo $ad['adtitle']; ?>"> <?php } elseif { ?> <table class="adpics" width="100%"><tr><td> <? while ($row = mysql_fetch_array($pres)) { $i++; $imgsize = GetThumbnailSize("{$datadir[adpics]}/{$row[picfile]}", $images_max_width, $images_max_height); ?> <img src="<?php echo "{$datadir[adpics]}/{$row[picfile]}"; ?>" id="adimg<?php echo $i; ?>" width="<?php echo $imgsize[0]; ?>" height="<?php echo $imgsize[1]; ?>" alt="<?php echo $ad['adtitle']; ?>"><br><br> <?php } ?> </td></tr></table> <?php $imgcnt = $i; } ?> Any ideas? Thanks again.
  2. Hi there, I need to make an if/else statement and I'm stumped. Here's what I want the code to do: If what's in my row starts with "http://" then use a certain code. Else, use a another code. Kind of like this: Code: <? if (CODE TO USE IF THIS ROW CONTAINS "HTTP://") then display this: <img src="<?php echo "{$row[picfile]}"; ?>"> else: <?php if (@mysql_num_rows($pres)) { $i = 0; ?> <table class="adpics" width="100%"><tr><td> <?php while ($row = mysql_fetch_array($pres)) { $i++; $imgsize = GetThumbnailSize("{$datadir[adpics]}/{$row[picfile]}", $images_max_width, $images_max_height); ?> <img src="<?php echo "{$datadir[adpics]}/{$row[picfile]}"; ?>"> <?php } ?> </td></tr></table> <?php $imgcnt = $i; } ?> As you can see, the only difference really is this code here: <img src="<?php echo "{$datadir[adpics]}/{$row[picfile]}"; ?>"> I just need the the code for the if statement. What's in the else is fine Any help would be appreciated. Thank you.
×
×
  • 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.