If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

Convert from "form" to "div"

Hi

I have a registry page with a number of box fields and placed the text labels above each one of them with position:absolute, which does not work well

I found another way of doing what I wanted: placing the text labels above the field boxes. However, I now have a big problem and don't know how to get round it. My form was based on
<form method="post" action="./database.php">

and I have just realized that "form" and "div" don't go together. Is there a quick way of converting from form to div so that the database.php gets the correct information? What I added to the css file works well. Or could it be that I have to ger div classes withing the css for each form field?

When I submit the form I get error messages for the four fields that I changed to div as if no input went into them.

regarding Sunfighter's code, let me be more specific: I have a form.php; a database.php (both with html code) and a register.css.

The first bit of code you wrote seems to indicate that I do not have to change the code. But where fo I put the php code? At the momemnt that sort of code is in my database.php which works very well getting the data and placing it in the dartabase table. Do I have to do anything to that file?

Let me show you the bits in database.php that are involved in 'username'

I think I got it. I changed the username fields as Sunfighter suggested and the while process works.

However, the whiole idea of changing to this method was to get the text labels on top of the box fields. Before I porsted I had managed that but the page was not working. Now it is working by«ut the two boxes that were side by side are now on different levels...

I'm using the code that sunfighter gave me (see below) and it got ther page working fine, except that the fields are all over the place. I've now finished converting all of them and found the problem, which is solved.

But now I still have problems not knowuing how to apply this code to the select function for country

Sunfighter, I am very grateful to you as the page is now working well, and I've sorted out the boxes, except the one about countries (Select) which I would be grateful if you could throw some light on what to do.

Thanks, it's worked for the select but now all the other field went into one below the other, even though I did not touch anything... I'm losong all my hairs. Any ideas, please?have a look at the page.

It has centered the boxes which was the next thing I wanted to do, but from the country down, once I changed the select all the boxes are not paired.

Before you sorted out the country select, 'website' which is the only one that is not supposed to be paired was strangely on the right when I though everything was floated left. Since sorting out the 'country' all boxes seem to go along with whatever is placing 'website' to the right

I found the problem: there was a </div> missing at the end of the countries.

Now the last proble is the fact that 'website is at the right. It should be centered. I'll try <center>