私には小さな形があります:
//GET the unit and community id
$UNIT = $_GET['unit'];
$COMID = $_GET['comid'];
...//i have echoed $UNIT and $COMID to ensure that they do have values
...
<form action="ModifyNoteScript.php" method="post" />
<input name="Comment" type="hidden" value="<?php echo $Comment; ?>" />
<input name="UNIT" type="hidden" value="<?php echo $UNIT; ?>" />
<input name="COMID" type="hidden" value="<?php echo $COMID; ?>" />
<textarea name="Comment" cols="55" rows="6" class="text1" id="Comment"><?php echo $Comment; ?>
</textarea>
<br />
<input type="submit" name="sendnotify" class="formbutton" id="Submit" value="Replace previous note with current" />
</form>
これだよ:
ご覧のとおり、変数comment
を設定していますtextarea
問題なく次のページModifyNoteScript.phpに渡されます。
ただし、他の2つの変数UNIT
とCOMID
、何らかの理由で次のように渡されます。[blanks]
ModifiedNoteScript.phpは次のようになります。
<?php
include '../Check.php';
include '../CustomConnect.php';
$UNIT= $_POST['unit'];
$COMID= $_POST['comid'];
$NOTE= $_POST['Comment'];
$comment_update = mssql_query("UPDATE pmp_property__unit
SET
comments = '$NOTE'
WHERE
communityidy='$COMID' and
unit='$UNIT'")
or die ("Changes to Record could not be Saved.");
?>
これらの2つの変数がブランクとして渡されるのはなぜですか?