homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

Need help inserting Picture and Text in MySQL using PHP
inserting picture and text in mysql table

Msg#: 4441827 posted 7:33 am on Apr 17, 2012 (gmt 0)

Hey Guys
I am new here.

I am working on a site with two main pages. the first page is used to collect and stores people's information in a database while the second page displays these information from the database.

I need some help with a php code to store and another to display the following form fields in a MySQL data base
First Name (TEXT)
Last Name (TEXT)
E mail (TEXT)
Photo (IMAGE not exceeding 100Kb)




WebmasterWorld Senior Member rocknbil us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 4441827 posted 4:57 pm on Apr 17, 2012 (gmt 0)

Yeah you need some code all right. A substantial chunk of it, and an understanding of encoding type for file uploads for the images. It's not a one-off bit of code but a series of bits and pieces, and one post isn't going to cut it.

From what you've told us so far, don't name your database fields with spaces. Use something like fname or first_name or similar. The second is, don't store your images directly in the database as blob columns (to my knowledge, there is no "image" database column type in mySQL.) There are at least a doesn't reasons not to do this - what you should store is the URL or path to the image, and store the image files in your file system in some logical and expandable fashion. E.g., don't just dump them loosely in an "uploads" folder - devise a scheme to organize them in subfolders. The reason being, as you get more and more files, your site will begin slowing down when you have lots of files loose in a single folder.

And there you have one more reason why no one can post a bit of code to do this for you, you'll have to just begin and share with us what's not working. THAT the members here can help you with.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved