I installed program it seems to work fine, showing my databases etc. but when I cut and paste the code generated by viewmaker all I get is a blank screen. I know that it connected to database because when I don't it gives "unable to connect" error msg.
Here is code if anyone has an idea
Maybe when you do the SQL Statement... it does not returns any values.... so change your code to this and see..
$queryupdate = "select * from info where id = '$id'";
$resultupdate = MYSQL_QUERY($queryupdate);
$numberupdate = mysql_Numrows($resultupdate);
if ($numberupdate==0)
{
echo "No Records Found !";
}
elseif ($numberupdate>0) {
....
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2003-06-21
change it to what you thougth and got this:
Parse error: parse error, unexpected T_ELSE in /home/durconet/public_html/phpcode/view.php on line 14
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I installed program it seems to work fine, showing my databases etc. but when I cut and paste the code generated by viewmaker all I get is a blank screen. I know that it connected to database because when I don't it gives "unable to connect" error msg.
Here is code if anyone has an idea
------
<?
include("head.php");
include("datacon.php");
?>
<?
$queryupdate = "select * from info where id = '$id'";
$resultupdate = MYSQL_QUERY($queryupdate);
$numberupdate = mysql_Numrows($resultupdate);
if ($numberupdate>0) {
$x=0;
?>
<table border=0 cellspacing=0 cellpadding=10>
<?
while ($x<$numberupdate)
{
?>
<tr height=30>
<? $id=mysql_result($resultupdate,$x,"id"); ?>
<td align=right><b>Id :</b></td>
<td><font color=red><? echo $id; ?></td></td>
</tr>
<tr height=30>
<? $username=mysql_result($resultupdate,$x,"username"); ?>
<td align=right><b>Username :</b></td>
<td><font color=red><? echo $username; ?></td></td>
</tr>
<tr height=30>
<? $firstname=mysql_result($resultupdate,$x,"firstname"); ?>
<td align=right><b>Firstname :</b></td>
<td><font color=red><? echo $firstname; ?></td></td>
</tr>
<tr height=30>
<? $lastname=mysql_result($resultupdate,$x,"lastname"); ?>
<td align=right><b>Lastname :</b></td>
<td><font color=red><? echo $lastname; ?></td></td>
</tr>
<tr height=30>
<? $email=mysql_result($resultupdate,$x,"email"); ?>
<td align=right><b>Email :</b></td>
<td><font color=red><? echo $email; ?></td></td>
</tr>
<tr height=30>
<? $city=mysql_result($resultupdate,$x,"city"); ?>
<td align=right><b>City :</b></td>
<td><font color=red><? echo $city; ?></td></td>
</tr>
<tr height=30>
<? $state=mysql_result($resultupdate,$x,"state"); ?>
<td align=right><b>State :</b></td>
<td><font color=red><? echo $state; ?></td></td>
</tr>
<tr height=30>
<? $country=mysql_result($resultupdate,$x,"country"); ?>
<td align=right><b>Country :</b></td>
<td><font color=red><? echo $country; ?></td></td>
</tr>
<tr height=30>
<? $earnings=mysql_result($resultupdate,$x,"earnings"); ?>
<td align=right><b>Earnings :</b></td>
<td><font color=red><? echo $earnings; ?></td></td>
</tr>
<?
$x++;
} // end while
} // end if
?>
</table>
<?
include("foot.php");
?>
---------
Thanks in advance
Maybe when you do the SQL Statement... it does not returns any values.... so change your code to this and see..
$queryupdate = "select * from info where id = '$id'";
$resultupdate = MYSQL_QUERY($queryupdate);
$numberupdate = mysql_Numrows($resultupdate);
if ($numberupdate==0)
{
echo "No Records Found !";
}
elseif ($numberupdate>0) {
....
change it to what you thougth and got this:
Parse error: parse error, unexpected T_ELSE in /home/durconet/public_html/phpcode/view.php on line 14