Jump to content

Recommended Posts

Hi,

Does any know why my images have distorted?
[url]http://www.spirestest.com/nicky/gallery/select_edit.php[\url]

I have uploaded them into a folder on the server.
I have also (on upload) resized the images to 150 height.
when i display the thumbnails they come out distorted.

Is there any way of fixing this?

[code]

<?php
include('db.php');
echo $id;
$arrErrors = array();

if (!empty($_POST['submit'])) {
if ($_POST['description']=='')
$arrErrors['description'] = 'Description.';
if ($_POST['name']=='')
$arrErrors['name'] = 'Name.';


if (count($arrErrors) == 0) {

if (isset($_GET['id'])) {
    $name = $_GET['name'];
$description=$_GET['description'];
$id=$_GET['id'];
}






$result = mysql_query("UPDATE ***** SET description = '$description', name = '$name' WHERE  id = '$id' LIMIT 1") or die(mysql_error());
if ($result) {
$link_home = '<div class="error">Your details have been updated.<br><a href="select_edit.php" class="link">Return to edit list</a>.';

} else {
$UNtaken = '<div class="error">Sorry, Your details have not been updated.';
}


}  else {
if (empty($title) || empty($art)) {
$strError = '<div class="error">error';
      foreach ($arrErrors as $error) {
          $strError .= "<li>$error</li>";
      }
      $strError .= '</div>';
}



}

}




?>


<html>
<head>
<title>New News</title>

<link href="../css/nicky.css" rel="stylesheet" type="text/css">
</head>

<body>

<center>
<a href="select_edit.php" class="link">back</a>
<table width="250px" bgcolor="#EEEEEE" class="TLRB_border">
<tr>
<td>
<form name="form1" method="post" action="<?php echo $PHP_SELF; ?>">
<?php echo "<INPUT type='hidden' name='id' value='".$_POST['id']."'>"; ?>
<table width="190px" align="center" bgcolor="#FFFFFF">
<tr>
<td colspan="2">Edit News</td>
</tr>
<tr>
<td class="loginBox_text">Name:</td>
<td>
<input name="name" Type="text" id="name" size="15" value="<?php echo $_POST['name']?>">
</td>
</tr>
<tr>
<td class="loginBox_text">Description:</td>
<td>
<textarea name="description" cols="30" wrap="PHYSICAL" id="description" value="<?php echo $_POST['description']?>"></textarea>
</td>
</tr>
<td colspan="2" align="right">
<input type="submit" name="submit" value="Submit">
</td>
</table>
</form>
</td>
<tr>
<td>

<center>
<?php echo $strError; ?>
<?php echo $UNtaken; ?>
<?php echo $link_home; ?>
<?php echo $hitch; ?>
<?php echo $final; ?>
</center>



</td>
</tr>
</tr>
</table>

</center>

</body>
</html>
[/code]

Thanks for your help.  :D
Link to comment
https://forums.phpfreaks.com/topic/14679-distorting-images/
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.