Some XHTML validation errors I need fixed.
http://www.only-the-truth.com/
anyone have an idea of the top error.
end tag for X omitted, but OMITTAG NO was specified
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
* Line 214, column 6: end tag for "div" omitted, but OMITTAG NO was specified
</body>
* Line 214, column 6: end tag for "div" omitted, but OMITTAG NO was specified
</body>
decibel.places posted this at 05:14 — 14th December 2008.
He has: 1,494 posts
Joined: Jun 2008
Somewhere in there you forgot to close a div element with
</div>
The line number refers to the source file, not the HTML output, so check your files around line 214
For more info, you could have Googled the error - that usually tells you a lot of useful info
DSSR posted this at 14:07 — 14th December 2008.
They have: 166 posts
Joined: Mar 2006
Thanks mate, I got it ..
I have 10 errors left due to php script Im using for my request form.
I tried fixing it all day today, and searching for info, this is my last resort once again.
I found I had to add it as external, but I cant add the php inclides, because it doesnt work. The form doesnt show up.
Do you know if I can validate the final erros some how or even if its possible?
Thanks for your help, I really appreciate it, really.
http://www.only-the-truth.com/
10 errors 3 warnings.
greg posted this at 18:21 — 14th December 2008.
He has: 1,581 posts
Joined: Nov 2005
The majority of your errors are similar to the first one...
Line 115, Column 38: character "<" is the first character of a delimiter but occurred as data
Your source code shows this -
input type="hidden" name="ip" value="<?php echo $ipi ?>" />
See how it actually shows the php code in the source? It shouldn't do that, it should show the data that the variable $ipi holds.
Two issues I see with this...
1) You haven't put a semi-colon to end the php statement ";"
This:
value="<?php echo $ipi ?>" />
Should be this:
value="<?php echo $ipi; ?>" />
And this is the same for a lot of your inputs (if not perhaps all of them)
2) Are you using .php files? (.php extension rather than .html)
I couldn't find an index.php, but could find an index.html
PHP code wont run in a html file type with default server and htaccess settings, and would explain why the source code shows your actual php code/script, rather than the result of the php.
This would also explain why your php includes wouldn't work!
Fix those issues first as often one issue can cause others, then let us know and we can have another look
DSSR posted this at 19:14 — 14th December 2008.
They have: 166 posts
Joined: Mar 2006
The form works. It just won't validate.
I didnt know how else to put the form the way I wanted it without putting it into the html file. The form came from someone else. So I dont know how to fix anything pertaning it.
Thanks for your input, Ill give it a shot.
Cheers.
DSSR posted this at 19:20 — 14th December 2008.
They have: 166 posts
Joined: Mar 2006
I put those semi colons in, and now I have 19 erros instead of 10. I only changed 3 of them..Um, Im not sure what to do.
<input type="hidden" name="ip" value="<?php echo $ipi; ?>" />
<input type="hidden" name="httpref" value="<?php echo $httprefi; ?>" />
<input type="hidden" name="httpagent" value="<?php echo $httpagenti; ?>" />
Cheers.
greg posted this at 19:33 — 14th December 2008.
He has: 1,581 posts
Joined: Nov 2005
The form might seem to work ok, and send data and the email address as you expect, but it wont be sending all the data you want.
It's NOT getting my IP address, and NOT adding it to the variable
$ipi
, therefore it ISN'T sending the VALUE of that variable (my IP) along to therequestform.php
page.It's sending the PHP code.
Take for example one of your inputs from your page source.
<input type="hidden" name="ip" value="<?php echo $ipi ?>" />
All the code in your page source is HTML only, as that's all a browser can understand, so when the PHP code is done and finished on the server it sends the resulting HTML to the browser - that's your page source.
So the data/text you see there for the
value=
is how it will be sent.When the form is sent to
requestform.php
the POSTed datafor the IP (
$_POST['ip'];
) will ALWAYS be this:<?php echo $ipi ?>
Also, in your page source, I see this:
<?php
$ipi = getenv("REMOTE_ADDR");
$httprefi = getenv ("HTTP_REFERER");
$httpagenti = getenv ("HTTP_USER_AGENT");
?>
It's doing nothing in PHP. I shouldn't be able to see that.
Incidently, if
requestform.php
gets all this data from the form and sends the email on, you can instead get the IP address, referrer and user agent on that page. Save server resources as it doesn't have to send all that data in POST and you don't need the three hidden fields in your form.Which can actually be bypassed by the way. If I wanted to send you an email without you getting any IP or other data from me, I could do that easily the way you have it.
With it on the
requestform.php
page, that's not possible.greg posted this at 19:43 — 14th December 2008.
He has: 1,581 posts
Joined: Nov 2005
Follow up....
I see your contact form IS a php file (
contact.php
), and my IP and other data IS showing correctly in the form..<input type="hidden" name="ip" value="xx.xxx.xxx.xxx" />
<input type="hidden" name="httpref" value="http://www.only-the-truth.com/" />
<input type="hidden" name="httpagent" value="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4" />
(I changed my ip to xx's, but it does show my real ip correctly)
I really think your homepage (probably index.html) is NOT a PHP file.
That will resolve these issues (although you will have to obviously change any links that went to the old page name)
DSSR posted this at 20:04 — 14th December 2008.
They have: 166 posts
Joined: Mar 2006
Yes, you are correct, I changed my index.html to .php and now it works ...I get IP browser, and refer data in my email also.
But, my problem is the validation. I'm not going to worry about the other stuff because Im just too daft to understand it. Sorry to make you write all that.
I just need the erros fixed and Im set.
Thanks for all your time mate, I appreciate it.
greg posted this at 20:31 — 14th December 2008.
He has: 1,581 posts
Joined: Nov 2005
Don't worry about anything else, it's not important. I just pointed it out as I noticed it while debugging
The issue is with XHTML strict, it doesn't allow inline elements to be immediate children of things like
<form>
.So you need to add a block-level element, such as
<p>
or<fieldset>
So something like
<p>Your Email:</p>
<fieldset>
<input type="text" name="visitormail" size="35" />
</fieldset>
And in your css file (common.css) create a new class for the styling for the fieldsets as required
I would guess the minimum you want is
border: 0;
DSSR posted this at 20:53 — 14th December 2008.
They have: 166 posts
Joined: Mar 2006
Thing is, I don't know CSS either, but you know what, Ill give it a go I sorta understand what you mean. You're a great help mate, thanks a lot.
Be back soon.
greg posted this at 21:14 — 14th December 2008.
He has: 1,581 posts
Joined: Nov 2005
That's fine. The basics of CSS is really easy, and (if you have time) reading a brief guide is worthwhile even if you only tinker with a site now and then.
If you want to learn, this is a great tutorial
http://www.tizag.com/cssT/
Take you about an hour or so to read through it. Then refer back to it for the few things you need, like adding classes http://www.tizag.com/cssT/class.php
Use the following code to make it validate
It's only a quick fix though and as you have an external stylesheet you should be adding a CSS class to that to be used in the fieldset rather than like I have inline (style=)
Under this:
<!-- DO NOT change ANY of the php sections -->
Add This
<fieldset style="border: 0;">
Then under this
<input type="submit" value="Request Drop Shippers" />
<br />
<br />
Add this
</fieldset>
Then (hopefully) you can check with W3C Validator and see that green bar that brings a sigh of relief and feeling of accomplishment!
DSSR posted this at 22:47 — 14th December 2008.
They have: 166 posts
Joined: Mar 2006
Oh WOW!, it worked :DDDDD...You're a genius....
WOOOOOHOOOOOO......
ITS GREEN, ITS ALL GREEN BABBBBBAAAYYY.....
Ah, I dont know how to thank you man....maybe 10$ paypal if that's not an insult to you
Cheers bud...
My head is now free and clear.....
greg posted this at 23:41 — 14th December 2008.
He has: 1,581 posts
Joined: Nov 2005
Glad I could help!
If you get stuck again, with anything, just shout.
decibel.places posted this at 00:10 — 15th December 2008.
He has: 1,494 posts
Joined: Jun 2008
Another TWF success story - Yay team !
DSSR posted this at 02:41 — 15th December 2008.
They have: 166 posts
Joined: Mar 2006
THank you too dec, I appreciate it ...
You know, tbh, I tried for nearly 3 months to figure this out, and last resort was to come back here since I know, and for FREE, that you have the best service around..Better than Experts Exchange, and they charge.....
Thanks once again for the best service ever!...
Cheers
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.