First to my files, into a php file, then to the database using the same php file.
Do you think I'd better send the data directly to the database?
Here's my php file:
include("config2.php"); //connection to the database and select the database
$card = $_POST['card'];
$card = mysqli_real_escape_string($card);
mysqli_query($db,"INSERT INTO usage (id,card_code) VALUES ($cc,$card)");