Game Development Community

What am i doing wrong?

by Paul Griffiths · in General Discussion · 05/24/2006 (9:22 pm) · 5 replies

I'm trying to 'post' to a website using code below:

%newsc.post($HTTPHostMainServer, %NewsHTTPPath @ "authenticate.php?username=" @ MainServerLogInUsername.getText(), "", %newsc);

and on the php server side I'm just testing for now and am using:

print $_POST['username'];



but it isn't working. If i use this though, it does:

print $_GET['username'];


I want to use 'post' not 'get' for obvious security reasons.
anyone got any ideas what i'm doing wrong? I'm using a standard apache server with php5.

#1
05/25/2006 (1:00 am)
I have got it working by turning on register_globals in php.ini on my apache server which isnt that safe.
Any ideas why i have to do this?
#2
05/25/2006 (7:10 am)
As $_POST is a superglobal it should be available but please visit the php site for information as this isn't torque related.
#3
05/25/2006 (7:13 am)
Try $var = $HTTP_POST_VAR['username'];

then insure it is set

if(!isSet($var)) return ;
#4
05/25/2006 (8:09 am)
Anthony, ill tryyour idea, thanks.

Another question, how to you post 2 variables because this does not work but it's easy to understand what i'm trying to do.

%newsc.post($HTTPHostMainServer, %NewsHTTPPath @ "authenticate.php", "username=" @ MainServerLogInUsername.getText() @ "&password=" @ MainServerLogInPassword.getText(), %newsc);
#5
05/25/2006 (10:42 am)
Quote:Think the forum's gone bit weard?
The duplicate posts were caused by you refreshing the page immediately after adding a post. You should have the option to delete them via the "trashcan" icon.

If you are waiting around for a reply, leave the thread (and optionally re-enter it) before refreshing.