SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2006
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Adding content to database

    I have a form that people can fill out, but I need the imformation to be added to a database. Is it possible to do this and how would I go about it?
    Thanks

  2. #2
    SitePoint Evangelist BJ Duncan's Avatar
    Join Date
    Jun 2007
    Location
    Bowen Mountain, NSW
    Posts
    490
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you familiar with MySQL? Are you being hosted or are you running on a local server?

    The answer to your question is 'yes it can be done'. But your question is very general. If you can answer my 2 questions then my answer can be elaborated.
    Regards,
    BJ Duncan

  3. #3
    SitePoint Evangelist BJ Duncan's Avatar
    Join Date
    Jun 2007
    Location
    Bowen Mountain, NSW
    Posts
    490
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Regards,
    BJ Duncan

  4. #4
    SitePoint Enthusiast
    Join Date
    Feb 2006
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No I'm not very familiar with MySQL (The only thing I've managed to do so far is created a database on my own computer). The database I want to add the content to is being hosted though.
    Thanks for your help, I'm about to have a look at the link you mentioned as well.

  5. #5
    SitePoint Enthusiast
    Join Date
    Feb 2006
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have all of the details to access the database, but I don't know how to access it using the Terminal window. I tried typing:
    Code:
    mysql --host xx.xx.xx.xxx --user username --password=password databasename
    straight into the window as soon as I open it, but it came up with an error saying:
    -bash: mysql: command not found

  6. #6
    SitePoint Evangelist BJ Duncan's Avatar
    Join Date
    Jun 2007
    Location
    Bowen Mountain, NSW
    Posts
    490
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what have you used to create your database?
    Regards,
    BJ Duncan

  7. #7
    SitePoint Evangelist BJ Duncan's Avatar
    Join Date
    Jun 2007
    Location
    Bowen Mountain, NSW
    Posts
    490
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The only thing I've managed to do so far is created a database on my own computer. The database I want to add the content to is being hosted though.
    How did you create the database?
    Are you using phpMyAdmin?
    Regards,
    BJ Duncan

  8. #8
    SitePoint Enthusiast
    Join Date
    Feb 2006
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The database was created by the person who originally built the site, but now I've been asked to add this bit to it. I found a file in the root folder called includes.php the content of that file is:
    PHP Code:
    <?

    include "common/config.php" ;
    include 
    "common/common.class.php" ;
    include 
    "common/database.class.php" ;

    $db = new database() ;
    $common = new common() ;

    ?>
    Thanks


Bookmarks

Posting Permissions

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