GET 24/7 LIVE HELP NOW

Announcement

Announcement Module
Collapse
No announcement yet.

Problem getting data back from MySQL

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem getting data back from MySQL

    Maybe I will stumble upon my problem again today but I am pretty stumped on this one. I have a series of "textareas" that writes fine to my DB...but it fails to display in my .php file. Here is a snippet of code:




    if($row['Collab'] == ""){echo"

    Collaboration:

    ";
    }else{
    $Collab[$i] = $row['Collab'];echo"

    Collaboration:

    ";
    }




    And the from the _db file:




    $EXT = $_POST[EXT];
    $Collab = $_POST[Collab];
    $WSR = $_POST[WSR];
    $AWIPS = $_POST[AWIPS];
    $Other = $_POST[Other];
    $Misc = $_POST[Misc];
    $Backup = $_POST[Backup];
    $dateString = $year."-".$month."-".$day;
    $dbhost=$_SERVER['DB_HOST'];
    $strConn=@mysql_connect($dbhost,"*******","******" );
    mysql_select_db("shift_duties",$strConn);
    $table="A_shift_duties";

    mysql_query("UPDATE $table SET `month`='$month',`day`='$day',`year`='$year',`LT`= '$LT',`ST` ='$ST',`HMT`='$HMT',`Sick`='$Sick',`Annual`='$Annu al',`Comp` ='$Comp',`OT`='$OT',`AFD`='$AFD',`CCF`='$CCF',`ZFP `='$ZFP',` ZON`='$ZON',`PFM`='$PFM',`AFM`='$AFM',`HWO`='$HWO' ,`FWF`='$F WF',`FWL`='$FWL',`RFI`='$RFI',`RFD`='$RFD',`WXStor y`='$WXSto ry',`RWSKS`='$RWSKS',`SendNDFD`='$SendNDFD',`EXT`= '$EXT',`Co llab`='$Collab',`WSR`='$WSR',`AWIPS`='$AWIPS',`Oth er`='$Othe r',`Misc`='$Misc',`Backup`='$Backup' WHERE `date`='$dateString'") or die (mysql_error());
    ?>





    I have several other "text" boxes that work fine.

    Any help would be appreciated.
    DS

  • #2
    Problem solved. Had to rearrange some things in my html/php code.

    Comment

    Working...
    X