I am currently making a “welcome/walkthrough” for new users who join my website.
Initially they will be greeted by recent/top uploads that they can like which will help my website find images they would like for them. But my question is what is the best way of letting users select what they like or not? Currently i have this.
I hope you can get a grasp on what i am trying to achieve here, but if not, to sum it up,
User clicks (n) amount of images to like -> clicks continue -> page grabs all images that have been liked and sends them to a file which adds to my database.
the easiest way given your code would be something like “on next page button” see what images were chosen by the user and send their name via ajax to a php page that will check it on a database to add them:
on the PHP page you will retrieve the
$_POST['images'], split the variables via explode(‘,’ $_POST[‘images’]) and then cicle through the array to check/add it to the database viaforeachlittle suggestion: you should use id to create “unique” images and show it on the page, to make it easier to “check/add” them on the database. Using unique numeric index instead of text compare is faster and gives more reliability.