Jump to content

thomashw

Members
  • Posts

    244
  • Joined

  • Last visited

    Never

Everything posted by thomashw

  1. Can someone explain to me exactly what this is saying? if ($counter%3==0&&$counter!=0)
  2. Question - to add to the above script (the latest one by Ken2k7) how could I add two rows under each image (for text)? The rows would be like this: IMAGE IMAGE IMAGE text text text text text text IMAGE IMAGE IMAGE text text text text text text It's currently: IMAGE IMAGE IMAGE IMAGE IMAGE IMAGE The text is held in the database the same as the image's are - just under a different field name. Thanks!
  3. I think that's why it's more difficult - you need to actually think and be clever as there are multiple ways to do things. With HTML and such, the way to do things is usually quite obvious.
  4. Yep, works as well. Thanks! Learning PHP is difficult.
  5. I had to change $row_amount==4, but that worked. Thank you!
  6. Try using: <? $file = 'xxx' $newfile = 'xxx' copy($file, $newfile); $file is the source. $newfile is the destination.
  7. Thanks, that works quite well. I'm trying to get it so when there is more than three items in the database, it will start a new row. I've edited your script to look like this, but it's not working properly. It inserts ""<tr><td><img src='{$row['image']}' /></td></tr>" as the image URL and on the page. $result = mysql_query('SELECT image FROM specials') or die(mysql_error()); echo "<table>"; if ($result || (mysql_num_rows($result) > 0)){ while ($row = mysql_fetch_assoc($result)) $max_columns = 3; { echo "<tr><td><img src='{$row['image']}' /></td></tr>"; if(++$i == $max_columns){ echo "<tr><td><img src='{$row['image']}' /></td></tr>"; $i=0; }}} echo "</table>"; ?> Any ideas?
  8. Actually both are just placing the same image beside eachother but now in a different format.
  9. Add this code between your <head></head>. It specifies where your "include" folder is. <? ini_set("include_path","/www/include"); ?>
  10. It currently looks like the top, but I want it to look like the bottom. Thanks!
  11. I'm attempting to make a table with one row and 3 columns (holding three different pictures in all.) I want each picture URL to be called from my database. When I use the following code, it places the same picture across the three columns and does this three times (creating three rows.) I want a different picture to be placed across the three columns and to have only one row. What can I do? Here is the code: $result = @mysql_query('SELECT image FROM specials'); $num=mysql_numrows($result); $i = 0; while ($i < $num) { $image=mysql_result($result,$i,"image"); ?> <table> <tr> <td> <img src="<? echo "$image"; ?>"> </td> <td> <img src="<? echo "$image"; ?>"> </td> <td> <img src="<? echo "$image"; ?>"> </td> </tr> <? $i++; } echo "</table>"; ?> Thanks!
  12. I used a weblog analyzer, and it says index.php, no referrer. It also says favicon.ico error. What does this mean?
  13. I'm trying to use index.php in my www directory. I tested the index.php in a subdirectory such as www/blahblah and it worked perfectly. When the file is moved to the www directory it gives me the 500 Internal Server Error. What can I do to fix this?
×
×
  • 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.