Jump to content

Form Headach


mc_keny

Recommended Posts

bless peeps....iam good at php, sql and wml...am changing out ma site in to xhtml...but i keep getting error when i validate the page

<p> <form action="index.xhtml" method="get"[colour=red]>[/colour]</form></p>

but if i remove the P validation become successful ??

Link to comment
Share on other sites

<form> is a Block level tag that does not require to be inside another tag.And <p> is an inline tag, so it should not contain a Block level Form tag. That is where the error is coming from.

Link to comment
Share on other sites

<?xml version="1.0" encoding="utf-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="application/vnd.wap.xhtml+xml; charset=utf-8"/><!--h--><link rel="stylesheet" type="text/css" href="css.css"/><title>Mobi Space</title></head><body><?php echo "<p align=\"center\">";echo "<small>welcome to the greatest online community, where you can meet and make new friends. </small><br/>";echo "<img src=\"mc_fire.gif\" alt=\"*\" /><br/></p>";echo "<form action=\"index.xhtml\" method=\"get\"><p><br/>"; echo "User Name:<br/> <input name=\"luid\" type=\"text\" value=\"mckeny\"/><br/>";echo "Password:<br/>"; echo "<input name=\"lpwd\" type=\"password\" value=\"mad\"/><br/><br/>"; echo "<input name=\"ldt\" type=\"submit\" value=\"Submit\"/><br/>";echo "</p></form>";?></body></html>

all this coding is valid but when i put it in a index.php http://mobispace.cogia.net it say something is wrong with page...on some browser....on opera in says remote server not found...but if i put it in a index.xhtml file and type in that url it shows ok...

Link to comment
Share on other sites

The XML declaration is probably messing the browsers up, as PHP documents are served with content-type:text/html. You can call header() to change the content type to application/xhtml+xml, but IE doesn't understand this.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...