开发者

check for the correct data in mysql with php

开发者 https://www.devze.com 2023-03-21 15:20 出处:网络
I have a wordpress theme that i\'m trying to add some minor security to (prevention from stealing (torrenting, other il开发者_如何学编程legal download methods)).

I have a wordpress theme that i'm trying to add some minor security to (prevention from stealing (torrenting, other il开发者_如何学编程legal download methods)).

It's not the best way to prevent the matter but it's a start i guess.

What I'm trying to do is get PHP to hop into a database and check if there are certain values in certain fields. If there are, the server can finish processing the rest of the script. If the data is not correct in the database, a short message will explain the matter and so on.

Now i'm pretty sure this is going to include the "if" function but i have no idea how to get php to just check (not fetch) for the data.


What if you query db with where clause and then check number of rows against your query. If you found number of rows greater than 0 . Then you may proceed otherwise use PHP exit function to stop processing


PHP isn't compiled, so anyone will always be able to view the source and remove any PHP you put in to prevent illegal distribution. Unfortunately, protecting web work is basically impossible.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号