thompag Posted February 20, 2015 Share Posted February 20, 2015 My website is currently undergoing construction. I am revising the entire site. I own a modeling agency and it consist of hundreds of models and each model has their own portfolio webpage. 80% of the webpages have the same layout (logo, disclosures etc...) the only thing that differs from all of these pages are the photos of the models and the model's names. How can I use just one webpage (as a template) and only change the photos of the models and names to minimize the webpages to my site? This will save me time because I really don't want to revise over 100 webpages for each model page. I know php is the way to go but I don't know where to start. Should I have a database of model photos? Also how would I tie the name and the description of the model to the each photo using php. If someone could give me an example using php code and description as to what I need to do to accomplish this task it would be greatly appreciated. I am currently learning php but I'm not by any means experienced. I spoke with several IT specialist and they all say it's fairly easy to accomplish this but I haven't gotten any information yet as to how to get it completed. Quote Link to comment https://forums.phpfreaks.com/topic/294752-how-to-change-image-and-title-using-php/ Share on other sites More sharing options...
Psycho Posted February 20, 2015 Share Posted February 20, 2015 You are asking us to basically instruct you in how to build a PHP/MySQL website. There is way too much to try and disseminate and we have no idea what your current level of knowledge is (seems to be you may understand HTML some, but not much else?). There is no preexisting code to show you as each application is unique. Plus, there are several different technologies involved. It sounds as a fairly simple project though. Someone may be willing to pick this up as a freelance job for not a lot of money and you could make it part of the deal that they provide instruction on the code so you can learn it as well. Otherwise, you will need to learn how to do each skill needed. HTML, CSS, JavaScript, PHP, MySQL, file management, etc., etc. None of these are extremely hard, but you can't learn them overnight (or through a forum post). If security is of any concern, you definitely don't want to do this yourself the first time out. Having said all that here is a very brief explanation of how I think it would be accomplished: 1. Determine he database structure, At a minimum, you would want two tables. One table would hod the information about the models: name, age, height, etc. It would also include a unique database ID field for each model. The second table would be for the images. There would be one record for each image (file path) with an association back to the model record. You *may* have a need to have a primary image that always shows at the top, that would just need a separate column in that table. 2. Once you have the database, you can populate it manually with just a handful of records. Then, create a PHP page to display the data for a model. It will require that the ID be passed on the query string mysite.com/show_model?id=5. That page will get the model ID when the page is accessed, query the database for the model information and the images, then build the HTML page. you would probably want a page to list models (with links to the page to display the model details). And, you may also need another page to search for models. 3. Once you have the above working with the manually entered data, you would want o build pages to add/update/delete models and images associated with models. But, the first two will take you quite a while to complete if you are learning. So, I'm not going to go into details here. I think you need to pull out a sheet of paper and write out what the workflow will be (i.e. what page do you need other than what is above or are those applicable). Then you will have an understanding of the scope of the work. You can also use that to get an estimate if needed. Quote Link to comment https://forums.phpfreaks.com/topic/294752-how-to-change-image-and-title-using-php/#findComment-1506272 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.