Joke Collection Website - Talk about mood - How to write the code of ASP website to realize praise function
How to write the code of ASP website to realize praise function
Tell me about the principle, for example, you should add a praise function to the article.
add a field to the article list for praise.
Then add a button to the article page, like it, and ASP will handle it. Just add 1 to the article like field of this ID. . .
simple implementation <; %' database, read out the article %>
< %=rs ("article content, etc.") %>
< a? href="like.asp? id=< %=rs ("the article ID read above")% > " > Like <; /a>
like.asp
< % database connected with
id=request("id")
update? table? set? Like field = like field +1? where? id="& Id
judgment success/error
If no refresh is needed, then cooperate with JS? AJAX can do it.
- Previous article:In case of danger, the drone will come to the rescue.
- Next article:Solve misunderstandings and return to good sentences.
- Related articles
- Who knows which chapter is the origin of the legendary swordsman's exorcism sword spectrum and sunflower collection?
- Sentences describing plans that can't keep up with changes
- What does the mental health self-test method include?
- Tanabata single dog said.
- Love story: If you can live freely, you will inevitably suffer loneliness and sadness.
- Qq, talk about poetry.
- Tell me how to write my heartfelt composition, grade five.
- Writing humor at work is suitable for sending 20 sentences in a circle of friends.
- Introduce STC89c52 in detail. Talk about the difference between it and 5 1, and the characteristics and advantages of STC series single chip microcomputer, preferably a little more.
- How to convince a person with extreme thoughts?