That's a good lesson to learn.
Just to comment on your statement that stocks are safer than depositing in a bank, that does not necessarily apply to all types of stock. If you want to invest in safe stock, it's best to go with blue chip companies.
These are the safest of all the stocks on the market. Time deposits are also pretty safe if you deposit in a major bank, BPI, Metrobank, BDO, etc.