I have a problem, and I can not correct myself with the help of a friend.
The basic thing is that I am trying to do this, call a PHP script with 2 arguments: username
and subscriptionid
.
The PHP script should read "User" by a user named "User", then user ID by user name, in another table, called subscriptionlog
, check what the user id is and If so, see that he has an entry with subscriptionid
. If so, print the "status" variable of that table.
Heres my code:
& lt ;? Php // checkkey.php? User = ZeD & subid = 2 - & gt; Called as $ ServerName = "localhost"; $ Username = "username"; $ Password = "password"; $ Dbname = "database"; $ Uname = $ _GET ["user"]; $ Subid = $ _GET ["subid"]; // Create connection $ conn = new mysqli ($ servername, $ username, $ password, $ dbname); // Check connection if ($ conn- & gt; connect_error) {dead ("Connection failed:". $ Conn-> connect_error); } $ Sql ??= "Subscription in the Selection Position where subscriptionid = $ subid and userid = (user user name WHERE user name = $ uname)"; $ Result = mysqli_query ($ sql); If ($ result === incorrect) echo ("error with bitch SQL"); While ($ line = mysqli_fetch_assoc ($ result)) {echo $ line ["status"]; } $ Conn- & gt; Close (); ? & Gt;
It just leaves the page blank, there is no echo at all.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.