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 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    2
    Thanks
    3
    Thanked 0 Times in 0 Posts

    help with connection

    hi !
    im working on distributed system project using Erlang programing language.
    my part is User Interface , which i used (HTML,CSS ) , my second part is connecting database with UI , so the user inters information then connected with the database and get the results and redisplay it to the user again
    the database that we used is couchDB
    my question is i have no idea about how i can connect UI with the database, i should connect them directly or i should use a server such as (yaws server) any suggestions, tutorials, or source code that can help me with ill be appreciated



    regards

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,081
    Thanks
    23
    Thanked 592 Times in 591 Posts
    It is a server side language that talks to the database. You did not mention what one your using. I shall assume its php or a flavor of it that talks to the DB.
    If your using <form> in your UI, then just direct it to the php file you will write to interface with the DB.
    <form action="My Php File" method="post">

  • Users who have thanked sunfighter for this post:

    sarahjamil (10-10-2012)

  • #3
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    2
    Thanks
    3
    Thanked 0 Times in 0 Posts
    hi , thanx for your respond but i didn't get your point yet (im a little confused about that)
    the project is extract several files and save them in couchDB then the user will inter information such as (apartment size, number of rums, the area) we take what the user chose and try matching with the information that we have in the couchDB then display it to the user.

    i just wanna know:
    1. how i can download the server for window 7
    2. how yaws server work and how i can write codes within the UI (HTML,CSS) codes

    thanx

  • #4
    Regular Coder
    Join Date
    Apr 2012
    Location
    St. Louis, MO
    Posts
    985
    Thanks
    7
    Thanked 101 Times in 101 Posts
    You have to have a server-side language in order to interact with the database. ColdFusion, PHP, ASP, etc.

    HTML does not connect to a database, nor does JavaScript.
    ^_^

    If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
    *
    The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".

  • Users who have thanked WolfShade for this post:

    sarahjamil (10-11-2012)

  • #5
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,081
    Thanks
    23
    Thanked 592 Times in 591 Posts
    A server is a computer that holds files and maybe programs, it could sit in the basement of an office building and the office workers that need to work on those files (had in the old days a monitor; today they have a computer) that would ask the server for a file and maybe the program needed to work on the file. Nothing was kept on the computer on the workers desk. In the age of the internet, the server can be anywhere in the world. Soon maybe they will be on satellites. We, the users, point our computer to the server by typing an address into the address bar of our browsers, like: http://www.codingforums.com.
    The server will send us the main page of the site we asked for. They will show on the browser with no problems for all computer operation systems. A special server for IE7 is not needed. The files you write will be placed on that server. More info here: http://en.wikipedia.org/wiki/Server_%28computing%29

    You can put a small server on your computer to act like the bigger ones. I use WAMPSERVER, you can get it here: http://www.wampserver.com/en/

    Simple html with form to send information to another file on the server.
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>None</title>
    </head>
    <body>
    <form method="post" action="my.php">
      First name: <input type="text" name="firstname"><br>
      Last name: <input type="text" name="lastname"><br>
      Password: <input type="password" name="pwd"><br>
      <input type="submit" value="Submit">
    </form>
    </body>
    </html>
    When the submit button is press all info in the text fields will be sent to the server and to the php file. You can start studying php here:http://www.w3schools.com/php/default.asp Don't know what else to tell you. Good luck on your project.

  • Users who have thanked sunfighter for this post:

    sarahjamil (10-13-2012)


  •  

    Posting Permissions

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