Jump to content

Recommended Posts

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?
Cheers
Link to comment
https://forums.phpfreaks.com/topic/3304-insert-record-having-an-image-upload/
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.