www.webdeveloper.com
Results 1 to 12 of 12

Thread: [RESOLVED] Table Boaders not showing with no data

  1. #1
    Join Date
    Nov 2009
    Posts
    7

    resolved [RESOLVED] Table Boaders not showing with no data

    Table Boaders are not showing in IE7 with no data from the database they show in fire fox fine Ant help would be Great
    Code:
    echo "<TABLE BORDER=2 align=center  >";
    	echo "<TR><TD><B>Username</B><TD><B>Password</B><TD><b>Name</b><td><b>Street</b><td><b>City</b><td><b>State</b><td><b>Zip</b><td><b>Phone </B><td><b>E-Mail</b><td><b>info</b><td><b>Admin</b><TH COLSPAN=3><b>Options</b></TH>
    	</TR>";
    	while ($myrow = mysql_fetch_array($result))
    	{
    	echo "<TR><TD>".$myrow["username"]."<td>".$myrow ["password"]."<td>".$myrow["name"]."<td>".$myrow["street"]."<td>".$myrow["city"]."<td>".$myrow["state"]."<td>".$myrow["zip"]."<td>".$myrow["phone"]."<td>".$myrow["email"]."<td>".$myrow["info"]."<td>".$myrow["admin"];
    	// "<TD><a href=\"_view.php?id=".$myrow['id']."\"> <img src= ".$img_view." ></a>";
    	echo "<TD><a href=\"_deleteparticipant.php?id=".$myrow['id']."\"> <img src= ".$img_delete.">  </a>";
    	echo "<td><a href=\"updateparticipant.php?id=".$myrow['id']."\"> <img src= ".$img_edit.">  </a>";
    		
    	}
    	echo "</TABLE>";

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Test for 'no data' and add a space character.
    At least 98% of internet users' DNA is identical to that of chimpanzees

  3. #3
    Join Date
    Nov 2009
    Posts
    7
    How would i test for no Data and add space character ???

  4. #4
    Join Date
    Nov 2009
    Location
    Nashville, TN
    Posts
    8
    Add the section in bold to the areas that won't show a border.
    Code:
    echo "<td><a href=\"updateparticipant.php?id=".$myrow['id']."\"> <img src= ".$img_edit.">  </a>" .'&nbsp;';
    Something similar for that with each section of the table will force a border in IE even if no data is available.
    Last edited by necrojustice; 11-11-2009 at 10:57 AM.

  5. #5
    Join Date
    Nov 2009
    Posts
    7
    Tried that and all i got was a Couple of "" in the options box and nothing else

  6. #6
    Join Date
    Nov 2009
    Location
    Nashville, TN
    Posts
    8
    Try adding this to your CSS

    table {
    border-collapse: collapse;
    }

  7. #7
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Code:
    while ($myrow = mysql_fetch_array($result))
    	{
    foreach ($myrow as $key => $value) {
        if ($value=='') {
            $myrow[$key] = '&nbsp;';
        }
    .
    .
    or put your document into strict mode
    At least 98% of internet users' DNA is identical to that of chimpanzees

  8. #8
    Join Date
    Nov 2009
    Posts
    7
    Thank you for your Replay
    I placed your Code in there and this is what i get
    Parse error: syntax error, unexpected $end in /var/www/virtual/eventtracker/adminparticipants.php on line 115

    There is no $end on line 115
    foreach ($myrow as $key => $value) {
    if ($value=='') {
    $myrow[$key] = '&nbsp;';
    }
    Found the Problem with your Code
    after fixing that No data shows up at all
    Last edited by r2ks; 11-11-2009 at 05:27 PM.

  9. #9
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    I tested the snippet of code and it works correctly. Show how you implemented it.
    At least 98% of internet users' DNA is identical to that of chimpanzees

  10. #10
    Join Date
    Nov 2009
    Posts
    7
    Thank you for your Willingness to keep helpin me.
    as i said all the fields are blank with the Code here is the way i have it..
    Code:
    $result = mysql_query("SELECT * FROM users ",$con);
    	echo "<TABLE BORDER=2 align=center> ";
    	echo "<TR><TD><B>Username</B><TD><B>Password</B><TD><b>Name</b><td><b>Street</b><td><b>City</b><td><b>State</b><td><b>Zip</b><td><b>Phone </B><td><b>E-Mail</b><td><b>info</b><td><b>Admin</b><TH COLSPAN=3><b>Options</b></TH>
    	</TR>";
    	while ($myrow = mysql_fetch_array($result))
    	foreach ($myrow as $key => $value) 
        if ($value=='') {
            $myrow[$key] = '&nbsp;';
        }
    
    	{
    	echo "<TR><TD>".$myrow["username"]."<td>".$myrow ["password"]."<td>".$myrow["name"]."<td>".$myrow["street"]."<td>".$myrow["city"]."<td>".$myrow["state"]."<td>".$myrow["zip"]."<td>".$myrow["phone"]."<td>".$myrow["email"]."<td>".$myrow["info"]."<td>".$myrow["admin"];
    	 "<TD><a href=\"_view.php?id=".$myrow['id']."\"> <img src= ".$img_view." ></a>";
    	echo "<TD><a href=\"_deleteparticipant.php?id=".$myrow['id']."\"> <img src= ".$img_delete.">  </a>";
    	echo "<td><a href=\"updateparticipant.php?id=".$myrow['id']."\"> <img src= ".$img_edit.">  </a>";
    		
    	}
    	echo "</TABLE>";
    	 "<table width=\"23%\" border=\"1\" align=\"center\">
    	  <tr>
        	//<td><a href=\"_add.php\">CREATE NEW RECORD</a></td>
    	  </tr>
    	</table>";
    Thank you

  11. #11
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Code:
    echo "<TABLE BORDER=2 align=center  >";
    	echo "<TR><TD><B>Username</B><TD><B>Password</B><TD><b>Name</b><td><b>Street</b><td><b>City</b><td><b>State</b><td><b>Zip</b><td><b>Phone </B><td><b>E-Mail</b><td><b>info</b><td><b>Admin</b><TH COLSPAN=3><b>Options</b></TH>
    	</TR>";
    	while ($myrow = mysql_fetch_array($result))
    	{
    foreach ($myrow as $key => $value) {
        if ($value=='') {
            $myrow[$key] = '&nbsp;';
        }
    	echo "<TR><TD>".$myrow["username"]."<td>".$myrow ["password"]."<td>".$myrow["name"]."<td>".$myrow["street"]."<td>".$myrow["city"]."<td>".$myrow["state"]."<td>".$myrow["zip"]."<td>".$myrow["phone"]."<td>".$myrow["email"]."<td>".$myrow["info"]."<td>".$myrow["admin"];
    	// "<TD><a href=\"_view.php?id=".$myrow['id']."\"> <img src= ".$img_view." ></a>";
    	echo "<TD><a href=\"_deleteparticipant.php?id=".$myrow['id']."\"> <img src= ".$img_delete.">  </a>";
    	echo "<td><a href=\"updateparticipant.php?id=".$myrow['id']."\"> <img src= ".$img_edit.">  </a>";
    		
    	}
    	echo "</TABLE>";
    At least 98% of internet users' DNA is identical to that of chimpanzees

  12. #12
    Join Date
    Nov 2009
    Posts
    7

    resolved

    AWSOME it worked... Thank you listen this is what i did
    Code:
    foreach ($myrow as $key => $value) {
        if ($value=='') {
            $myrow[$key] = '&nbsp;';
        }
    }
    I had to add a second Closeing Bracket when i placed the code in like this
    Code:
    foreach ($myrow as $key => $value) {
        if ($value=='') {
            $myrow[$key] = '&nbsp;';
        }
    I would Get a Error

    Parse error: syntax error, unexpected $end
    in /var/www/virtual/pledges/adminparticipants.php on line 111
    THANK YOU SO MUCH for your Help have a Blessed Day

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles