473,545 Members | 2,001 Online
Bytes | Software Development & Data Engineering Community
+ 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="maincontain er">

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

<div id="contentwrap per">
<div id="contentcolu mn">
<div style="margin-top:20px; margin-bottom:20px; margin-left:7.5em; width:650px; ">
<fieldset style="width:65 0px;">
<legend>Detaile d </legend>
<?php

include "config.inc.php ";
include "connect.inc.ph p";
$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">BIl l Received On</td><td class="td1" align="center" valign="bottom" >Bill Amount</td><td class="td1">Bil l Last Date</td><td class="td1">Det ail</td></tr>
<?php
$sql = "SELECT * FROM billrectable WHERE vTelNumber = '$vTelNumber'";
$result = mysql_query($sq l) or die(mysql_error ());
if($result>0)
{
$i = 1;


while($row = mysql_fetch_arr ay($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=$i BillID&iBillNum ber=$iBillNumbe r&foloer=39fmia s90ufja9fj&sick =fjijkackj109iu 903j\">Detail</a></td>";
$i++;
}
// exit;
}

?>
</table>
<table>
<tr><td>djfkd f</td></tr>
</table>

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

<div id="leftcolumn" >
<div class="innertub e"><?php include("leftMe nu.php"); ?> </div>

</div>



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

</div>
</body>

[/HTML]
when i run the program the <div id ="left"><?ph p include("leftMe nu.php"); ?> </div> and footer div is also not shown. i dont know what is the problem. please help me to find the solution ............tha nks .
Jan 24 '08 #1
3 1522
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
2922
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 G23_NA17192.fsa rs7374540 A/C I23_Control.fsa rs7374540 C/C
38
3481
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 = serial.Serial()
14
2449
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 far with a loop in a form. Basically, I have key sums Current savings Current Salary Current deposit amount
8
2383
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 <stdio.h>
9
3549
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--) { /* do something */
11
2092
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; std::bitset<Size*Size*Size> XZ; std::bitset<Size*Size*Size> XY; std::bitset<Size*Size*Size> V; union {
20
7185
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 get the error "There is already an open DataReader associated with this Connection which must be closed first." How can I fix this error ? For each...
5
3423
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 "notes" not being the issue). Beginning with... Dim objProcess As Process Dim objProcessStartInfo As New ProcessStartInfo
1
2639
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 don't know how to construct it i have read numerous books and have managed to get a pseudo code for how it should be which is Algorithm spanningTree...
15
3230
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 on a server that handles a fairly demanding site. The defaults, in php.ini, have all been cranked fairly high: scripts get 180 seconds to run, and...
0
7411
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7669
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7926
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7439
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7773
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
4962
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3468
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3450
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
722
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.