|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
why i can not transfer value via web pages
in test1.htm
<form action="test2.php" method="get"> <input type="text" name="t1">..... ...... </form> in test2.php <p>you write: <?=$_get['t1']?> </p> But i can not get any value what i input. I am a newer for PHP. Anyone can reply me? Cheers! |
|
#2
|
|||
|
|||
|
Try..
in test2.php <p>you write: <? echo $_get['t1']; ?> </p> |
|
#3
|
|||
|
|||
|
If that doesnt work try this:
PHP Code:
|
|
#4
|
|||
|
|||
|
$_GET must be ALL CAPS.
And for the record, <?= is shorthand for <?php echo It's very useful for when you want a quick in-n-out of PHP just to display one value. Last edited by avit : July 10th, 2003 at 02:23 AM. |
|
#5
|
|||
|
|||
|
Thank you all:
I tried, but i can not run properly yet. Why.......... |
|
#6
|
|||
|
|||
|
I assume that you have a submit button in your form? (It's just that I don't see it in your example)
Otherwise, it should work. What do you get in your output? Does it just show nothing? Make sure you check your capitalization: PHP Code:
|
|
#7
|
||||
|
||||
|
First off it might not be working correctly because of the way you have your php file started...
try this for test2.php PHP Code:
Also, make ksure that t1's capitolization is correct, if it's T1 in your code and through the header in the url, then it'll need to be T1 in the $_GET['T1'] portion of your code Hope this helps |
|
#8
|
|||
|
|||
|
Quote:
You should be careful with this though... Not all server configurations are setup to accept the shorthanded method, which is why it's always recommended to use the long version (not really long since it's 2 extra characters). TO ensure portability, use the longhanded version...
__________________
____________________________________________ Developer Shed Weekly Writer | DevArticles Forum Moderator Build Your Own KlipFolio Klip With PHP FrankManno.com - Under Construction Design Interactive Group - Under Construction |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > why i can not transfer value via web pages |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|