I'd have upload script 4 user to add pictures and it's a go, but now I need to code it so the added picture gets auto aligned to a pre made html page, url that will auto display the dimensions to what is pre coded into maybe an html/url that grabs it thru an include file or something.
If u know how or even better, have a working example, I'd much appreciate it.
Many thanks,
ChAnGeR
Auto add pix to url/html page user uploads to!
Started by changerhiphopmusic, May 18 2006 09:34 AM
4 replies to this topic
#1
Posted 18 May 2006 - 09:34 AM
#2
Posted 18 May 2006 - 01:18 PM
pix = pixel
pics = pictures. be a bit clearer please.
You could try using the search function. And search for "image gallery", and maybe also an upload tutorial.
pics = pictures. be a bit clearer please.
You could try using the search function. And search for "image gallery", and maybe also an upload tutorial.
#3
Posted 19 May 2006 - 03:09 AM
I´m not sure if I get what you mean, but if you want the size to automaticly be for example 400x400px you could solve the problem with some CSS or something, set heigth and widht to 400px like this:
Dunno if this works, or if this even was what you asked for, but I hope it helps.
- run mysql_query(); - - run mysql_fetch_array(); - <img style="width: 400px; heigth: 400px;" src="result from mysql_fetch_array()" />
Dunno if this works, or if this even was what you asked for, but I hope it helps.
#4
Posted 19 May 2006 - 12:49 PM
Firs run a query to get the image info (e.g. source etc) then use the following to get the height and width:
so..
$image = getimagesize("image.gif");
$filetype = $image['mime'];
$width = $blah[0];
$height = $blah[1];
so..
<img src="$row ->data;" style="width: $width; height: $height;" />
Edited by .Matt, 19 May 2006 - 12:49 PM.
#5
Posted 23 May 2006 - 11:05 PM
.Matt, on May 19 2006, 05:48 PM, said:
Firs run a query to get the image info (e.g. source etc) then use the following to get the height and width:
so..
$image = getimagesize("image.gif");
$filetype = $image['mime'];
$width = $blah[0];
$height = $blah[1];
so..
<img src="$row ->data;" style="width: $width; height: $height;" />
Thanks to all above and yes I meant pict's not pix, good point.
I'll get more specific, I'm very new to MySQL and I use phpmyadmin panel in cpanel to add tables and my question to .matt is for the code I quoted u gave...How do I place it, which file. In an include file at top of any page or the page with the file/pict will be uploaded thru or which scenario option/
My purpose is to let users upload a picture to a non database format for now, untill i understand cms more.
After pict's uploaded, i want it to be formated into column that places all uploaded pict's under or beside one another.
I'm not sure as to which scenario will work, like an include file on the pict' upload pg or probably the php file that the upload/send button bounces off of..I mean sends pict' to.
Anywho,
I'll explain more if needed, sorry if I'm jibberin a tad...lol..I need sleep.
Thank you!!!
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
