Picture Likes without a Database











up vote
1
down vote

favorite












I am working on something but currently stuck.




  1. I want to display images from a directory which I was able to do with PHP code


<?php
foreach(glob('img/lookbok/*/{*.jpg,*.jpeg}',GLOB_BRACE) as $img){
echo '
<div class="col s12 m6 l4">
<div class="card hoverable">
<div class="card-image">
<img src="'.$img.'" class="materialboxed responsive-img" alt="" data-caption="Send message on Whatsapp for price">
<a href="" class="halfway-fab btn-floating pink pulse">
<i class="material-icons">favorite</i>
</a>
</div>
<i class="like tiny pink-text material-icons thumbsup prefix " >thumb_up</i><span id="like">0 likes</span>
<div class="card-action">
<a href="https://wa.me/23480120276442" target="_blank"><i class="fab fa-whatsapp pink-text text-darken-1"> Chat for prices</i> </a>
</div>
</div>
</div>';
}
?>




enter image description here



The hard part which I really need help on is getting the likes to function.




  1. Is there a way to go about this without using MySQL considering that fact that it doesn't requires user registration or login.


  2. Also I am welcoming any suggestion.
    I currently use PHP and JavaScript for my development











share|improve this question




















  • 7




    You won't be able to build this without some sort of Database/Central storage of some sort.
    – Luca Kiebel
    Nov 19 at 10:08










  • You could use external software if you do not wish to use a Database, for example, creating a Python/Java/C# emulator which you can then use Sockets to store and collect data but I'm pretty sure just using a Database is 10x faster
    – Jaquarh
    Nov 19 at 10:11












  • even if your users do not have to register, you still could use the database for storing image information and likes. You can use sqlite as well if mysql seems to be to much overhead. Or even use text files which stores the likes per image.
    – Olli
    Nov 19 at 10:51










  • You can store likes in image EXIF metadata if readwrite access to images is possible.
    – Yuri Lachin
    Nov 19 at 11:45















up vote
1
down vote

favorite












I am working on something but currently stuck.




  1. I want to display images from a directory which I was able to do with PHP code


<?php
foreach(glob('img/lookbok/*/{*.jpg,*.jpeg}',GLOB_BRACE) as $img){
echo '
<div class="col s12 m6 l4">
<div class="card hoverable">
<div class="card-image">
<img src="'.$img.'" class="materialboxed responsive-img" alt="" data-caption="Send message on Whatsapp for price">
<a href="" class="halfway-fab btn-floating pink pulse">
<i class="material-icons">favorite</i>
</a>
</div>
<i class="like tiny pink-text material-icons thumbsup prefix " >thumb_up</i><span id="like">0 likes</span>
<div class="card-action">
<a href="https://wa.me/23480120276442" target="_blank"><i class="fab fa-whatsapp pink-text text-darken-1"> Chat for prices</i> </a>
</div>
</div>
</div>';
}
?>




enter image description here



The hard part which I really need help on is getting the likes to function.




  1. Is there a way to go about this without using MySQL considering that fact that it doesn't requires user registration or login.


  2. Also I am welcoming any suggestion.
    I currently use PHP and JavaScript for my development











share|improve this question




















  • 7




    You won't be able to build this without some sort of Database/Central storage of some sort.
    – Luca Kiebel
    Nov 19 at 10:08










  • You could use external software if you do not wish to use a Database, for example, creating a Python/Java/C# emulator which you can then use Sockets to store and collect data but I'm pretty sure just using a Database is 10x faster
    – Jaquarh
    Nov 19 at 10:11












  • even if your users do not have to register, you still could use the database for storing image information and likes. You can use sqlite as well if mysql seems to be to much overhead. Or even use text files which stores the likes per image.
    – Olli
    Nov 19 at 10:51










  • You can store likes in image EXIF metadata if readwrite access to images is possible.
    – Yuri Lachin
    Nov 19 at 11:45













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I am working on something but currently stuck.




  1. I want to display images from a directory which I was able to do with PHP code


<?php
foreach(glob('img/lookbok/*/{*.jpg,*.jpeg}',GLOB_BRACE) as $img){
echo '
<div class="col s12 m6 l4">
<div class="card hoverable">
<div class="card-image">
<img src="'.$img.'" class="materialboxed responsive-img" alt="" data-caption="Send message on Whatsapp for price">
<a href="" class="halfway-fab btn-floating pink pulse">
<i class="material-icons">favorite</i>
</a>
</div>
<i class="like tiny pink-text material-icons thumbsup prefix " >thumb_up</i><span id="like">0 likes</span>
<div class="card-action">
<a href="https://wa.me/23480120276442" target="_blank"><i class="fab fa-whatsapp pink-text text-darken-1"> Chat for prices</i> </a>
</div>
</div>
</div>';
}
?>




