Help
Search
Login
Register
Home
Forum: web design and graphics community
Celestial Star Forum
>
Web Development
>
Coding
>
PHP page technique?
Pages: [
1
]
« previous
next »
Print
Author
Topic: PHP page technique? (Read 574 times)
Ashley425
Incubus
Posts: 66
PHP page technique?
«
on:
September 14, 2006, 10:25:45 PM »
Hello! I need help with a certain PHP code. I have knowledge in PHP, but I can't figure out how to do this. It is where you create a database and when you click on a peice of art, the database will lead you to a page instead of just the image file (.gif, .jpg, etc)
Another example is when clicking on a wallpaper in a database it will lead to a page offering its resolutions and information.
I don't want these to just be .htm pages since if I change layouts, I dont want to have to change every art page..Does anyone understand this and can help? x__x;
Good examples of this technique:
http://www.banime.com/wallpapers/Ah-My-Goddess/
http://inobscuro.com/gallery/
If anyone could help, I'd really appreciate it! Thanks!
Logged
url=http://production-symphonia.com/]Production-Symphonia.com[/url]
Blackstone
Administrator
Valkyrie Randgris
Posts: 821
Oh look! People!
PHP page technique?
«
Reply #1 on:
September 15, 2006, 12:02:39 PM »
Okay, I believe I can help you out. It's a rather simple technique once you get the basics of it down, but it might be a bit confusing to start out with.
Let's say that you have a page that uses a database to display all of your pictures. Each of those pictures, when clicked on, leads to a page that has that picture as well as extra information on it. I believe this is what you want?
When you display those pictures on that first page, link them to something like this: details.php?id=##
Where details is the second page I was talking about and ## is the ID of the picture. I'm assuming you're not using any kind of dynamic inclusion or mod_rewrite, but if you are then I'm sure you'll know how to adjust it.
That is about all that you need to do on the first page, the second page is the one that does most of the work.
You'll need to get the ID of the picture, a simple matter.
Code:
$ID = $_REQUEST['id'];
Put that at the top of the second PHP page, or as close to the top as you think necessary. Next you can call to your database to get information on that specific picture using that ID. All that you have to do then is display the information.
Is that what you were asking about? And if so, then did that make sense?
Logged
Ashley425
Incubus
Posts: 66
PHP page technique?
«
Reply #2 on:
September 15, 2006, 06:33:21 PM »
Yes, that is what I want! So I added details.php?id=## to my first database pages links. Am I supposed to change ## to something? o__o
When I then click on a image it leads me to all the images instead of one at a time XD I know I'm missing something.. x__x
/EDIT: bleh, Im sort of running low on time, so I've decided not to do this..Sorry D:
Logged
url=http://production-symphonia.com/]Production-Symphonia.com[/url]
Blackstone
Administrator
Valkyrie Randgris
Posts: 821
Oh look! People!
PHP page technique?
«
Reply #3 on:
September 15, 2006, 11:06:17 PM »
Okay, that's fine. ^^ Just let me know if you ever wanted to try it again, and I'd be glad to help out!
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General
=> New Members
=> Announcements
=> Support / Suggestions
-----------------------------
Contests
-----------------------------
=> Archive
===> Contests
===> Blend Challenges
===> SOTW
-----------------------------
Art Boards
-----------------------------
=> Creative mediums
=> Requests & offers
=> Tutorials
===> Celestial Star Tutorials
-----------------------------
Web Development
-----------------------------
=> Coding
=> Web Design
=> Advertisements / Affiliation
-----------------------------
Off-topic
-----------------------------
=> Entertainment
-----------------------------
Español (Spanish Only)
-----------------------------
=> General / Bienvenida
=> Anuncios / Ayuda
=> Código / Desarrollo web
Welcome,
Guest
Members login
Register for free
General
General
New members
Announcements
Support / Suggestions
Art boards
Creative mediums
Requests and offers
Tutorials
Celestial Star tutorials
Web development
Coding
Web design
Advertisements / affiliation
Off-topic
The non-sense
Ententainment
Loading...