PHP Update not working with smartfox???

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

poppop
Posts: 57
Joined: 07 Jul 2007, 10:24

PHP Update not working with smartfox???

Postby poppop » 02 Feb 2008, 22:43

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.
poppop
Posts: 57
Joined: 07 Jul 2007, 10:24

Postby poppop » 02 Feb 2008, 23:43

-- 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 :)
angelos
Posts: 18
Joined: 09 Jan 2008, 14:24

Postby angelos » 03 Feb 2008, 09:10

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

Return to “Server Side Extension Development”

Who is online

Users browsing this forum: No registered users and 3 guests