Jump to content

Help.......resizing photos when uploaded?


raryre23

Recommended Posts

I downloaded a script for my website which, amongst other things, allows people to upload photos. However at the moment it doesnt resize the photos when they are uploaded and if they are too big they takeover the whole of the persons profile page. I have absolutely no php knowledge but i think the part of the php script that is about uploading photos is this:

 

<tr>

    <td valign="top"> <div align="center">

                    <table width="100%" height="100%" border="0" align="left" cellpadding="0" cellspacing="0">

                      <form name="myform" action="index.php?cmd=6" method="post" onsubmit="javascript: return checkifvalid();" enctype="multipart/form-data" >

                        <input type="hidden" name="addpic" value="1">

                        <tr >

                          <td width="1"  class="header"> </td>

                          <td height="20" colspan="2" class="header">Add a Picture</td>

                        </tr>

<?

if($uperror!="")

{

?>

                        <tr >

<td height="25" class="normal"> </td>

                          <td height="25" class="normal" colspan="2"><b><? print $uperror; ?></b></td>

                        </tr>

<?

}

?>

                        <tr >

                          <td height="25" class="normal"> </td>

                          <td height="25" class="normal">Image URL</td>

                          <td height="19" align="left" class="normal"> <input name="url" type="text" class="mytext" id="url" size="40"></td>

                        </tr>

                        <tr >

                          <td height="25" class="normal"> </td>

                          <td height="25" colspan="2" class="normal">for eg.http://www.abc.com/abc.gif</td>

                        </tr>

                        <tr >

                          <td width="1" height="25" class="normal"> </td>

                          <td width="135" height="25" class="normal"><strong>OR</strong>

                            Select a Picture</td>

                          <td width="281" height="19" align="left" class="normal">

                            <input class="mytext" name="uppic" type="file" id="uppic"></td>

                        </tr>

                        <tr align="center" >

                          <td height="25" colspan="3" class="normal"> <input type="submit" name="Submit" value="Add Picture" class="mybutton"></td>

                        </tr>

 

 

 

so im wondering where abouts in that script i put something about resizing and what do i write? Any help would be appreciated.

Link to comment
https://forums.phpfreaks.com/topic/46728-helpresizing-photos-when-uploaded/
Share on other sites

It's best to add your code within the code tags so it becomes more clear for us to read.

 

I'm learning PHP on my own now, but as far as I can tell there doesn't seem to be a resizing code in the snippet you provided.

It's highly probable that someone has asked this before, as it is a common problem. U could use the search function here at the forums in the mean time.

 

Regards,

Anzeo

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.