PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 25th, 2013, 05:38 PM
WaxyChicken WaxyChicken is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 5 WaxyChicken User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 33 m 6 sec
Reputation Power: 0
Help - Ghost in the machine

Alright, here's the deal:

i wrote a couple of scripts and have them output HTML.

but it's ALSO outputting HTML that I DO NOT tell it to do.
i can't find the problem.

First the main .php :

Code:
<?php
include 'CheckLogin.php';

?>

<html>
	<head>
		<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
		<title>GetMiPi - Register</title>

	</head>



<?php

include 'topmenu.php';

include 'startpielist.php';

//Connecting to your database
$Con = mysql_connect($hostnameCon, $usernameCon, $passwordCon);
mysql_select_db($dbnameCon); 
	$sql = mysql_query("SELECT * FROM PIES WHERE Owner = '$username'") or die(mysql_error());
	while ($query_row = mysql_fetch_array($sql))
	{
		$pieID = $query_row['ID'];
		$pieOwner = $query_row['Owner'];
		$pieKind = $query_row['Kind'];
		$pieBaked = $query_row['Baked'];
		$pieCHEK  = $query_row['CHEK'];
		include 'PieList.php';

	}
?>
													
						


The "topmenu.php" :
Code:
<?php

?>

<body
 style="color: rgb(0, 0, 0); background-color: rgb(148, 164, 68);"
 alink="#006600" link="#6666cc" vlink="#3366ff">
<big><big><big></big></big></big>
<div style="text-align: center;">
<table
 style="text-align: center; margin-left: auto; margin-right: auto; background-color: rgb(255, 255, 204); width: 100%; height: 49px;"
 border="4" cellpadding="2" cellspacing="2">
  <tbody>
    <tr>
      <td
 style="background-color: rgb(255, 255, 204); text-align: center; vertical-align: top;"><big><big><big><span
 style="font-weight: bold;"><a
 href="http://www.getmipi.com/FAQ.html">FAQ</a>
&nbsp; &nbsp; <a href="http://getmipi.com/forums/">FORUMS</a>
&nbsp; &nbsp; <a href="http://getmipi.com/Contact.html">CONTACT</a>
&nbsp; &nbsp; <a href="http://getmipi.com/Media/Media.html">MEDIA</a></span></big></big></big><br>
      </td>
    </tr>
  </tbody>
</table>
</div>


next: "StartPieList.PHP"

Code:
<?php
// start pie table
?>
<------- start of pie list header ------>
<table style="width: 800px; height: 560px; text-align: left; margin-left: auto; margin-right: auto;" border="4" 

cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="vertical-align: top; text-align: center; background-color: rgb(153, 153, 255);">
<div style="text-align: left;">
<br>
<table style="background-color: rgb(255, 255, 204); width: 700px; height: 131px; text-align: left; margin-left: auto; 

margin-right: auto;" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="width: 50px; text-align: left; vertical-align: middle;">
</td>
<--- End of pie list header  ---->
<?php

// end start of pie table


and now: "PieList.php"

Code:
<?php

?>

<--- Start Pie List --->
<table style="background-color: rgb(255, 255, 204); width: 700px; height: 131px; text-align: left; margin-left: auto; 

margin-right: auto;" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="width: 50px; text-align: left; vertical-align: middle;">
<img style="width: 79px; height: 45px;" alt="" src="

<x=$pieimgx>

" hspace="10" align="middle"> </td>
<td>
 <br><div style="text-align: center;"><big>

ID:<?=$pieID?>

<BR>
Owner:<?=$pieOwner?>

<BR>
Kind:<?=$pieKind?>

<BR>
Baked:<?=$pieBaked?>

<BR>
CHEK:<?=$pieCHEK?>

<BR>
</big> </div>
 </td>
</tr>
</tbody>
</table>
<--- END Pie List --->

<BR>

<?php

?>


but here is the output (excerpting only the effected part):

Code:
<------- start of pie list header ------>
<table style="width: 800px; height: 560px; text-align: left; margin-left: auto; margin-right: auto;" border="4" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="vertical-align: top; text-align: center; background-color: rgb(153, 153, 255);">
<div style="text-align: left;">
<br>

<--- End of pie list header  ---->

<--- Start Pie List --->
<table style="background-color: rgb(255, 255, 204); width: 700px; height: 131px; text-align: left; margin-left: auto; margin-right: auto;" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="width: 50px; text-align: left; vertical-align: middle;">
</td></tr></tbody></table><table style="background-color: rgb(255, 255, 204); width: 700px; height: 131px; text-align: left; margin-left: auto; margin-right: auto;" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="width: 50px; text-align: left; vertical-align: middle;">
<img style="width: 79px; height: 45px;" alt="" src="%0A%0A%3Cx=$pieimgx%3E%0A%0A" hspace="10" align="middle"> </td>
<td>
 <br><div style="text-align: center;"><big>

ID:2
<br>
Owner:WaxyChicken
<br>
Kind:PIE
<br>
Baked:0000-00-00 00:00:00
<br>
CHEK:BLANK
<br>
</big> </div>
 </td>
</tr>
</tbody>
</table>
<--- END Pie List --->

<br>


<--- Start Pie List --->
<table style="background-color: rgb(255, 255, 204); width: 700px; height: 131px; text-align: left; margin-left: auto; margin-right: auto;" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="width: 50px; text-align: left; vertical-align: middle;">
<img style="width: 79px; height: 45px;" alt="" src="%0A%0A%3Cx=$pieimgx%3E%0A%0A" hspace="10" align="middle"> </td>
<td>
 <br><div style="text-align: center;"><big>

ID:3
<br>
Owner:WaxyChicken
<br>
Kind:CowPie
<br>
Baked:0000-00-00 00:00:00
<br>
CHEK:BLANK
<br>
</big> </div>
 </td>
</tr>
</tbody>
</table>
<--- END Pie List --->

 


You will notice that the first "<--- Start Pie List --->" has extra close tags in it for table and a few other things. But i cannot find what it's coming from.
I have found that if i exclude the "StartPieList.php" then the problem is resolved, but that also removes the intended layout.



As for all the frekystuff ( playing with the ?> and <?php , adding in <----StartPieList etc....) i was seeing if that was the problem and was also trying to narrow down the cause. those 2 basic elements are not the cause of the problem.

Reply With Quote
  #2  
Old February 25th, 2013, 05:40 PM
WaxyChicken WaxyChicken is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 5 WaxyChicken User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 33 m 6 sec
Reputation Power: 0
the screenshot isn't going through. Apparently bots are better at Capcha's than i am.

but a screenshot is available here:

img29.imageshack.us/img29/7857/ghostjd.png

Reply With Quote
  #3  
Old February 26th, 2013, 03:31 PM
hdewantara's Avatar
hdewantara hdewantara is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2009
Location: Jakarta, Indonesia.
Posts: 149 hdewantara User rank is Sergeant Major (2000 - 5000 Reputation Level)hdewantara User rank is Sergeant Major (2000 - 5000 Reputation Level)hdewantara User rank is Sergeant Major (2000 - 5000 Reputation Level)hdewantara User rank is Sergeant Major (2000 - 5000 Reputation Level)hdewantara User rank is Sergeant Major (2000 - 5000 Reputation Level)hdewantara User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Day 18 h 50 m 40 sec
Reputation Power: 30
Send a message via MSN to hdewantara
One extra <?php near <--- End of pie list header ----> ?
If not, then try Notepadd++ softw. to find any missing pairs

Reply With Quote
  #4  
Old February 26th, 2013, 07:46 PM
WaxyChicken WaxyChicken is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 5 WaxyChicken User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 33 m 6 sec
Reputation Power: 0
Quote:
Originally Posted by hdewantara
One extra <?php near <--- End of pie list header ----> ?
If not, then try Notepadd++ softw. to find any missing pairs


No. that was part of me trying different header/footers to find out if that could be effecting it.

