thank you so much man, you helped me create a favorite button for my website. you explained everything so well, god we need more people like you. you earned my respect and admiration!
Hi! Good tutorial! I have just one question... I don't know why when i put this line of code "$row->liked_by = $row->liked_by ? explode('|', $row->liked_by) : [];" the whole program stop working, it sends me the next error message "Parse error: syntax error, unexpected '[' in /home/canifarm/public_html/Noticias/Principal/Likes/index.php on line 24" I've looked for that error but i can´t find the answer, could you help me?
question - in your insert into articles_likes code (in like.php), how would you structure the INSERT statement if you had more variables to save? I want to save the date and time. After LIMIT 1 I added a comma and NOW() to get the date/time but it doesn't add the vote or date/time. If I remove it then it works.
I've got a problem using the SQL statement in like.php with PDO (prepare() and bindValue()). Could you give any advice on this? Do these {brackets} play any role in the SELECT statement?
My code is not working...its allowing d same user to like d same post multiple times..i hv also checked it inserts multiple records in d DB for when the same user likes d same post...how do i correct this? please help... thanks
what if i want the user not to be assigned? $_SESSION['user_id'] = (int)1; what i mean is if i have a login page and i want the userd id of the logged in person to be the one being processed instead of the (int)1?? HELP PLEASE
+joseph aniversario Umm.... That will happen in the login page as you check for the username and pass and if you do have a match in your database then you literally write $_SESSION['user_id'] = ( The id from the database) you can find out more on codecourse 's registration tutorial
Even more and more awesome! I've been programming for two years maybe, but that query really confused me! Can you create dynamic favicon that shows if you have new message? And show the count of them. I know how to add string to image, but i have no idea how to add background to that string.
This is really cool! Maybe there should be something like _"Liked!"_ after you've liked the article, but that's just a detail :-) Thanks for the tutorial! ,-)) Btw. 2:22 _"...because obviously some idiots might try to do this"_ bhahaha!
Thanks Alex , it works for me . Can you please create another video for an unlike method if an user wants to unlike an article if he changes his mind or does`nt like it any more ? And it will be perfect to have a max limit of displayed users that liked an article
grigorios charam The session ID is there so it can be implemented into an existing authentication system. Building an authentication system just to demonstrate a like button would be a waste of your time :)
thank you so much man, you helped me create a favorite button for my website. you explained everything so well, god we need more people like you. you earned my respect and admiration!
"some idiots would do this" - hahaa! Good one, Alex!
Hi I have this error when running the code Fatal error: Call to a member function fetch_object() on boolean please help
there is a problem,
every time I click on the like button it is re-loading the whole page.
which is taking me back to the top of the page. :-(
Did u get any solution of it plz tell i m in same prblm??
Hi! Good tutorial!
I have just one question... I don't know why when i put this line of code "$row->liked_by = $row->liked_by ? explode('|', $row->liked_by) : [];" the whole program stop working, it sends me the next error message "Parse error: syntax error, unexpected '[' in /home/canifarm/public_html/Noticias/Principal/Likes/index.php on line 24"
I've looked for that error but i can´t find the answer, could you help me?
question - in your insert into articles_likes code (in like.php), how would you structure the INSERT statement if you had more variables to save? I want to save the date and time. After LIMIT 1 I added a comma and NOW() to get the date/time but it doesn't add the vote or date/time. If I remove it then it works.
I've got a problem using the SQL statement in like.php with PDO (prepare() and bindValue()). Could you give any advice on this? Do these {brackets} play any role in the SELECT statement?
My code is not working...its allowing d same user to like d same post multiple times..i hv also checked it inserts multiple records in d DB for when the same user likes d same post...how do i correct this?
please help...
thanks
que idolo muchisimas gracias!! me cuesta el english jajaj pero lo pude hacer.. muy buen videoo🤗🤗🤗🤗🤗
Hi #Codesource, how to i echo image instead of article title if i already stored images in database in blob form?
You probably won't respond since this video is 2 years old but how did u add the motion blur to your mouse cursor when recording this ?
im having a problem when i try to get the number of likes that are on post the query gives false it is from the count i dont know why
Can you make an 'unlike' tutorial stemming from this one?
Truly exceptional!
I liked this video just because your mysql practice. Would you make a video for best mysql practices? :]
Can anyone show me how to make these tables used in this video through the command line?
what if i want the user not to be assigned?
$_SESSION['user_id'] = (int)1;
what i mean is if i have a login page and i want the userd id of the logged in person to be the one being processed instead of the (int)1?? HELP PLEASE
+joseph aniversario Umm.... That will happen in the login page as you check for the username and pass and if you do have a match in your database then you literally write $_SESSION['user_id'] = ( The id from the database) you can find out more on codecourse 's registration tutorial
Even more and more awesome! I've been programming for two years maybe, but that query really confused me!
Can you create dynamic favicon that shows if you have new message? And show the count of them. I know how to add string to image, but i have no idea how to add background to that string.
This is really cool! Maybe there should be something like _"Liked!"_ after you've liked the article, but that's just a detail :-) Thanks for the tutorial! ,-))
Btw. 2:22 _"...because obviously some idiots might try to do this"_ bhahaha!
Instead of "liked" it could be "unlike" :)
Djangokillen But that's out of this tutorial, I think he just wanted to focus on the like thing.
Can you make this with unlike system?
how can i delete my like?
Thanks Alex , it works for me .
Can you please create another video for an unlike method if an user wants to unlike an article if he changes his mind or does`nt like it any more ?
And it will be perfect to have a max limit of displayed users that liked an article
Hi Codecourse, please can you make a video on creating a twitter follow system using PHP?
He works with the ip of the users or by creating a session user ??
It could be via js/jquery to update without sending a get / post request
Thanks, I've noted down to create a video with this.
+Codecourse can you give me a link if you maked it?
Is there anyway I can download the php code for this?
+Official BitHumor
www.codecourse.com/library/lessons/create-a-php-like-button/create-a-php-like-button
From were I can download the ready files?
+Yoan Burski
www.codecourse.com/library/lessons/create-a-php-like-button/create-a-php-like-button
Hey alex, can you do a tutorial on bootstrap maybe? Great vid as always, going to use this for my image sharing project!0
link to download please?
The query is a riddle o me!
Can we do this using jquery
Create a PHP Like Button
what program do you use for database?
+Future Banger - Future House
It's Sequel Pro available only on Mac OS X.
Ada orang Indonesia kah?
Thanks man :D
Awesome video!
Which database did you use?
MySQL.
alex, please create a laravel e-commerce playlist
Great!!!!
Man.. that was fun! xD
Woo! Glad you found it so :)
this application without session and ip address it's non userful
grigorios charam The session ID is there so it can be implemented into an existing authentication system. Building an authentication system just to demonstrate a like button would be a waste of your time :)
Could you please make a "How to install and use Glyphicons"?
Cause this is what everyone has now a day!
Please like, so he gonna see it?
Thanks for the suggestion - this is actually already on our roadmap!
Yeah! Thanks alot, mate! I seriously love you/your tutorial channel! =) #NoHomo
I need a good coder to my website, would you be interested to help me? Of course you will get some money, for it! :)
***** im looking forward too. :)
Awesome,very good (y)
Thanks!