Jump to content

"Advanced" Image Gallery?


designerdreams

Recommended Posts

I'm a newbie, so if I'm placing this in the wrong spot please tell me!

 

OK, I have a website: http://layouts.1stfreehosting.com/home8.php, which is under major construction.

 

I need to create a couple of scripts which do the following:

 

Upload an image and a ton of text,to my database, create 2 thumbnails, and a link, I kinda sorta get the upload part,

but I'm having troubles with the thumbnail.

 

Then I need to access my database and retrieve the image thumbnail and description, and place it on a page, which I already have ( I just don't have the content). Then, when you click on the image and/title, it will take you to the second page, which has the second thumbnail, the full description, and the css and html code for the layout.

(The image uploaded will be of a layout that the user designed)

-----------------------------------------------------

Thats one part, then on the users page (I already created a user, login, registration script...well actually I found a free one that works great), but on the user page (which is already created), I wanted to place all of the items they have uploaded in the form of, Title-Type (image, text, ect.).

 

Oh, and I'm new to php and mysql, so a lot of description is welcomed. I've tried to do it, but it won't upload to my database.

 

This is the table I created:

 

CREATE TABLE layouts (

id int(11) NOT NULL auto_increment,

imgname varchar(50) default NULL,

description varchar (240) default NULL,

csscode varchar(320000) default NULL,

htmlcode varchar (320000) default NULL,

fileContents blob,

PRIMARY KEY  (id)

)

 

I'm not too sure about the varchar (320000), but the codes will need a lot of characters,

so I just put in a number *head shakes*.

 

A simpler version of what I wrote above (because I don't think I made any sense):

upload section (for all users-not just the admin): upload form, title, description, css code, html code -->

gallery page displays with: smaller thumbnail, title, description, user (I know how to do the user part)-->

Image display page: 2nd larger thumbnail, title, description, css and html codes

 

I've like googled this so many times and tried a lot of the results,

but I must be doing something wrong because they don't work.

Once I got it to upload to the database, but then I had trouble retrieving it.

Link to comment
Share on other sites

Break it apart and take it step by step.  What are you expecting to happen at this point, and what DB error do you get?

 

BTW, I am not sure if you plan on storing the actual images in the database.  If so, don't do that.  Store a path or link to the images in the database, and store the actual image files in directories and subdirectories.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.