I'm fairly new to php and am experimenting with the gd library. Its causing me some concerns. The photos that are uploaded seem to change colour, and increase in size 5 fold. Has anyone else experienced this?
Checkitout here
Also, this page, Site ahs an admin area where admin can uplaod word docs and a link is added to this page. When I view the page on my computer I see the right data, which is April Newsletter and a link. When I go and visit the website owner and try it there... does not work? Both on pc xp ie6 same security settings, everything.
Code is
<?php
$qry="select distinct(year) from cms_newsletter order by year desc";
$res=mysql_query($qry);
echo mysql_error();
while($data=mysql_fetch_object($res))
{
?>
<table width="100%" border="0" cellspacing="0" cellpadding="3" class=formtable>
<tr>
<td> <B><?php echo $data->year; ?> Newsletters</B></td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="3" class="formtable">
<?php
$detqry="select * from cms_newsletter where year='$data->year' order by id";
$detres=mysql_query($detqry);
echo mysql_error();
$month_arr=array();
$file_arr=array();
while($detdata=mysql_fetch_object($detres))
{
$month_arr[]=$detdata->month;
$file_arr[]=$detdata->filename;
}
// echo $data->year."-".count($file_arr);
for($i=0;$i<count($file_arr);$i++)
{
if($i%4==0)
{
?>
<tr>
<td width="25%">
<A href="upload/newsletter/<?php echo $file_arr[$i]; ?>"><?php echo $month_arr[$i]; ?></a>
</td>
<td width="25%"> <A href="upload/newsletter/<?php echo $file_arr[$i+1]; ?>"><?php echo $month_arr[$i+1]; ?></a></td>
<td width="25%"> <A href="upload/newsletter/<?php echo $file_arr[$i+2]; ?>"><?php echo $month_arr[$i+2]; ?></a></td>
<td width="25%"> <A href="upload/newsletter/<?php echo $file_arr[$i+3]; ?>"><?php echo $month_arr[$i+3]; ?></a></td>
</tr>
<?php
}//end if
}//end for
?>
</table>
</td>
</tr>
</table>
<?php
}//end while
?>
Can anyone spot a problem?
Much gracious.
Help on either/both problems welcomed
Checkitout here
Also, this page, Site ahs an admin area where admin can uplaod word docs and a link is added to this page. When I view the page on my computer I see the right data, which is April Newsletter and a link. When I go and visit the website owner and try it there... does not work? Both on pc xp ie6 same security settings, everything.
Code is
<?php
$qry="select distinct(year) from cms_newsletter order by year desc";
$res=mysql_query($qry);
echo mysql_error();
while($data=mysql_fetch_object($res))
{
?>
<table width="100%" border="0" cellspacing="0" cellpadding="3" class=formtable>
<tr>
<td> <B><?php echo $data->year; ?> Newsletters</B></td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="3" class="formtable">
<?php
$detqry="select * from cms_newsletter where year='$data->year' order by id";
$detres=mysql_query($detqry);
echo mysql_error();
$month_arr=array();
$file_arr=array();
while($detdata=mysql_fetch_object($detres))
{
$month_arr[]=$detdata->month;
$file_arr[]=$detdata->filename;
}
// echo $data->year."-".count($file_arr);
for($i=0;$i<count($file_arr);$i++)
{
if($i%4==0)
{
?>
<tr>
<td width="25%">
<A href="upload/newsletter/<?php echo $file_arr[$i]; ?>"><?php echo $month_arr[$i]; ?></a>
</td>
<td width="25%"> <A href="upload/newsletter/<?php echo $file_arr[$i+1]; ?>"><?php echo $month_arr[$i+1]; ?></a></td>
<td width="25%"> <A href="upload/newsletter/<?php echo $file_arr[$i+2]; ?>"><?php echo $month_arr[$i+2]; ?></a></td>
<td width="25%"> <A href="upload/newsletter/<?php echo $file_arr[$i+3]; ?>"><?php echo $month_arr[$i+3]; ?></a></td>
</tr>
<?php
}//end if
}//end for
?>
</table>
</td>
</tr>
</table>
<?php
}//end while
?>
Can anyone spot a problem?
Much gracious.
Help on either/both problems welcomed