There has been many threads and questions asking how to screw or nail a rail or PVC into plywood to hold it in place. Some people say to go from the bottom up, but i dont know what they mean so i will tell you my way.
1. First, on the rail, drill two holes the smae size. Make it big ebough for the screw to fit through the hole.
2. Next, on the top of the rail, make the hole bigger. (big enough for the head of the screw to fit through.
3. Now, get a washer that the screw can fit through. (Just for the body of the screw, not the head.) Place the washer in the rail, over the smaller hole.
4. Take your screw and put it thorugh the bigger hole on the top. Then, put it in the smaller hole and drill it in the wood. (Make sure that the washer gets in between the two holes. Drill the screw all the way in, until it gets stuck in due to the washer.
5. You can even make two smaller holes, so two screws go in, instead of one.
I hope this is helpful, and if you have any questions or better methods, post them here.