September 16, 200817 yr I`m starting a new website, and already have some knowledge of html and css. I also know some php-coding, but not much. Anyway, I thought I would make an image-gallery and guestbook in php for my site. How is that done? So I include php-code in the photogallery.html file, or do I have to make a photogallery.php file and do all the coding (html,css,php) in there?
September 16, 200817 yr Well, I think you should have a look at w3schools and read through there PHP content. Firstly, You need PHP installed on your server. You have to have he file name extension .php (but if you want its possible to execute php code in a html file with changing settings). Do you want to store all your gallery information in a database? If so you can just use PHP to spit out the information such as img src and alt tags etc. Then for navigation what do you want? Do you want arrows pointing left and right? or have the user click on image names or even thumbnails? they all seem very different but the code is very similar. What I think would make it look really ace, is if you use AJAX and have no page changes when the user clicks on the images... Does this answer your question lol.... But I still say start with w3schools...
September 21, 200817 yr To be honest, you should start with the guestbook before the image gallery. Alot easier and alot less to it. All you need to do is create a HTML form and use PHP to send the information to the database. Then use PHP to retrieve all the info. It may seem hard now, but you will start to understand how to do it. I recommend w3schools as well.
September 24, 200817 yr I agree start small. Learn how php interacts with the database, learn how to use databases and then some basic user stuff (like guestbook). Don't store images in a database, should really ftp them.
September 25, 200817 yr Everyone should start with with the 'hello world' tutorial :-) create a file called hello.php add this line <?php echo 'hello world' ?> to the file and save it upload it to a server web folder that supports php open your web browser and type in the URL even a simple example contains a lot of jargon already (editor, server, web folder, etc...) I agree start small. Learn how php interacts with the database, learn how to use databases and then some basic user stuff (like guestbook). Don't store images in a database, should really ftp them.
Create an account or sign in to comment