Jump to content


Insert record having an image upload

  • Please log in to reply
No replies to this topic

#1 nanny

  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 02 February 2006 - 07:46 AM

Hi I am allowing users who have registered to insert a Job Ad. One field in the insert record is am image file.
I am new to php has I have done hundreds of pages html only and now realise I need to change.
This is what I am up to I have been playing around and sometimes get a blank page when checking in the browser.
<input type="file" name="picture" value="" size="40">
<?php //this is inserted after the picture file field
$picture = "picture";
$file = "file";
if ($file[picture]) {
$size = getImageSize($file['picture']);
$width = $size[0];
$height = $size[1];
<img src="<?php print $file['picture'];?>"
width="<?php print $width;?>" height="<?php print $height;?>">

But this brings me a blank screen. Any suggestions on what I am doing wrong?

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users