I cannot set the size of images upload from the user….i have try lots and if fail to set the images size of what i want.
Here i put my codings that show the images dan the whole codings to show the data user profile….
Codings to show the images :
<?php echo “<img src=”images/” . $row_profile[‘filename’] . “” alt=”” /><br />” ;?>
THe Whole Codings User data :
<?php require_once(‘polictera.php’); ?>
<?php
if (!function_exists(“GetSQLValueString”)) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = “”, $theNotDefinedValue = “”)
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists(“mysql_real_escape_string”) ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case “text”:
$theValue = ($theValue != “”) ? “‘” . $theValue . “‘” : “NULL”;
break;
case “long”:
case “int”:
$theValue = ($theValue != “”) ? intval($theValue) : “NULL”;
break;
case “double”:
$theValue = ($theValue != “”) ? “‘” . doubleval($theValue) . “‘” : “NULL”;
break;
case “date”:
$theValue = ($theValue != “”) ? “‘” . $theValue . “‘” : “NULL”;
break;
case “defined”:
$theValue = ($theValue != “”) ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
if (!function_exists(“GetSQLValueString”)) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = “”, $theNotDefinedValue = “”)
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists(“mysql_real_escape_string”) ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case “text”:
$theValue = ($theValue != “”) ? “‘” . $theValue . “‘” : “NULL”;
break;
case “long”:
case “int”:
$theValue = ($theValue != “”) ? intval($theValue) : “NULL”;
break;
case “double”:
$theValue = ($theValue != “”) ? “‘” . doubleval($theValue) . “‘” : “NULL”;
break;
case “date”:
$theValue = ($theValue != “”) ? “‘” . $theValue . “‘” : “NULL”;
break;
case “defined”:
$theValue = ($theValue != “”) ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$maxRows_profile = 1;
$pageNum_profile = 0;
if (isset($_GET[‘pageNum_profile’])) {
$pageNum_profile = $
}
$startRow_profile = $pageNum_profile * $maxRows_profile;
$colname_profile = “-1”;
if (isset($_POST[‘ic’])) {
$colname_profile = $
}
$colname2_profile = “-1”;
if (isset($_POST[‘ahli’])) {
$colname2_profile = $
}
$colname3_profile = “-1”;
if (isset($_POST[‘negeri’])) {
$colname3_profile = $
}
mysql_select_db($database_polictera, $polictera);
$query_profile = sprintf(“SELECT * FROM profile WHERE ic = %s AND (ahli=%s AND %s = negeri)”, GetSQLValueString($colname_profile, “int”),GetSQLValueString($colname2_profile, “text”),GetSQLValueString($colname3_profile, “text”));
$query_limit_profile = sprintf(“%s LIMIT %d, %d”, $query_profile, $startRow_profile, $maxRows_profile);
$profile = mysql_query($query_limit_profile, $polictera) or die(mysql_error());
$row_profile = mysql_fetch_assoc($profile);
if (isset($_GET[‘totalRows_profile’])) {
$totalRows_profile = $
} else {
$all_profile = mysql_query($query_profile);
$totalRows_profile = mysql_num_rows($all_profile);
}
$totalPages_profile = ceil($totalRows_profile/$maxRows_profile)-1;
?><!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “
<html xmlns=”
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>Untitled Document</title>
<link rel=”stylesheet” href=”/polictera/components/com_php/files/profile.css” type=”text/css” media=”all” />
<style type=”text/css”>
<!–
.style1 {font-size: 16px}
.style5 {
color: #445668;
font-size: 16px;
font-weight: bold;
margin-right: 40px;
}
–>
</style>
</head>
<body>
<div id=”contact”>
<h1>KEPUTUSAN SEMAKAN AHLI POLICTERA</h1>
[B]<div style=”border: solid 5px #445668; width:250px; height: 259px; margin-left: 250px; margin-bottom: 30px;” align=”center”><?php echo “<img src=”images/” . $row_profile[‘filename’] . “” alt=”” /><br />” ;?></div>
<table border=”0″ align=”center”>
<?php do { ?>
<tr>
<td>
<div><span class=”style5″>Nama Penuh:</span> </div></td>
<td><label for=”nama”><?php echo strtoupper($row_profile[‘name’]); ?></label></td>
</tr>
<tr>
<td><div><span class=”style5″>No. Kad Pengenlan:</span> </div></td>
<td><label for=”ic”><?php echo $row_profile[‘ic’]; ?></label></td>
</tr>
<tr>
<td valign=”top”><div><span class=”style5″>Alamat:</span> </div></td>
<td><label for=”alamat”><?php echo $row_profile[‘alamat’]; ?></label></td>
</tr>
<tr>
<td><div><span class=”style5″>Negeri:</span> </div></td>
<td><label for=”negeri”><?php echo $row_profile[‘negeri’]; ?></label></td>
</tr>
<tr>
<td><div><span class=”style5″>Jenis Keahlian:</span></div></td>
<td><label for=”ahli”><?php echo $row_profile[‘ahli’]; ?></label></td>
</tr>
<tr>
<td><div><span class=”style5″>Status Keahlian:</span> </div></td>
<td><label for=”status”><?php echo $row_profile[‘status’]; ?></label></td>
</tr>
<tr>
<td><div><span class=”style5″>Pekerjaan:</span> </div></td>
<td><label for=”kerja”><?php echo $row_profile[‘kerja’]; ?></label></td>
</tr>
<tr>
<td><div><span class=”style5″>Rekod Pekerjaan:</span> </div></td>
<td><label for=”rekod”><?php echo $row_profile[‘rekod’]; ?></label></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<?php } while ($row_profile = mysql_fetch_assoc($profile)); ?>
</table>
<p align=”center”><blink><a href=”
</div>
</body>
</html>
<?php
mysql_free_result($profile);
?>
May i know how the right php codings to set the images for example : 350 X 150 pixel