enter image description here



The hard part which I really need help on is getting the likes to function.




  1. Is there a way to go about this without using MySQL considering that fact that it doesn't requires user registration or login.


  2. Also I am welcoming any suggestion.
    I currently use PHP and JavaScript for my development











share|improve this question















I am working on something but currently stuck.




  1. I want to display images from a directory which I was able to do with PHP code


<?php
foreach(glob('img/lookbok/*/{*.jpg,*.jpeg}',GLOB_BRACE) as $img){
echo '
<div class="col s12 m6 l4">
<div class="card hoverable">
<div class="card-image">
<img src="'.$img.'" class="materialboxed responsive-img" alt="" data-caption="Send message on Whatsapp for price">
<a href="" class="halfway-fab btn-floating pink pulse">
<i class="material-icons">favorite</i>
</a>
</div>
<i class="like tiny pink-text material-icons thumbsup prefix " >thumb_up</i><span id="like">0 likes</span>
<div class="card-action">
<a href="https://wa.me/23480120276442" target="_blank"><i class="fab fa-whatsapp pink-text text-darken-1"> Chat for prices</i> </a>
</div>
</div>
</div>';
}
?>




enter image description here



The hard part which I really need help on is getting the likes to function.




  1. Is there a way to go about this without using MySQL considering that fact that it doesn't requires user registration or login.


  2. Also I am welcoming any suggestion.
    I currently use PHP and JavaScript for my development








javascript php jquery mysql






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 19 at 10:18









Nick

20.9k61434




20.9k61434










asked Nov 19 at 10:05









Destiny Alabi

286




286








  • 7




    You won't be able to build this without some sort of Database/Central storage of some sort.
    – Luca Kiebel
    Nov 19 at 10:08










  • You could use external software if you do not wish to use a Database, for example, creating a Python/Java/C# emulator which you can then use Sockets to store and collect data but I'm pretty sure just using a Database is 10x faster
    – Jaquarh
    Nov 19 at 10:11












  • even if your users do not have to register, you still could use the database for storing image information and likes. You can use sqlite as well if mysql seems to be to much overhead. Or even use text files which stores the likes per image.
    – Olli
    Nov 19 at 10:51










  • You can store likes in image EXIF metadata if readwrite access to images is possible.
    – Yuri Lachin
    Nov 19 at 11:45














  • 7




    You won't be able to build this without some sort of Database/Central storage of some sort.
    – Luca Kiebel
    Nov 19 at 10:08










  • You could use external software if you do not wish to use a Database, for example, creating a Python/Java/C# emulator which you can then use Sockets to store and collect data but I'm pretty sure just using a Database is 10x faster
    – Jaquarh
    Nov 19 at 10:11












  • even if your users do not have to register, you still could use the database for storing image information and likes. You can use sqlite as well if mysql seems to be to much overhead. Or even use text files which stores the likes per image.
    – Olli
    Nov 19 at 10:51










  • You can store likes in image EXIF metadata if readwrite access to images is possible.
    – Yuri Lachin
    Nov 19 at 11:45








7




7




You won't be able to build this without some sort of Database/Central storage of some sort.
– Luca Kiebel
Nov 19 at 10:08




You won't be able to build this without some sort of Database/Central storage of some sort.
– Luca Kiebel
Nov 19 at 10:08












You could use external software if you do not wish to use a Database, for example, creating a Python/Java/C# emulator which you can then use Sockets to store and collect data but I'm pretty sure just using a Database is 10x faster
– Jaquarh
Nov 19 at 10:11






You could use external software if you do not wish to use a Database, for example, creating a Python/Java/C# emulator which you can then use Sockets to store and collect data but I'm pretty sure just using a Database is 10x faster
– Jaquarh
Nov 19 at 10:11














even if your users do not have to register, you still could use the database for storing image information and likes. You can use sqlite as well if mysql seems to be to much overhead. Or even use text files which stores the likes per image.
– Olli
Nov 19 at 10:51




even if your users do not have to register, you still could use the database for storing image information and likes. You can use sqlite as well if mysql seems to be to much overhead. Or even use text files which stores the likes per image.
– Olli
Nov 19 at 10:51












You can store likes in image EXIF metadata if readwrite access to images is possible.
– Yuri Lachin
Nov 19 at 11:45




You can store likes in image EXIF metadata if readwrite access to images is possible.
– Yuri Lachin
Nov 19 at 11:45

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53372286%2fpicture-likes-without-a-database%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53372286%2fpicture-likes-without-a-database%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

If I really need a card on my start hand, how many mulligans make sense? [duplicate]

Alcedinidae

Can an atomic nucleus contain both particles and antiparticles? [duplicate]