A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Devil in my Server

  1. #1
    Junior Member
    Join Date
    Mar 2012
    Posts
    13

    Devil in my Server

    Why is this happening?

    I have this code in my php...

    PHP Code:
    $abs_usrstr=mysql_query("SELECT * FROM glist WHERE guest='$_POST[g]'");
                    while(
    $row mysql_fetch_array($abs_usrstr)){
                    
                        if(
    $row['privmsg']==$_POST['writemsg']){
                            if(
    mysql_query("UPDATE glist SET privmsg='-empty-' WHERE guest='$_POST[g]'")){
                            echo 
    "isclear=done";
                            }else{
                            echo 
    "isclear=fail1";    
                            }
                        }else{
                            echo 
    "isclear=fail2 ::".$row['privmsg']."---".$_POST['writemsg'];
                            
                        }
                    } 

    Actionscript:
    PHP Code:
    var mailclear = new LoadVars();
    mailclear.onLoad = function(suc) {
        if (
    suc) {
    output.text=this.isclear;
    }
    }
    mailclear.gusers;
    mailclear.writemsg inboxmsghistory;
    mailclear.sendAndLoad("myphp.php",mailclear,"POST"); 

    Output:
    fail2 ::
    <PMS>tom<br/>(2012-04-02 00:18:20)</PMS>hey, whats up---
    <PMS>tom<br/>(2012-04-02 00:18:20)</PMS>hey, whats up

    As you can see, the conditional statement in my php returns FALSE even if the two strings are equal
    Last edited by blitzy007; 04-02-2012 at 02:58 AM.

  2. #2
    Registered User
    Join Date
    Feb 2001
    Posts
    13,041
    Hi,

    to be absolutely sure they are the same, I would probably add another --- after the second variable

    Musicman

  3. #3
    Junior Member
    Join Date
    Mar 2012
    Posts
    13
    thanks musicman. Now i see an extra blank space at the end of second variable.
    But I dont understand how it came? I used a trace function inside my flash file before sending the variable to php, and it doesn't show any blank space in.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center