See if this fixes it for you:
PHP Code:
else if($_GET[act]=='viewProgressProject')
{
include "connect.php";
$sql = mysql_query("select * from progress where IDPro = '$_GET[id]'");
while($fetch = mysql_fetch_array($sql))
{
if ($zzz = substr($fetch[0],2,3) + 1)
{
$test = "PP00";
$gg = $test.$zzz;
}
else if($zzz = substr($fetch[0],2,3) + 10)
{
$test = "PP0";
$gg = $test.$zzz;
}
else
{
$test = "PP";
$gg = $test.$zzz;
}
}
str_replace("00", "0", $test);
echo "
<h2>Progress Project : $_GET[id]</h2>
<form id=formViewProgressProject name=formViewProgressProject method=post action='action.php?module=project&act=doUpdateProgressProject'>
<table>
<tr>
<td>ID Progress</td>
<td> : <input type=text name=txtIDProgress id=txtIDProgress value='$gg' readonly=readonly/></td>
</tr>
Bookmarks