SOLVED | just one quick question...
Moderator: General Moderators
SOLVED | just one quick question...
======================
the question:
in using the header form, let's say:
header("Location: Home.php?text=5");
then at Home.php i have a textbox with a blank value. how do i make it read the "...?textbox=5" so that it will show a value of 5 instead?
======================
things i've tried:
i've tried doing this on the textbox but it doesn't work
<input type="text" name="text" value="".$text>
or
<input type="text" name="text" value="".$_GET["text"]>
or
<input type="text" name="text" value="<?php echo $_GET["text"]; ?>">
the question:
in using the header form, let's say:
header("Location: Home.php?text=5");
then at Home.php i have a textbox with a blank value. how do i make it read the "...?textbox=5" so that it will show a value of 5 instead?
======================
things i've tried:
i've tried doing this on the textbox but it doesn't work
<input type="text" name="text" value="".$text>
or
<input type="text" name="text" value="".$_GET["text"]>
or
<input type="text" name="text" value="<?php echo $_GET["text"]; ?>">
Last edited by gothica on Fri Sep 16, 2005 12:44 am, edited 1 time in total.
Code: Select all
<input type="text" name="whatever" value="<? echo $_GET['text']; ?>">Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
are you sure the page is a PHP page? is the extention .html ?
The <? echo .. should be parsed before the HTML ever gets generated, so if you're running a PHP page on a PHP enabled webserver, then the echo should never be seen.
The <? echo .. should be parsed before the HTML ever gets generated, so if you're running a PHP page on a PHP enabled webserver, then the echo should never be seen.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
yes its a php page. actually the whole program is in php.
here's part of the code (incase you wanna check it)
here's part of the code (incase you wanna check it)
Code: Select all
<input type="text" name="meTOTAL" size="3" value = "<? echo $_GET["meTOTAL"]; ?>">' ;
//ive also tried
<input type="text" name="meTOTAL" size="3" value = "<? echo $_GET['meTOTAL']; ?>">' ;are you doing this:
This certainly would not work because the whole line is a string, and the <? echo .. ?> part is treated as a string. Unless you exited php mode before this line then the <? echo .. ?> would be parsed correctly.
If you're going for echoing the whole thing, it should be
Code: Select all
echo '<input type="text" name="meTOTAL" size="3" value = "<? echo $_GET["meTOTAL"]; ?>">' ;If you're going for echoing the whole thing, it should be
Code: Select all
echo '<input type="text" name="meTOTAL" size="3" value = "'.$_GET["meTOTAL"].'">';
//or
echo "input type=\"text\" name=\"meTOTAL\" size=\"3\" value=\"$_GET[meTOTAL]\">";that definitely worked! thanks a lot man and thanks to all those who replied!ryanlwh wrote:are you doing this:This certainly would not work because the whole line is a string, and the <? echo .. ?> part is treated as a string. Unless you exited php mode before this line then the <? echo .. ?> would be parsed correctly.Code: Select all
echo '<input type="text" name="meTOTAL" size="3" value = "<? echo $_GET["meTOTAL"]; ?>">' ;
If you're going for echoing the whole thing, it should beCode: Select all
echo '<input type="text" name="meTOTAL" size="3" value = "'.$_GET["meTOTAL"].'">'; //or echo "input type="text" name="meTOTAL" size="3" value="$_GET[meTOTAL]">";