SA-MP Forums Archive
How to get the HTT_POST in php? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to get the HTT_POST in php? (/showthread.php?tid=642240)



How to get the HTT_POST in php? - AndreiWow - 26.09.2017

I mean, it is $_POST['fieldname'] for a form for example, but at samp we have

PHP код:
HTTP(playeridHTTP_POST"kc.gd/hello.php"POST_DATA_HERE"MyHttpResponse"); 
For example if I want to send a string:

PHP код:
new string[10] = mystring
Do I use it like this:
PHP код:
HTTP(playeridHTTP_POST"kc.gd/hello.php"string"MyHttpResponse"); 
And if yes, how do I get the string in php? $_POST['string'] ? I assume this won't work because instead of the variable I can just write "some string".


Re: How to get the HTT_POST in php? - jlalt - 26.09.2017

PHP / HTTP post string syntax is: var1=value1&var2=value2&var3=value3

and yes you should get it by php $_POST['var'] method.

if you pass a normal string php will just simple don't get / load it properly.