zeusthegreat Posted March 2, 2011 Report Share Posted March 2, 2011 hello i am racking my tiny brain to once i have uploaded an image to a particular page to get the image to appear on the page that it has been uploaded to . am i best to upload the image and can i then use include to make the image show on the page or do i have to create a div or a html table and upload the image in there is there a particular function that i am missing or do i have to create an image variable and then go from there all the training on this subject are really intimerdating i just want a bit of help.... do i upload to the page and what do i use i guess it is not echo possibly print_r($_FILES); headache headache thanks for any help Quote Link to comment Share on other sites More sharing options...
zeusthegreat Posted March 3, 2011 Author Report Share Posted March 3, 2011 so if i wanted to place an image on in a certain part of a page i would just either use pixels to determine this or place inside a div, then how would i get the next image to show underneath or to the side pixels again or is there some other command is what i am asking? thanks for the look i am trying to understand ecerything that i am doing and then i always learn well! Quote Link to comment Share on other sites More sharing options...
Wickham Posted March 3, 2011 Report Share Posted March 3, 2011 You will have to style the img html inside the PHP echo or print. Put an id in the stylesheet for each image:- #image1 { display: block; width: ??px; height: ??px; } #image2 { display: block; width: ??px; height: ??px; } and edit the PHP echo or print:- print "<img id="image1" src='$uploadPath/my57chevy.gif' alt='My 57 Chevy' /> <img id="image2" src='$uploadPath/my57chevy.gif' alt='My 57 Chevy' /> \n"; which should place one image above the other as block elements are usually one above the other. If you want the images side by side, add float: left; to both styles. However, you may need additional styles to position the images more accurately, like margin or padding but we don't know how they are to fit in your page. Quote Link to comment Share on other sites More sharing options...
falkencreative Posted March 3, 2011 Report Share Posted March 3, 2011 Usually what I do in this situation is use a static image when I'm first producing the page, making sure that it displays in the right spot first. Then, once I'm finished with my CSS/HTML work, I then use PHP to echo out the image in place of the previous image. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.