May 22, 201313 yr I'm going round in so many circles I'm feeling dizzy! I'm wanting to build a website for a friend, using techniques that I have never used before - so I figured this will be a good opportunity to learn as I go along! The end product will (hopefully) be a website with a location map, where you can click on an area, and it will list all the businesses and their details for that particular area. he will be wanting to add and remove businesses on a fairly regular basis and as there is currently around 200 businesses listed - I figured this will be a real pain creating a separate pages for each listing and have decided this will be a good opportunity to delve into creating my first dynamic/database driven website. I've spent a few days hunting around the net for books and videos etc on how to get started, but there's so much I don't know where to start! What I have is - a decent understanding of Dreamweaver, a web host with MYSQL databases and phpmyadmin, and an eagerness to learn. Can anyone tell me where i should start and what I should be using to achieve this? I'd like to continue using dreamweaver as I own my own copy. Unless I should start learning something new such as Wordpress if this can do the job easier? I would be extremely grateful of any help no matter how big or small ps. I have been given a crude diagram explaining what I am supposed to achieve.
May 22, 201313 yr Try to get familiar with the MySql language first. When i started out with PHP i first tried to figure out how to communicate with the Database. I suggest going to http://w3schools.com and go through all the PHP subject that there are. Try to do what they do, and write down your explanation of what you just did. (One does only really understand when you can explain it in plain language.) When you get this down, it'll already be a lot easier realising what is needed to achieve what you are trying to do.
May 22, 201313 yr What you are trying to do is using a form to input/store data into a database. Firstly as the above post states you must understand and be able to write SQL. Knowing SQL will allow you to create tables and run queries on the tables to return results. More specifically if you want to jump in head over heels I would recommend you check out the following page: Won't let me insert links yet, I will private message you the link. You should also install a local server on your system such as XAMPP or WAMP, so that you can play around with the code and view the results instantly. These servers come with MYSQL and Phpmyadmin. Good luck! Edited May 22, 201313 yr by Bogner
June 5, 201313 yr Author Hi Bogner, sorry for the insanely late reply.... been on my hols. thanks for your response! Can you tell me if I have the basic concepts correct.... 1. I can use phpmyadmin on my web host to create a database. 2. I then have a web page with a button that pulls data from the database stored on my host. for example, a button/link to "display all business's in London". this button has some code (php?) that interrogates the database for all records that match a 'London' field and then display them in a table or div on the page? 3. therefore, if I add more 'London' based business to the database.... the next time I press this 'London' button - more businesses will be listed or is that completely wrong lol??? sorry if that was a very shabby way to explain... I'm very very tired. Cheers Neil Edited June 5, 201313 yr by mx5er
June 16, 201313 yr I have just come across you post while looking for something on this part of the forum. I don't know if you have found the answer yet as I see you last reply was posted a couple of weeks ago. You are correct in saying that the database side of things such as adding new database, adding tables and adding fields in all done under the hood via phpmyadmin. When building a database driven website you need to connect to the database via PHP every time you would like to interact with the database. When filtering results you integrate SQL queries within the PHP code. All this works together with HTML for the layout and CSS for the presentation. If you require form validation then a bit of JavaScript would be useful also. Its been a long while since I built my last PHP & MySQL application so I am a bit rusty but if you have any questions I have a tonne of books which I still refer to as I did PHP at University along with Databases so I am pretty competent with all the tricky bits.
June 18, 201313 yr I suggest going to http://w3schools.com and go through all the PHP subject that there are. Try to do what they do And, mx5er, I suggest you ignore this piece of advice and head over to http://www.w3fools.com
June 18, 201313 yr Author Hi Chris, thanks for the response - it all helps! No, I haven't had chance to get stuck into this yet due to other work commitments. Sorry if my explanation is very crude, so - phpmyadmin is where I would create my database (a bit like access). I then structure my pages with html and css, and I use pieces of php coding to interrogate my database and display the content in my divs? I can run a xampp to create test server and run phpmyadmin and enter my database offline, right? and then upload it? Cheers mate Neil
June 18, 201313 yr Author And, mx5er, I suggest you ignore this piece of advice and head over to http://www.w3fools.com Thanks for that - i'll check it out! Cheers Neil
June 18, 201313 yr And, mx5er, I suggest you ignore this piece of advice and head over to http://www.w3fools.com Don't mean to sound rude but I don't agree with this. When I was learning PHP a developer who taught me was using w3schools as references and it was really simple to understand. The reason why I like it is because it just teaches you how everything works. If you buy a book like Build Your Own Database Driven Web Site Using PHP & MySQL you won't learn because all you'll be doing is copying what the book says and not understanding what's doing what. By going through all the stages like, I need to get my code to read from the database and then I need to be able use the update function to edit it if need be and for this reason w3schools is great. I agree with you that for certain things it isn't great but for learning PHP core functions, I don't think there's anything wrong with it.
June 18, 201313 yr Don't mean to sound rude but I don't agree with this. When I was learning PHP a developer who taught me was using w3schools as references and it was really simple to understand. The reason why I like it is because it just teaches you how everything works. If you buy a book like Build Your Own Database Driven Web Site Using PHP & MySQL you won't learn because all you'll be doing is copying what the book says and not understanding what's doing what. By going through all the stages like, I need to get my code to read from the database and then I need to be able use the update function to edit it if need be and for this reason w3schools is great. I agree with you that for certain things it isn't great but for learning PHP core functions, I don't think there's anything wrong with it. Mmm do u know how I learned? I copied the code from a book to build a forum and now im fluent In PHP/MYSQL
June 18, 201313 yr Don't mean to sound rude but I don't agree with this. When I was learning PHP a developer who taught me was using w3schools as references and it was really simple to understand. The reason why I like it is because it just teaches you how everything works. If you buy a book like Build Your Own Database Driven Web Site Using PHP & MySQL you won't learn because all you'll be doing is copying what the book says and not understanding what's doing what. By going through all the stages like, I need to get my code to read from the database and then I need to be able use the update function to edit it if need be and for this reason w3schools is great. I agree with you that for certain things it isn't great but for learning PHP core functions, I don't think there's anything wrong with it. You talk like you don't get that I am too, a PHP developer. I'm completely self-taught; taught by reading books like 'Build Your Own Database Driven Website Using PHP & MySQL vol. 2' by Jim-bob Bobbins, by reading through the PHP website/manuals, by asking questions and looking at answers. And most of all, by practise and lots of it. I can only assume you've never read a book for learning PHP development? Did even you look at the W3Fools website? It states exactly why people should avoid W3Schools, but if you want to practise bad code then feel free too. I'll just never recommend anyone to use it. And if anyone wants to learn how to use PHP's core functions, their first port-of-call should always be http://php.net - which will always be my recommendation.
June 18, 201313 yr Author Just an off topic side note - you're a smoggie as well then Ampersandwich? lol
June 19, 201313 yr mx5er, you got the idea, definitely build on a test server on a local machine, as this is the quickest way to test your code with xampp you can set up the database. I find that when you have tried and tested your code you can simply export the database in phpmyadmin on your local machine then import the database to your host which you will normally only get one database on the lower packages. You will probably create a connect.php which will be called every time you want to connect to the database so once you have uploaded your php files you just change the details in connect.php to the details of the database on your host.
Create an account or sign in to comment