PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 12th, 2012, 11:20 AM
gleison_gomes gleison_gomes is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 5 gleison_gomes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 m 15 sec
Reputation Power: 0
PHP-General - PHP x Flash

Hi, guys!
I have a system developed in PHP and Flash. It is divided into layers (MVC). I'm facing the following issue: the form, which is done in Flash, sends data to PHP via POST. I threw an exception printing what is coming from the form. When I click "Save" the data come black. As what I filled out the form remains on the screen, if I click again on "Save" the data are sent normally.

What can it be? Anyone got a light?

Thanks in advance!

Reply With Quote
  #2  
Old December 12th, 2012, 12:03 PM
requinix's Avatar
requinix requinix is offline
Still alive
Click here for more information.
 
Join Date: Mar 2007
Location: Washington, USA
Posts: 12,702 requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)  Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 5 Months 1 Week 4 Days 5 h 32 m 15 sec
Reputation Power: 8969
Send a message via AIM to requinix Send a message via MSN to requinix Send a message via Yahoo to requinix Send a message via Google Talk to requinix
Once the data goes black it'll never come back.

Maybe it's just me but I don't get that description. Got some code to show us?
Comments on this post
aeternus agrees: I read somewhere "once you go black you never go back" seems this is debunked

Reply With Quote
  #3  
Old December 12th, 2012, 12:13 PM
gleison_gomes gleison_gomes is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 5 gleison_gomes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 m 15 sec
Reputation Power: 0
Sorry,
mistyping: "blank". :-)

In the Flash form:
Servidor.sendAndLoad("Servidor.php?p1&p2&p3&ck=" + new Date().getTime(), Mensagem);

In the integration between Flash and PHP (php page):
$matricula = trim($_POST['Matricula']);

It's simple, but when I do this:
try
{
throw new Exception('Identificador: '. $_POST['Identificador'] . 'Mat: ' . $_POST['Matricula'] . 'Nome: ' . $_POST['Nome']);
}
catch(Exception $ex)
{
$mensagem = 'Erro='.urlencode($ex->getMessage());
echo die($mensagem);
}

The POST fields come blank at the first time and filled out in the second time on... weird...

Reply With Quote
  #4  
Old December 12th, 2012, 01:23 PM
E-Oreo's Avatar
E-Oreo E-Oreo is offline
Lost in code
Click here for more information.
 
Join Date: Dec 2004
Posts: 7,939 E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)  Folding Points: 945 Folding Title: Novice Folder
Time spent in forums: 2 Months 9 h 12 m 42 sec
Reputation Power: 7053
Pull out a network monitoring tool like Firebug (not sure if that works on Flash) or Fiddler and examine the actual requests that are being sent to see what data is being included in the request. If I had to guess I would say this is not a problem with your PHP code, but something on the client side.
Comments on this post
msteudel agrees: Yes Firebug and Chome Developer network tabs work with flash
__________________
PHP FAQ
How to program a basic, secure login system using PHP

Quote:
Originally Posted by Spad
Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around

Reply With Quote
  #5  
Old December 14th, 2012, 11:02 AM
gleison_gomes gleison_gomes is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 5 gleison_gomes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 m 15 sec
Reputation Power: 0
I used the Chrome Developer Tools and I saw that the data is being sent normally... I wonder if it's a problem in Apache server...

Reply With Quote
  #6  
Old December 14th, 2012, 01:58 PM
E-Oreo's Avatar
E-Oreo E-Oreo is offline
Lost in code
Click here for more information.
 
Join Date: Dec 2004
Posts: 7,939 E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)  Folding Points: 945 Folding Title: Novice Folder
Time spent in forums: 2 Months 9 h 12 m 42 sec
Reputation Power: 7053
Are you working with large quantities of data?

Reply With Quote
  #7  
Old December 14th, 2012, 07:39 PM
gleison_gomes gleison_gomes is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 5 gleison_gomes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 m 15 sec
Reputation Power: 0
No, it's a little amount of data.

It seems to be a source-code issue. I think I'm getting close to the solution...

Reply With Quote
  #8  
Old January 8th, 2013, 10:18 AM
gleison_gomes gleison_gomes is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 5 gleison_gomes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 m 15 sec
Reputation Power: 0
Hi, guys!
It was a code issue. Thanks!

However, now the application only works in Chrome. In IE it's random. Every other time, it works. Does anyone know what can be the cause of that intermittency of IE?

Thanks!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > PHP-General - PHP x Flash

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap