|
|||||||
| PHP Discussion and technical support for using and deploying PHP based websites. |
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Auto create new page?
Hi,
I'm quite new at php and I'm trying to create a script that will save me a lot of time when creating my website. I'm gonna try to explain what I'm looking for by taking a simple example. I have a page 'Portfolio'. On this page I have thumbnails of my work. 'OnMouseOver' will have the bigger version of the image appear on the screen (no need for a click). The images are named 1001, 1002, 1003, etc. The thumbs are named 1001_th, 1002_th, etc. When I click on one of the thumbnails, I want the page "Details" to open, on which only the picture and the description is different for every project. The rest of the content will be the same every time. What I am trying to do is avoid having to create a page "Details" for each one of my projects (up to 100 and growing). I figure there must be a simple solution to 'take' the number of the picture and put it in a standard "Details" page. Any help on this will be much appreciated! Thanks, M. |
|
#2
|
|||
|
|||
|
So the idea is that each image & description would be wrapped in between the specified header and footer onclick :/ I havent tested it but it uses a combination of javascript, php and xhtml If its not what your looking for apologies i tried ^_^
Code:
<a href="{file_row.file_col.FILEURL}" onclick="window.open('http://domain.com/index.php','_self');"><img id="" name="" src="{file_row.file_col.TBFILEURL}" style="" border="0" height="" width="" /></a>
Code:
<?
include_once("header.php");
image and description
include_once ("footer.php");
?>
|
|
#3
|
||||
|
||||
|
^ I have no idea what you did there..... this can all be done by php....
And, if you've already included you're header/footer you're going to drop an error..... Which is what it looks like you're trying to do for each image? PHP Code:
Last edited by ehime; 02-09-2010 at 11:17 AM. |
|
#4
|
|||
|
|||
|
lol I should have your sig
I wish I had 1/3 of the talent I cant program for squat
|
|
#5
|
||||
|
||||
|
PHP Code:
get back to work. Last edited by ehime; 02-09-2010 at 11:42 AM. |
|
#6
|
|||
|
|||
|
Thanks guys for your time, I'll try with the above and see where it gets me...
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|