Page 1 of 1
Form Error Styling Attempt
Posted: Thu Sep 01, 2005 6:09 pm
by obi_wasabi
Code: Select all
if(strlen($fm_firstname)>0){
$fm_firstname=stripslashes($fm_firstname);
}else{//If no name was entered.
$fm_firstname=NULL;
include('./index.php');
echo '<label for="fm_firstname" class="error">First name:</label>';
}
The label element is echoed to the recalled index page, but, appears at the beginning of the html, I was hoping the echoed element would overwrite the current. What is my misunderstanding, and how is it corrected?
http://ckimedia.com/php_version/index.php
This is a clean version. The site is a one page, the user will be scrolled to the individual sections, via a dom script, hope this helps.
Posted: Thu Sep 01, 2005 7:37 pm
by feyd
I'm going to guess the index.php file creates some variables or something and the output is done afterward in the script?
Posted: Thu Sep 01, 2005 8:21 pm
by obi_wasabi
feyd wrote:I'm going to guess the index.php file creates some variables or something and the output is done afterward in the script?
Simply plain xhtml/css.
I getting the feeling the index page and form have to be generated by php?
Posted: Thu Sep 01, 2005 8:30 pm
by feyd
If you want to be able to change the contents of it, yes, in some fashion.
Posted: Thu Sep 01, 2005 8:59 pm
by obi_wasabi
feyd wrote:If you want to be able to change the contents of it, yes, in some fashion.
Hi,
Thanks, I'll break the form down into a php include, and carry on from there. I'll be in touch.