installing a database in front page ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • eapj1
    Corporal

    • May 2006
    • 12

    installing a database in front page ?

    How do you install a database in front page ?
    I have it set up according to the tutorial,
    how do i get it in there to have the input from
    the form to go in to it ?
    Thank you for your help.
    eapj1
  • navaldesign
    General & Forum Moderator

    • Oct 2005
    • 12080

    #2
    Re: installing a database in front page ?

    Frontpage has nothing to do with writing the data in your database. After you have created your form in frontpage, you need a script (usually in php, to process the info submitted by the form. If you are using a php script to process your form info, you will have to add some lines of code in the script, in order to have the info writen in the database. Then, of course, you will need another script to retreive the info from the database, and have it presented in one of your pages.
    Although there are such script examples on the net, they are usually hard to create and use, unless you have some knowledge of php and MySQL.



    Lets suppose that you already have in your script a part that will define three variables $address, $lastname and $name getting them from the array submitted by the form. You now want to write these three values in your database.

    Here is an example of what the writing piece of code could look like:

    @$pfw_strQuery = "INSERT INTO `clients`(`address`,`lastname`,`name`)VALUES (\"$address\",\"$lastname\",\"$name\")" ;
    @$pfw_host = "localhost";
    @$pfw_user = "dbusername";
    @$pfw_pw = "bdpassword";
    @$pfw_db = "dbname";
    $pfw_link = mysql_connect($pfw_host, $pfw_user, $pfw_pw);
    if (!$pfw_link) {
    die('Could not connect: ' . mysql_error());
    }
    $pfw_db_selected = mysql_select_db($pfw_db, $pfw_link);
    if (!$pfw_db_selected) {
    die ('Can not use $pfw_db : ' . mysql_error());
    }
    //insert new record
    $pfw_result = mysql_query($pfw_strQuery);
    if (!$pfw_result) {
    die('Invalid query: ' . mysql_error());
    }
    mysql_close($pfw_link);

    These lines will write the three variables, name, lastname and address in the database, in the table "clients", in their respective fileds.
    Last edited by navaldesign; 05-24-2006, 09:11 PM.
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

    Comment

    • eapj1
      Corporal

      • May 2006
      • 12

      #3
      Re: installing a database in front page ?

      Navaldesign,
      If i am just using the database to store info like firstname, lastname, zipcode, email address, Date and Time, with the info hide from others.
      Would i use the script like you wrote it, except add the other varibles ?
      I am located in the US, so i'm not on line when you are.
      Thank you for your help.
      eapj1

      Comment

      • Watdaflip
        Major General

        • Sep 2005
        • 2116

        #4
        Re: installing a database in front page ?

        yes, that will store the data into the a database, but you also need a script to display the data

        Register/Login Script
        Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

        Comment

        • navaldesign
          General & Forum Moderator

          • Oct 2005
          • 12080

          #5
          Re: installing a database in front page ?

          Data writen in the database are only visible to only who can connect to the database, with the correct loggin info. Usually the info can be retreived from the database using another script, and then it is displayed in one of your pages, using some more code. To create the necessary code, you can either hand compile it, if you have the necessary knowledge, or use one of the commercial php/html code generators. In both cases, it requires some effort from you.
          Navaldesign
          Logger Lite: Low Cost, Customizable, multifeatured Login script
          Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
          DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
          Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

          Comment

          • eapj1
            Corporal

            • May 2006
            • 12

            #6
            Re: installing a database in front page ?

            Where is a good place to find a frontend script, for taking info and putting it into a database table ?
            thank you for your input.
            eapj1

            Comment

            • navaldesign
              General & Forum Moderator

              • Oct 2005
              • 12080

              #7
              Re: installing a database in front page ?

              You must create a form in one of your pages and make a script as shown above. There are no ready made scripts for such kind of application, as each case is a case appart. Your problem will be more to create the necessary script for data retrieval and presentation.
              Navaldesign
              Logger Lite: Low Cost, Customizable, multifeatured Login script
              Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
              DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
              Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

              Comment

              • eapj1
                Corporal

                • May 2006
                • 12

                #8
                Re: installing a database in front page ?

                I already have the form set up to receive the first and last name,
                the zipcode and email address. and it is going into a html area
                of the website. Can i install any table in the database or
                is there a place to find a table, to install into the database ?
                Then i would just need some script like what was sent above.

                1 more question, to send back an email to those that hit the summit
                button on the form, would you you'se a php script or a java script
                to take their input and send it to them in an email ?

                Thank you for getting back with me.
                eapj1

                Comment

                • navaldesign
                  General & Forum Moderator

                  • Oct 2005
                  • 12080

                  #9
                  Re: installing a database in front page ?

                  The above script, in php, after writing the data in the database can also send an email to you as well as to the visitor (like an autoresponder) . Youcan personalize the message sent to them as you wish.

                  You must CREATE the database. There is no database in your account initially. You create it through CP. Then use phpMyAdmin to set up the table (name it as you like it, f.e. "clients". Then set the type and lenght of the fields.

                  As i told you, it is not simple: if the ifo is of vital importance, you will need field validation to make sure that the fields have been completed, taht they are the appropriate type of data, etc. The hardest part will be the data retreival and presentation script, especially if you want the presentation page to suit the rest of your site.
                  Navaldesign
                  Logger Lite: Low Cost, Customizable, multifeatured Login script
                  Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                  DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                  Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                  Comment

                  • eapj1
                    Corporal

                    • May 2006
                    • 12

                    #10
                    Re: installing a database in front page ?

                    Navaldesign,
                    Happy memorial day !
                    What is the best way to set up a table in phpMyAdmin ?
                    Thank you for your help !
                    eapj1

                    Comment

                    • navaldesign
                      General & Forum Moderator

                      • Oct 2005
                      • 12080

                      #11
                      Re: installing a database in front page ?

                      There is only one procedure: select the database you want to create the tble in, then from the field Create new table, select the name and number of fields you want. Are you sure you want to do this? I still don't feel very confident about MySQL....
                      Navaldesign
                      Logger Lite: Low Cost, Customizable, multifeatured Login script
                      Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                      DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                      Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                      Comment

                      • eapj1
                        Corporal

                        • May 2006
                        • 12

                        #12
                        Re: installing a database in front page ?

                        You told me that a database was the best way to collect the peoples info in. Unless you know of another way of collecting this info. i am open for a better suggestion. I just need to collect the first name, last name, zipcode and thier email address. However i need to be able to read it easily and be able to delete it easily if some one wants out of the mailling list.
                        eapj1

                        Comment

                        • navaldesign
                          General & Forum Moderator

                          • Oct 2005
                          • 12080

                          #13
                          Re: installing a database in front page ?

                          The meaning of my post was not to discuss on which way is the best. A database IS the best way to collect and search info. My post was about your ability (and mine as well ) to create the necessary frontend scripts to manage the database directly from your site. If you need to only collect the info and then manually edit it or delete it through phpMyadmin, it becomes easier.
                          Navaldesign
                          Logger Lite: Low Cost, Customizable, multifeatured Login script
                          Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                          DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                          Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                          Comment

                          • eapj1
                            Corporal

                            • May 2006
                            • 12

                            #14
                            Re: installing a database in front page ?

                            in the php and data base forum i ask witch would be the best to do.
                            a database or excell. you said a data base, that is why i came to this forum.
                            eapj1

                            Comment

                            • navaldesign
                              General & Forum Moderator

                              • Oct 2005
                              • 12080

                              #15
                              Re: installing a database in front page ?

                              Again: a database is the best way to manage info. The problem is not the database itself, but creating the scripts that will do the editing, updating, managing, and searching of the database stored info.
                              Navaldesign
                              Logger Lite: Low Cost, Customizable, multifeatured Login script
                              Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                              DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                              Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                              Comment

                              Working...
                              X