Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Basic online database

Options
  • 30-12-2008 7:05pm
    #1
    Registered Users Posts: 401 ✭✭


    Hi guys,

    I want to create a basic database accessible from a web browser, which would allow images to be viewed. I haven't done anything like this before and was wondering where my starting point should be? I've already started to play around with MySQL, I presume thats what I should use for the database?

    Thanks


Comments

  • Registered Users Posts: 26,579 ✭✭✭✭Creamy Goodness


    mysql is possibly the most common free solution.

    you'll want to look at ways of extracting data from your mysql - if you decide to go ahead with that - database using a language like php/asp/perl etc.

    a little tip would be not to actually store the images in the database itself - most popular databases have an image datatype - but to store the file on the server and store a text string in the database as to where the image file is located on the server.


  • Registered Users Posts: 197 ✭✭pauldiv


    Sharkdawg, you didnt say if you were going to be doing this on a live server or just locally on a development machine. It is just for practice?

    As Creamy said you keep the images in a directory and then create a table in your database that will have columns containing the filename and caption of each image in your gallery.

    Creating a PHP page to query the table and loop through all the images is pretty easy. Its just XHTML and a bit of PHP.


  • Registered Users Posts: 23,212 ✭✭✭✭Tom Dunne


    You probably want to look at the MySQL/PHP/Apache combination. The database on it's own isn't really much use to you in this situation.


  • Registered Users Posts: 9,579 ✭✭✭Webmonkey


    WAMP might be handy if you want to get everything up and running locally quick.

    http://www.wampserver.com/en/

    EasyPHP is another, several out there. Think they all as good as eachother really as they all contain same things really.


  • Registered Users Posts: 401 ✭✭sharkDawg


    Thanks for the replies guys, Ive only got around to starting at this, this weekend.
    I've been following this tutorial just to get something basic up and running first, but am having trouble uploading an image. I get the following error:
    Warning: move_uploaded_file(images/test.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in C:\wampserver\www\add.php on line 25
    
    Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\wampserver\tmp\php7A.tmp' to 'images/test.jpg' in C:\wampserver\www\add.php on line 25
    Sorry, there was a problem uploading your file.
    

    I'm running this locally using WAMP (thanks webmonkey), but am obviously doing something wrong, any ideas?


  • Advertisement
  • Closed Accounts Posts: 8,866 ✭✭✭Adam


    sharkDawg wrote: »
    Thanks for the replies guys, Ive only got around to starting at this, this weekend.
    I've been following this tutorial just to get something basic up and running first, but am having trouble uploading an image. I get the following error:
    Warning: move_uploaded_file(images/test.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in C:\wampserver\www\add.php on line 25
    
    Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\wampserver\tmp\php7A.tmp' to 'images/test.jpg' in C:\wampserver\www\add.php on line 25
    Sorry, there was a problem uploading your file.
    

    I'm running this locally using WAMP (thanks webmonkey), but am obviously doing something wrong, any ideas?
    try changing the target directory to the full path i.e. C:/wampserver/www/images/


Advertisement