Posted: Wed Jan 21, 2004 5:52 pm
Yeah, that makes sence. But from what I think ( I could be wrong ), He got a PHP book that has one of those CD's with PHP on it, and stuff. Ya know what I mean?
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
<?php
if ( isset($HTTP_POST_VARS['op2']) == false ) {
echo "The value you have passed is: ".$HTTP_POST_VARS['sel_id'];
echo "The value of op: ".$HTTP_POST_VARS['op'];
$display_block = "
<form method="post" action="$_SERVER[PHP_SELF]">
<input type="hidden" name="op2" value="add">
<input type="hidden" name="new_sel_id">
<p><input type="submit" name="submit" value="Save"></p>
</FORM>";
$HTTP_POST_VARS['new_sel_id'] = $HTTP_POST_VARS['sel_id'];
// $sel_id =
} else {
echo "The value of op: ".$HTTP_POST_VARS['op'];
echo "The value you have passed is: ".$HTTP_POST_VARS['sel_id'];
echo "The value of the new op2: ".$HTTP_POST_VARS['op2'];
echo "The value of the new_sel_id: ".$HTTP_POST_VARS['new_sel_id'];
}
?>Code: Select all
<input type="hidden" name="new_sel_id">Code: Select all
$HTTP_POST_VARS['new_sel_id'] = $HTTP_POST_VARS['sel_id'];Code: Select all
$new_sel_id = $HTTP_POST_VARS['sels_id'];Code: Select all
<?php
if ( isset($HTTP_POST_VARS['op2']) == false ) {
echo "The value you have passed is: ".$HTTP_POST_VARS['sel_id'];
echo "The value of op: ".$HTTP_POST_VARS['op'];
$display_block = "
<form method="post" action="$_SERVER[PHP_SELF]">
<input type="hidden" name="op2" value="add">
<input type="hidden" name="new_sel_id">
<p><input type="submit" name="submit" value="Save"></p>
</FORM>";
$new_sel_id = $HTTP_POST_VARS['sel_id'];
echo "new_sel_id: ".$new_sel_id;
//$HTTP_POST_VARS['new_sel_id'] = $HTTP_POST_VARS['sel_id'];
} else {
echo "new_sel_id: ".$new_sel_id;
echo "The value you have passed is:\n\n ".$HTTP_POST_VARS['sel_id'];
echo "The value of the new_sel_id: \n\n".$HTTP_POST_VARS['new_sel_id'];
}
?>Code: Select all
echo "The value of the new_sel_id: \n\n".$HTTP_POST_VARS['new_sel_id'];Code: Select all
echo "The value of the new_sel_id: \n\n".$new_sel_id;Code: Select all
<?php
if ( isset($HTTP_POST_VARS['op2']) == false ) {
echo "The value you have passed is: ".$HTTP_POST_VARS['sel_id'];
echo "The value of op: ".$HTTP_POST_VARS['op'];
$display_block = "
<form method="post" action="$_SERVER[PHP_SELF]">
<input type="hidden" name="op2" value="add">
<input type="hidden" name="new_sel_id" value=".$HTTP_POST_VARS["sel_id"].">
<p><input type="submit" name="submit" value="Save"></p>
</FORM>";
$new_sel_id = $HTTP_POST_VARS['sel_id'];
echo "new_sel_id: ".$new_sel_id;
//$HTTP_POST_VARS['new_sel_id'] = $HTTP_POST_VARS['sel_id'];
} else {
echo "new_sel_id: ".$new_sel_id;
echo "The value you have passed is:\n\n ".$HTTP_POST_VARS['sel_id'];
echo "The value of the new_sel_id: \n\n".$HTTP_POST_VARS['new_sel_id'];
}
?>Code: Select all
$new_sel_id = $HTTP_POST_VARS['sel_id'];Code: Select all
} else {Code: Select all
echo "new_sel_id: ".$new_sel_id;Code: Select all
$display_block = "
<form method="post" action="$_SERVERїPHP_SELF]">
<input type="hidden" name="op2" value="add">
<input type="hidden" name="new_sel_id" value=".$HTTP_POST_VARSї"sel_id"].">
<p><input type="submit" name="submit" value="Save"></p>
</FORM>";microthick wrote:Hi birkel,
The value is probably truncated because it is not wrapped with quotes.
From my most recent post, this is what I expect your code to look similar to:
See the line where you are defining the value for new_sel_id? Does your code list it like this:Code: Select all
$display_block = " <form method="post" action="$_SERVERїPHP_SELF]"> <input type="hidden" name="op2" value="add"> <input type="hidden" name="new_sel_id" value=".$HTTP_POST_VARSї"sel_id"]."> <p><input type="submit" name="submit" value="Save"></p> </FORM>";
<input type="hidden" name="new_sel_id" value=".$HTTP_POST_VARS["sel_id"].">
or like this:
<input type="hidden" name="new_sel_id" value=$HTTP_POST_VARS["sel_id"]>