• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

[SOLVED] Item Store with SOAP

Status
Not open for further replies.

Tok124

Respected Member
Hello,

I am making a Item Store on my website with SOAP so when you buy item the item will be sent ingame to the players mailbox and dp will reduce.
That is working with my script. However, If i have 0 DP (Value NULL) in account table and then i buy item then the item is still sent ingame and value for column dp is still NULL. How can i add an error text so that if the value is not reduced it will display "Sorry, You don't have enough points" or something?

 
Last edited:

Hyperion

Founder
Eww soap :p

You would need another SQL query checking against the price of the item, then slap in an IF statement checking if it's true
You dont need session_start() btw, not needed for POST and GET and you can just use 'account' as the table name
since you already have it connecting to $authdb in your mysqli connection

Why not the RA route?
 

Tok124

Respected Member
Eww soap :p

You would need another SQL query checking against the price of the item, then slap in an IF statement checking if it's true
You dont need session_start() btw, not needed for POST and GET and you can just use 'account' as the table name
since you already have it connecting to $authdb in your mysqli connection

Why not the RA route?
I do need session_start(); because i use $_SESSION['username'] for the account name in the update query. Ah yeah, I know that i don't need to use auth.account it's enough with just account because i included database name in the mysql connection. But i was including another table in another database before in the query so then i needed to use auth.account and i forgot to remove that :p

And the reason why i don't use RA is because i never used it before. I know nothing about RA :p

And yeah, I was expecting that i would need to add a SELECT Query aswell. But i have not figured out how to do it properly yet.

I am trying with this


But it's not working properly. For some reason it reduces my dp by 30 but the value from the input is 10
 
Last edited:
Status
Not open for further replies.
Top