Jump to content

Is This Possible In Php?


Tandino
 Share

Recommended Posts

I am doing personal research for my family's website about how to better streamline content and make browsing more user-friendly.Here is the situation, thanks in advance for reading!For our room-renting site, the page with the master list of available apartments is one long html file with 40+ divs showing a summary of each room (price, features, a few small pictures). As you can imagine this is a very long html file. The thing that makes it complicated is that when an old room is removed or a new room added I have to change it twice, once in the master list then again in the individual page for that room. It is possible in PHP to program a script that will insert a small html file into the document for each file in a directory? (Similar to how a blog puts one post after another pulling from each file in an archive.) I have read a little about ajax and asp, but haven't read into the details yet. I'd like some suggestions for a direction to follow. Long term goals would be to implement a system where the user could check boxes specifying limits on the rooms displayed, then seeing the available choices change without reloading the page...for example:show only rooms priced between... $50-100, $100-150show rooms with... 2 bedrooms, 3 bedrooms.show rooms in... village 1, village 2, village 3can I do this with php? or does my project require a different kind of server scripting/database?Any help is appreciated, thank you!

Link to comment
Share on other sites

That all sounds like the perfect job for PHP and a database system like MySQL. The two together make the job of creating dynamic database-driven catalogues very simple. You can also use AJAX to refine searches based on user input without a page refresh, but you can also use JavaScript DOM methods to order data once it's loaded and forget making any more server side calls. For that I can't recommend jQuery highly enough - it makes DOM manipulation a lot easier than regular JavaScript. It's a tall order learning all that at once, though. Start with the PHP if you're comfortable with the HTML part already, but it shouldn't take long before you see how to do what you want regarding managing the list of available rooms, etc.

Link to comment
Share on other sites

The best way to start is id what chibineku.I really recommend you to learn the basics of:-php-Mysql-Javascript and CSS-DOM and AJAX-Php is used to make your website dynamical-In combination with php you can use mysql to store data in a database-Javascript allows the development of enhanced user interfaces and makes your website more dynamic.-AJAX is actually a javascript class witch allows you to send data to the server without reloading the page. So in this case, you can send a request using AJAX/javascript to your php code witch in his turn stores (for example) data in a database.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...