and that doesn't explain where the automatically closing tags are coming from.

Reply With Quote
  #5  
Old February 26th, 2013, 11:32 PM
WaxyChicken WaxyChicken is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 5 WaxyChicken User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 33 m 6 sec
Reputation Power: 0
.


does PHP ever automatically close HTML tags?

Quote:
I have found that if i exclude the "StartPieList.php" then the problem is resolved, but that also removes the intended layout.

Reply With Quote
  #6  
Old February 27th, 2013, 04:52 AM
ptr2void ptr2void is offline
I haz teh codez!
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Dec 2003
Posts: 2,477 ptr2void User rank is General 18th Grade (Above 100000 Reputation Level)ptr2void User rank is General 18th Grade (Above 100000 Reputation Level)ptr2void User rank is General 18th Grade (Above 100000 Reputation Level)ptr2void User rank is General 18th Grade (Above 100000 Reputation Level)ptr2void User rank is General 18th Grade (Above 100000 Reputation Level)ptr2void User rank is General 18th Grade (Above 100000 Reputation Level)ptr2void User rank is General 18th Grade (Above 100000 Reputation Level)ptr2void User rank is General 18th Grade (Above 100000 Reputation Level)ptr2void User rank is General 18th Grade (Above 100000 Reputation Level)ptr2void User rank is General 18th Grade (Above 100000 Reputation Level)ptr2void User rank is General 18th Grade (Above 100000 Reputation Level)ptr2void User rank is General 18th Grade (Above 100000 Reputation Level)ptr2void User rank is General 18th Grade (Above 100000 Reputation Level)ptr2void User rank is General 18th Grade (Above 100000 Reputation Level)ptr2void User rank is General 18th Grade (Above 100000 Reputation Level)ptr2void User rank is General 18th Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 2 Days 7 h 35 m 10 sec
Reputation Power: 2194
Quote:
Originally Posted by WaxyChicken
.


does PHP ever automatically close HTML tags?


No. Browsers might.
__________________
I ♥ ManiacDan & requinix

This is a sig, and not necessarily a comment on the OP:
Please don't be a help vampire!

Reply With Quote
  #7  
Old February 27th, 2013, 06:04 PM
WaxyChicken WaxyChicken is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 5 WaxyChicken User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 33 m 6 sec
Reputation Power: 0
Quote:
Originally Posted by ptr2void
No. Browsers might.


but i doubt that firefox would close tags before the page even finishes loading.

Reply With Quote
  #8  
Old February 28th, 2013, 08:17 AM
ManiacDan's Avatar
ManiacDan ManiacDan is offline
Likely to be eaten by a grue.
Dev Shed God 10th Plane (9500 - 9999 posts)
 
Join Date: Oct 2006
Location: Pennsylvania, USA
Posts: 9,811 ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)  Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 2 Months 3 Weeks 19 h 13 m 52 sec
Reputation Power: 6112
Firefox does its best with bad HTML. This is bad HTML.

Code:
<img style="width: 79px; height: 45px;" alt="" src="

<x=$pieimgx>

" hspace="10" align="middle">
Why is your image source the string "<x=$pieimgx>" with 2 newlines on either side? Did you maybe mean for this to be a <?php ?> tag?
__________________
HEY! YOU! Read the New User Guide and Forum Rules

"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

"The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.

Reply With Quote
  #9  
Old February 28th, 2013, 08:37 AM
Aurum84 Aurum84 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2012
Posts: 74 Aurum84 User rank is Sergeant (500 - 2000 Reputation Level)Aurum84 User rank is Sergeant (500 - 2000 Reputation Level)Aurum84 User rank is Sergeant (500 - 2000 Reputation Level)Aurum84 User rank is Sergeant (500 - 2000 Reputation Level)Aurum84 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 3 Days 23 h 5 m 49 sec
Reputation Power: 17
* add a doctype
* move css to an external file
* replace deprecated elements
* use proper opening and closing tags
* switch to UTF-8

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > Help - Ghost in the machine

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap