Hi
I am writing a php script that contains a bunch of links. Each link when clicked redirects to the same page however where the clicked link once was is now a textfield. The user then types into the text field once the user has entered input the page redirects to itself again this time where the text field was is a link again. The link is wutever the user typed into the previous text field. I am doing this by using $_REQUEST[....] to get wutever the user types in. So far Ive only been able to get one of these to work. The problem I am having is when the user clicks another link after the process is completed the previous process's variable is erased and the default link is outputted. Can someone help me with this problemF? I am posting a piece of my script.
Thanks
[PHP]$outer_link1 = "<a href=\"?Expand= outer_link1\" >outer_link1</a>";
if ($_REQUEST['Expand'] == "outer_link 1")
{
$TextField1 = "<input type=text name=outer1 onChange='submi t();' ";
echo("<td>$Text Field1</td>");
}
else
{
$outer_link1_co ntents= $_REQUEST['outer1'];
if ($outer_link1_c ontents)
{
$outer_link1a = "<a href=\"?Expand= outer_link1\" >$outer_link1_c ontents</a>";
echo("<td>$oute r_link1a</td>");
}
else
{
echo("<td>$oute r_link1</td>");
}
}
$outer_link2 = "<a href=\"?Expand2 =outer_link2\" >outer_link2</a>";
if ($_REQUEST['Expand2'] == "outer_link 2")
{
$outer_link1_co ntents= $_REQUEST['outer1'];
if ($outer_link1_c ontents)
{
$outer_link1a = "<a href=\"?Expand= outer_link1\" >$outer_link1_c ontents</a>";
echo("<td>$oute r_link1a</td>");
}
else
{
echo("<td>$oute r_link1</td>");
}
$TextField2 = "<input type=text name=outer2 onChange='submi t();' ";
echo("<td>$Text Field2</td>");
}
else
{
$outer_link2_co ntents= $_GET['outer2'];
if ($outer_link2_c ontents)
{
$outer_link2a = "<a href=\"?Expand2 =outer_link2\" >$outer_link2_c ontents</a>";
echo("$outer_li nk2a");
}
else
{
echo("<td>$oute r_link2</td>");
}
} [/PHP]
I am writing a php script that contains a bunch of links. Each link when clicked redirects to the same page however where the clicked link once was is now a textfield. The user then types into the text field once the user has entered input the page redirects to itself again this time where the text field was is a link again. The link is wutever the user typed into the previous text field. I am doing this by using $_REQUEST[....] to get wutever the user types in. So far Ive only been able to get one of these to work. The problem I am having is when the user clicks another link after the process is completed the previous process's variable is erased and the default link is outputted. Can someone help me with this problemF? I am posting a piece of my script.
Thanks
[PHP]$outer_link1 = "<a href=\"?Expand= outer_link1\" >outer_link1</a>";
if ($_REQUEST['Expand'] == "outer_link 1")
{
$TextField1 = "<input type=text name=outer1 onChange='submi t();' ";
echo("<td>$Text Field1</td>");
}
else
{
$outer_link1_co ntents= $_REQUEST['outer1'];
if ($outer_link1_c ontents)
{
$outer_link1a = "<a href=\"?Expand= outer_link1\" >$outer_link1_c ontents</a>";
echo("<td>$oute r_link1a</td>");
}
else
{
echo("<td>$oute r_link1</td>");
}
}
$outer_link2 = "<a href=\"?Expand2 =outer_link2\" >outer_link2</a>";
if ($_REQUEST['Expand2'] == "outer_link 2")
{
$outer_link1_co ntents= $_REQUEST['outer1'];
if ($outer_link1_c ontents)
{
$outer_link1a = "<a href=\"?Expand= outer_link1\" >$outer_link1_c ontents</a>";
echo("<td>$oute r_link1a</td>");
}
else
{
echo("<td>$oute r_link1</td>");
}
$TextField2 = "<input type=text name=outer2 onChange='submi t();' ";
echo("<td>$Text Field2</td>");
}
else
{
$outer_link2_co ntents= $_GET['outer2'];
if ($outer_link2_c ontents)
{
$outer_link2a = "<a href=\"?Expand2 =outer_link2\" >$outer_link2_c ontents</a>";
echo("$outer_li nk2a");
}
else
{
echo("<td>$oute r_link2</td>");
}
} [/PHP]
Comment