edited index, main.js, testmysql.php

to generate cards