Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Aug 2013
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Build a website, use scripting to update form

    Hi everyone,

    I am essentially still learning the basics about web design, and programming. I am currently working on a project. The objective of the project is to set up a website that allows me to update books according to whether they have been read and also according to whether they are planned to be read. The site should contain information concerning the book such as its title, its author, its published date, and its publisher information.

    So far, I have only come up with the basic layout of the web pages. I have created a form, that allows me to enter all the above information concerning each book. But this is all I have been able to achieve so far.
    I would really appreciate it if someone were able to help me figure out how to achieve this objective.

    My understanding is that, I am going to have to use a scripting of some sort, whether server-side or client-side, although I would prefer client-side scripting, which is quite simpler. Also, I might have to create a database, to hold all the books' information. So, let me see how this is going to work out, and please let me know if I am right. I need to:

    - Design the basic layout of the website
    - Register a domain name and find a hosting server.
    - Create a database I am going to need in order to update all the user information.
    - Write scripting in Html code in order to modify the web page output according to user form information.

    My main question is: How do I connect my database to my scripting and then, to my webpage?
    Also, what scripting languages should I use: PhP (for server-side) or maybe Javascript (for client-side)?
    I am probably also going to need to use MySQL for the database.

    I am really confused. I hope that someone can help me conceptually map out what I need to do in order to accomplish my objective and complete the project.

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    3,763
    Thanks
    23
    Thanked 548 Times in 547 Posts
    You are correct on almost everything. You need a database and should learn a language (server side) to work with the DB. But you don't need a domain when your just starting out. Look into WAMP http://www.wampserver.com/en/ or maybe read this http://www.sitepoint.com/php-amp-mysql-1-installation/
    Evolution - The non-random survival of random variants.

  • #3
    New to the CF scene
    Join Date
    Aug 2013
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by sunfighter View Post
    You are correct on almost everything. You need a database and should learn a language (server side) to work with the DB. But you don't need a domain when your just starting out. Look into WAMP http://www.wampserver.com/en/ or maybe read this http://www.sitepoint.com/php-amp-mysql-1-installation/
    Thank you for the resources. Is there a way that I can update the webpage forms client-side, using only JavaScript?

  • #4
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,020
    Thanks
    75
    Thanked 4,323 Times in 4,289 Posts
    Quote Originally Posted by Galan View Post
    Is there a way that I can update the webpage forms client-side, using only JavaScript?
    Yes and no.

    Yes, you can do it each time the user loads the page into the browser.

    And yes, you could even remember the changes you made for a given user by storing those change in cookies or localstorage.

    But no, those changes won't be seen by any other user.

    But this question doesn't seem to me to be at all what you were asking in your first post, where you said:
    - Write scripting in Html code in order to modify the web page output according to user form information.
    I read that as meaning that the information displayed for a given book changes according to what information some user has previously entered about that book. And that would make not much sense to do in browser-side code. The information entered has to be stored in a database, on the server. So it also has to then be retrieved from the database using server-side code. And that being the case, why not let the server-side code do the web page formatting?

    Having said all that... Some people *do* use client-side code to do this kind of thing, using AJAX. AJAX is essentially a mechanism that lets JavaScript request information--in any format--from the server. So the server can send back more or less raw data and let JavaScript create HTML to display it. Clever. Means the user can stay on the same browser page and see many different results in many different formats all on that page.

    But quite frankly, that's a lot more work and a lot more to learn than some relatively simple server-side scripting (e.g., in PHP code). And, as a minor aside, the PHP version works even if the user has disabled JavaScript.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • Users who have thanked Old Pedant for this post:

    Galan (08-04-2013)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •