Entering the credit card number in the text box and doing a form POST (not GET) - is OK in case of SSL. The POSTed data gets encrypted, so it is safe.
Displaying it on the HTML page directly is not safe. SSL only encrypts the HTML through the network layer. When it reaches the browser, it is decrypted and displayed. Hence, the page might get stored in the browser's cache. Very very unsafe.
Actually, it is a good practice to also blank the credit card number text box as soon as the user enters his credit card number. (You can read it into a hidden variable and blank the actual text box. This is because usually submit takes some time and if the user leaves the system, etc. the number can still not be retrieved, since it is kept in memory!)
About keeping in database - ABSOLUTELY NOT! Most unsafe. And if as a user of your website I know that this is happening, I will never transact on your site again! :)
However, certain business logic requires credit card numbers to be stored in database. One of my friend had done this since there was a credit option when the user gives his cc number and the cc is actually charged only at a later date. But to my knowledge he had implemented this by using a very complex custom algorithm!!
But suggest that unless business requires it (and don't give me the business reason that you don't want user to enter each time - it is not trouble for the user to enter 16 digits, it is highly risky for him to leave it with you :) ), NO NO NO to storing in database.
Best Regards
Vadivel
MVP ASP/ASP.NET
http://vadivel.thinkingms.com