Page 1 of 1

PHP Update not working with smartfox???

Posted: 02 Feb 2008, 22:43
by poppop
Hi Lapo,

I seem to be having a strange problem.

I'm using Smartfox server side file to post a variable to a PHP page.

Now, the SELECT statments work fine. -- It reads from the database, and posts it back to the client side app.

BUT an UPDATE statment will not work.

My code is a standard MYSQL UPDATE in PHP.

I am using $name = $_POST['name'];

and to make sure it isnt my PHP code, when i change it to $_GET['name'] -- just to test it in the browser, it updates the database fine. It only dosnt work when i use post with smartfox.

I dont understand why it isnt working. As smartfox shouldnt have anything to do with the insert statment.

Any advice on what might be going on would be great.

As i say, the code works fine just in a browser, so its not the php, it has to to have somthing to do with smartfox or the way flash works with sendAndLoad.


Many thanks.

Posted: 02 Feb 2008, 23:43
by poppop
-- UPDATE:

Right, it seems that the UPDATE statment works, when the server side AS file, dosnt need to return anything to the client.

I dont understand this, as the PHP file has nothing to do with the flash part once it has been sent the variables with sendAndLoad

How would the PHP file know??

So if i remove this:

_server.sendResponse(response, -1, null, [user]);

The UPDATE statments in the php file work fine.

I basiclly cannot tell the client that anything has happened.

But i've worked a way around it.

It would be great to hear a real solution to this though.

Many thanks :)

Posted: 03 Feb 2008, 09:10
by angelos
hah i really don't know what is the problem..... but if u know the source where u get codes for AS and flash and PHP.... tell it pls