nloding Posted July 9, 2006 Share Posted July 9, 2006 Alright, so I am completely new at programming in PHP. I've done tons of CSS and HTML before, and a tiny bit of a Javascript. Now I want to start building larger sites based off databases, and need some help with PHP. This should be relatively easy (I hope!)Basically, here's what I want to setup: a database that has, say, an image and a dateline, and I want a single PHP file to bring it up and display it via urldecode() ...http://domain.com/images.php?title=amazonimages.php would be one page, and then you click a picture, and it reloads the page, showing the picture and it's description.This is popular everywhere. I downloaded some open source code to programs like Joomla, Typo3, Phorum, and others, and I can't find a clean example I can completely comprehend.Is there a tutorial out there about this? Where would I begin in designing this site (assuming the database is complete)? Are there any clean examples out there that I can study?THANKS!Great information on this site -- I'll be spending a lot of time here as I learn more and more PHP ...--Nathan Quote Link to comment https://forums.phpfreaks.com/topic/14069-uses-of-urlencode-and-urldecode/ Share on other sites More sharing options...
nloding Posted July 9, 2006 Author Share Posted July 9, 2006 As an addition, I mean this as something a search engine, rather than displaying a completely new page. The idea is that the page has a set layout, and certain parts, such as the img url, are filled in from the accessed mySQL database. I'm looking for an example of that. Quote Link to comment https://forums.phpfreaks.com/topic/14069-uses-of-urlencode-and-urldecode/#findComment-55004 Share on other sites More sharing options...
redarrow Posted July 9, 2006 Share Posted July 9, 2006 i think what your asking is a ajax enstention of javascipt.if you wanted to do this with php then your have a picture with a link going to another page showing that picture and the information.but to have a picture to be pressed then the information displayed auomatickly on the same page your have to use ajax ok.good luck. Quote Link to comment https://forums.phpfreaks.com/topic/14069-uses-of-urlencode-and-urldecode/#findComment-55080 Share on other sites More sharing options...
ShogunWarrior Posted July 9, 2006 Share Posted July 9, 2006 First off, presuming you don't know, urlencode and urldecode only convert unsafe characters to safe ones for building a URL, they don't do any file transfers etc.So, if the image's name was [b]WickedImg//Deadly\\[/b] then when you put it on the end of a URL, the browser might think that it's a folder etc., so you should do this:[code]$url = 'http://domain.com/images.php?img='.urlencode($imgName);[/code]Onwards, if you don't need it to update on the same page then it shouldn't be too hard.I can give more help if you know exactly what you want. Quote Link to comment https://forums.phpfreaks.com/topic/14069-uses-of-urlencode-and-urldecode/#findComment-55114 Share on other sites More sharing options...
nloding Posted July 10, 2006 Author Share Posted July 10, 2006 I'm pretty sure AJAX isn't what I need for this, but then again, I don't know. Here's the exact use, and what I want to do:I'm building a database of movies, that will have several parts to it (i.e., director, actors, rating, plot, etc.). What I want to create is a single php document, movies.php let's say, that calls up each individual movie in the database. So say I put up a list of new releases for this week, the person would go to my site, and click "New Releases" -- that would take them to movies.php, which will list the titles for that week. That someone clicks on Basic Instinct 2 ...http://domain.com/movies.php?title=basic_instinct_2The page reloads, and presents the information pulled from the database (director, actors, whatever).I assume this is done using PHP to retreive information from a MySQL database, and not done with AJAX. The other thing I thought about doing was using XML -- each movie would have it's own XML document, and then presenting it. Is there a better way of doing things?Eventually, there may be hundreds of movies in the database -- for now, there will be less than 50. Any thoughts?--Nathan Quote Link to comment https://forums.phpfreaks.com/topic/14069-uses-of-urlencode-and-urldecode/#findComment-55820 Share on other sites More sharing options...
ShogunWarrior Posted July 10, 2006 Share Posted July 10, 2006 It seems obvious to me to use a MySQL database for this, XML/AJAX etc. aren't needed. Quote Link to comment https://forums.phpfreaks.com/topic/14069-uses-of-urlencode-and-urldecode/#findComment-55835 Share on other sites More sharing options...
nloding Posted July 10, 2006 Author Share Posted July 10, 2006 I'm very new to MySQL and PHP ... are there any decent examples of something like this out there that I could study? Quote Link to comment https://forums.phpfreaks.com/topic/14069-uses-of-urlencode-and-urldecode/#findComment-55884 Share on other sites More sharing options...
GingerRobot Posted July 10, 2006 Share Posted July 10, 2006 It might be easier to try some basic tutorials first on this site to get to grips with php even if they're not really related to what you are trying to do. Many of the basic concepts will apply and you will find it much easier to think about going about your task with some basic knowledge Quote Link to comment https://forums.phpfreaks.com/topic/14069-uses-of-urlencode-and-urldecode/#findComment-55886 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.