jamesonnow
08-31-2006, 09:36 PM
I got this script and a lot of things seemed to be a little mixed up and being that i dont know much on PHP i wasnt able to fix it so I figured I would put this out there and see if I could get some help from people who know what they are doing. Basically what i need the page to do is generate a table of all the images in a folder, as well as next to each image a text field, with html code on how to link to the specific image. Something like <A HREF="http://www.sitename.com/gallery/image1.jpg> </A>. Would like to set the amount of images that show up on one page and and have several pages if necessary. Have tried to figure it out and couldnt get it working, and frankly I may have messed it up further.
This is what I have (kinda incomplete), Any positive advice would be appreciated. Thank you
if($_GET['pg'])
{
$path = $sm['path_base'] . 'graphics/' . $_GET['pg'];
echo "<table width="100%" align="center">
<tr>
<td style="padding-right: 10px;"><div class="text"><div align="center">Just copy and paste the code where you would like the picture to be!<br></div>
<br>";
echo " <table border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td style="padding-right: 10px;" class="too"><a href="" . $sm['url_base'] . "graphics/" . $_GET['pg'] . "/$file" target="_blank"><img src="" . $sm['url_base'] . "graphics/" . $_GET['pg'] . "/$file" width="150" height="150" border="1" style="border-color: 000000;"></a><br><div align="center"><a href="" . $sm['url_base'] . "/graphics/" . $_GET['pg'] . "/$file"></a></div></td>
<td class="too" valign="top"><div style="padding-bottom: 5px;"></div>
<textarea name="textarea" cols=23 rows=8 class="bginput" onClick="this.focus();this.select()"><a href="" . $sm['url_base'] . "" ><img src="" . $sm['url_base'] . "graphics/" . $_GET['pg'] . "/$file" border="0"></a>
</table>
<br/>
<br>";
}
echo "
</td>
</tr>
</table>";
}
Is it possible to get it working without having to call information from a database, or basically what would be the most efficient way of doing this.
Lastly can anyone recommend any good PHP books that I could read up on. Thank you
This is what I have (kinda incomplete), Any positive advice would be appreciated. Thank you
if($_GET['pg'])
{
$path = $sm['path_base'] . 'graphics/' . $_GET['pg'];
echo "<table width="100%" align="center">
<tr>
<td style="padding-right: 10px;"><div class="text"><div align="center">Just copy and paste the code where you would like the picture to be!<br></div>
<br>";
echo " <table border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td style="padding-right: 10px;" class="too"><a href="" . $sm['url_base'] . "graphics/" . $_GET['pg'] . "/$file" target="_blank"><img src="" . $sm['url_base'] . "graphics/" . $_GET['pg'] . "/$file" width="150" height="150" border="1" style="border-color: 000000;"></a><br><div align="center"><a href="" . $sm['url_base'] . "/graphics/" . $_GET['pg'] . "/$file"></a></div></td>
<td class="too" valign="top"><div style="padding-bottom: 5px;"></div>
<textarea name="textarea" cols=23 rows=8 class="bginput" onClick="this.focus();this.select()"><a href="" . $sm['url_base'] . "" ><img src="" . $sm['url_base'] . "graphics/" . $_GET['pg'] . "/$file" border="0"></a>
</table>
<br/>
<br>";
}
echo "
</td>
</tr>
</table>";
}
Is it possible to get it working without having to call information from a database, or basically what would be the most efficient way of doing this.
Lastly can anyone recommend any good PHP books that I could read up on. Thank you