I'm making a like button - I can't use a SQL database because my data isn't stored in a database, so I'm thinking I can edit a PHP file when someone clicks on it. I want to do it without reloading the page, so here's what I'm thinking:
$likeFile = fopen("likes.php", [I'm not sure whether or not to put here]) fwrite($likeFile, + 1) fclose($likeFile)
Only problem, I don't know how to add 1 to the variable, or select the variable at all. Image of the clap button Image of the clap variable (each one represents a page) Image of the clap html (like.php contains HTML for the clap, likes.php contains the variables)
1.4m articles
1.4m replys
5 comments
57.0k users