0

I have been working on a registration form for a website. The form gets user data, validates it and adds it to mysql database. For user to avoid sending data again I have used header redirection method. It redirects to the same page with additional variables. I have included the form in the index page. This works fine except for some additional reasons. The index page has div element in which entire page is included. The form redirects until the div element doesn't have style attrib set. I can't understand the problem. Is this a CSS issue? Please help.

1
  • 4
    We cannot help you just from this vague description. You have not adequately described the problem (what does happen after submitting the form? why is this wrong? what is the expected result?). Once we have that, we need to examine your code to determine why that is the case, but you've provided no code. Commented Dec 10, 2010 at 9:48

2 Answers 2

2

You should look that there is no html ouput before you user header()

Sign up to request clarification or add additional context in comments.

4 Comments

The code works fine when there is no style attribute set for a div element. what could ne the possible cause
Do you use inline css or do you have an extra file for css?
You cannot issue a header('Location: ####') command after outputting anything. Even a single space outputted will prevent the the redirect from working. If you have output a div - with or without a style attribute - then you won't be able to redirect. It's hard to give any more help without seeing your code.
@Sanket, Sarah & Mr_Chimp are correct, this is the reason it is not redirecting. How are you outputting the style? Are you sure it's not before the header is sent?
2

and be curefull from the BOM of UTF-8

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.