Picture Likes without a Database
up vote
1
down vote
favorite
I am working on something but currently stuck.
- 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>';
}
?>
The hard part which I really need help on is getting the likes to function.
Is there a way to go about this without using MySQL considering that fact that it doesn't requires user registration or login.
Also I am welcoming any suggestion.
I currently use PHP and JavaScript for my development
javascript php jquery mysql
add a comment |
up vote
1
down vote
favorite
I am working on something but currently stuck.
- 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>';
}
?>
The hard part which I really need help on is getting the likes to function.
Is there a way to go about this without using MySQL considering that fact that it doesn't requires user registration or login.
Also I am welcoming any suggestion.
I currently use PHP and JavaScript for my development
javascript php jquery mysql
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
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I am working on something but currently stuck.
- 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>';
}
?>
The hard part which I really need help on is getting the likes to function.
Is there a way to go about this without using MySQL considering that fact that it doesn't requires user registration or login.
Also I am welcoming any suggestion.
I currently use PHP and JavaScript for my development
javascript php jquery mysql
I am working on something but currently stuck.
- 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>';
}
?>
The hard part which I really need help on is getting the likes to function.
Is there a way to go about this without using MySQL considering that fact that it doesn't requires user registration or login.
Also I am welcoming any suggestion.
I currently use PHP and JavaScript for my development
javascript php jquery mysql
javascript php jquery mysql
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
add a comment |
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
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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