I need help from someone experienced in the transformation of tables.

I have this table:

page | user
----------------------
A | 1
A | 5
A | 7
B | 1
C | 1
C | 3
... | ...

and I need to transform it in this table:

user| A | B | C | ...
----------------------
1 | 1 | 1 | 1 | ...
3 | 0 | 0 | 1 | ...
5 | 1 | 0 | 0 | ...
7 | 1 | 0 | 0 |
... ... ... ... ...

The values of the page are approximately 50-100 and the user 1000. So i cant'n create the new table manually.
The new table must be like a dense matrix. I'm trying to make a stored procedure on MySQL but i have the problem to populate
the new table (...50 udpate where changes the attribute)
can someone help me?

Thank you.
Mario