473,478 Members | 2,028 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

there is problem in my while loop

99 New Member
I have a problem while loop of the following program. The problem is that, it showing the output that i wished to show, but the other remaining HTML portion afer the while loop is not showing in my pages. I m giving the code below
[HTML]<body>
<div id="maincontainer">

<div id="topsection"><span style="font-size:30px; font-weight:bold; color:#6666FF">Welcome to Habsons Telephone Directory</span><span style="float:left">Hi
<?php
echo "<font size=\"4\" color=\"red\">";
echo ucwords($_SESSION['username']);
echo "</font>";
?>
&nbsp<a href="logout.php" style="text-decoration:none; font-weight:bold"> [ Logout ]</a>
</span>
<?php include("topMenu.php"); ?></div>

<div id="contentwrapper">
<div id="contentcolumn">
<div style="margin-top:20px; margin-bottom:20px; margin-left:7.5em; width:650px; ">
<fieldset style="width:650px;">
<legend>Detailed </legend>
<?php

include "config.inc.php";
include "connect.inc.php";
$error = "";
$vTelNumber = $_POST['vTelNumber'];
// echo $vTelNumber;
?>
<table width="100%" cellspacing="1" align="center">
<tr>
<td colspan="5" align="left">
Phone Number:
<?php echo $vTelNumber; ?>
</td>
</tr>
<tr>
<td class="td1">Sl No</td><td class="td1">BIll Received On</td><td class="td1" align="center" valign="bottom">Bill Amount</td><td class="td1">Bill Last Date</td><td class="td1">Detail</td></tr>
<?php
$sql = "SELECT * FROM billrectable WHERE vTelNumber = '$vTelNumber'";
$result = mysql_query($sql) or die(mysql_error());
if($result>0)
{
$i = 1;


while($row = mysql_fetch_array($result) or die(mysql_error()))
{
if($i%2==0)
{
$bg = "#C0C0C0";
}
else
{
$bg = "#969696";
}
?>
<?php

$iBillID = $row['iBillID'];
$iBillNumber = $row['iBillNumber'];
echo "<tr bgcolor=\"$bg\">";
echo "<td class=\"td1\">$i</td>";
echo "<td class=\"td1\">".$row['dBillRecDate']."</td>";
echo "<td class=\"td1\">".$row['fAmountToPay']."</td>";
echo "<td class=\"td1\">".$row['dBillDateOfPay']."</td>";
echo "<td class=\"td1\"><a href=\"detailed_bill_by_number.php?iBillID=$iBillI D&iBillNumber=$iBillNumber&foloer=39fmias90ufja9fj &sick=fjijkackj109iu903j\">Detail</a></td>";
$i++;
}
// exit;
}

?>
</table>
<table>
<tr><td>djfkdf</td></tr>
</table>

</fieldset>
</div>
</div>
</div>

<div id="leftcolumn">
<div class="innertube"><?php include("leftMenu.php"); ?> </div>

</div>



<div id="footer">All rights reserved &copy </div>

</div>
</body>

[/HTML]
when i run the program the <div id ="left"><?php include("leftMenu.php"); ?> </div> and footer div is also not shown. i dont know what is the problem. please help me to find the solution ............thanks .
Jan 24 '08 #1
3 1515
code green
1,726 Recognized Expert Top Contributor
Check the number of closing tags matches the opening,
particularly for the table elements.
Is the exit commented out in your test script?
Don't forget the closing HTML
Jan 25 '08 #2
recordlovelife
31 New Member
yeh, looks like you left out a </tr> tag.
Jan 27 '08 #3
robin1983
99 New Member
Thanks, now it working fine
yeh, looks like you left out a </tr> tag.
Jan 27 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
2910
by: Charles Alexander | last post by:
Hello I am new to php & MySQL - I am trying to retrieve some records from a MySQL table and redisplay them. The data in list form looks like this: Sample_ID Marker_ID Variation ...
38
3474
by: jrlen balane | last post by:
basically what the code does is transmit data to a hardware and then receive data that the hardware will transmit. import serial import string import time from struct import * ser =...
14
2442
by: Crimsonwingz | last post by:
Need to calculate a sum based on a number of factors over a period of years. I can use formula ^x for some of it, but need totals to carry over in the sum and have only been able to do this thus...
8
2375
by: Jeff | last post by:
Hello everybody, I was doing one of the exercises in the K&R book, and I got something really strange. Here's the source code: /* * Exercise 2-2 from the K&R book, page 42 */ #include...
9
3544
by: No Such Luck | last post by:
I have a function which requires me to loop from the end of a string to the beginning on a char by char basis: int foo (char string) { unsigned int i; for(i = strlen(string); i >= 0; i--) {...
11
2084
by: felixnielsen | last post by:
What i have is not even a real problem, but i hope someone can help anyway, but first a piece of code_ @code start const unsigned short Size = 2; // 2^N std::bitset<Size*Size*Size> YZ;...
20
7171
by: fniles | last post by:
I am using VB.NET 2003, SQL 2000, and SqlDataReader. As I read data from tblA, I want to populate tblB. I use SQLDataReader for both tables. I do not use thread. When I ExecuteReader on tblB, I...
5
3410
by: =?Utf-8?B?Z215ZXJz?= | last post by:
Hello, I am attempting to start a cmd.exe process and pass several .vbs scripts (with additional parameters) and then read the output from the scripts and make "notes" in a DataTable (the...
1
2630
by: jenny22 | last post by:
i have a problem i am very new to c++ and want to construct a minimum spanning tree for 8 stocks i have calculated in excel the relevant formulas and know the weights of each of gthe vertices but...
15
3224
by: Lawrence Krubner | last post by:
Does anything about this script look expensive, in terms of resources or execution time? This script dies after processing about 20 or 25 numbers, yet it leaves no errors in the error logs. This is...
0
7027
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6899
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7067
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5312
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4757
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4463
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1288
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
555
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
166
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.