Jump to content

HTML validation errors related to unique form id's that don't appear unique.


Snot

Recommended Posts

My Site has 19 html validation errors related to the unique id's on a number of form's.

 

I'm just getting my feet wet with php and mysql so a friend helped me setup the forms. When I got them they were all their own page. I didn't want to have so many pages so I used css and some basic php to put them include all the files on my index.php. So now the validation is failing.

 

Is there anything I should do to fix this or is it just a false error from my layout?

 

Here is a link to the site if you want to see what i've down with the layout.

www.wararmada.com/tdb

 

The error page

http://validator.w3.org/check?uri=http%3A%2F%2Fwww.wararmada.com%2FTDB%2F&charset=%28detect+automatically%29&doctype=Inline&ss=1&outline=1&group=1&No200=1&verbose=1&user-agent=W3C_Validator%2F1.2

 

I wasn't sure if having more than one unique id on the "same" page would cause any problems with how the forms work.

 

Thanks for any advice and help you can give me.

Link to comment
Share on other sites

I think the reason they are the same is because I have one form will one day add stuff to a database and another that will search it.  I think its because they are using the criteria. Will changing these id's mess any of that up?

 

 

Link to comment
Share on other sites

I think the reason they are the same is because I have one form will one day add stuff to a database and another that will search it.  I think its because they are using the criteria. Will changing these id's mess any of that up?

 

an ID is just like a passport, you only have one and it's bound to 1 specific person. So never use an ID twice. use a class if it is to define a general style.

Link to comment
Share on other sites

I think the reason they are the same is because I have one form will one day add stuff to a database and another that will search it.  I think its because they are using the criteria. Will changing these id's mess any of that up?

 

It shouldn't - the id attribute isn't used in server-side form processing.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.