Skip to main content
Known Participant
June 3, 2011
Question

blank page redirection

  • June 3, 2011
  • 1 reply
  • 1917 views

I have a login form, but if the fields are empty or wrong, it clears the whole page so it is blank.  here is my code for the page: http://pastebin.com/jmrHuBkv.

i think that it may be the connection after i start the session... am i right?

This topic has been closed for replies.

1 reply

David_Powers
Inspiring
June 3, 2011

It's because you have blank lines outside the PHP tags in your code before the call to header(). See the following article for an explanation: http://kb2.adobe.com/community/publishing/505/cpsid_50572.html.

The reason you're getting a blank page is probably because display_errors is turned off on your server (good for security, but makes it difficult to troubleshoot errors). See Why is my PHP page blank? in the Dreamweaver FAQ.

Also, please do not start a new thread for the same issue. The link to your code should have been posted in the original thread.

Known Participant
June 3, 2011

hm, ok; what is a good developer tool to use for php?  is eclipse a good, basic one?

David_Powers
Inspiring
June 4, 2011

Dreamweaver is a good development tool for PHP, particularly if you're using CS5 or CS5.5, because it has full code hinting for all functions and classes in PHP 5.2 (CS5) or 5.3 (CS5.5). It also offers autocompletion of variables and syntax checking.

Other than Dreamweaver, you could use PDT, which is Eclipse-based and free. Alternatively, Zend Studio 8.0.1 is excellent, but expensive. PhpED is also very good, although I haven't used it for a long time. There's also PHPEdit, which I have never tried.

It doesn't matter which editor you use for working with PHP, the most important element is your understanding of the language. Unfortunately, a lot of people are misled by the ease with which Dreamweaver server behaviors create a simple login system and database-driven pages. So, they expect to be able to do everything by clicking options in dialog boxes. I know that you're making the effort to write your own code, or at least to adapt the basic code created by Dreamweaver. That's excellent. Switching to a different PHP editor won't give you a wider range of pre-baked code. In fact, it won't give you any at all.

Learning how to use PHP takes time and effort. With the right attitude, the more you do, the better you will become. I've been using PHP for more than 11 years, so I find it easy to solve a lot of problems. But I remember that it was a long, hard slog at the beginning. Keep at it, and you'll get there in the end.