SitePoint Sponsor |
|
User Tag List
Results 1 to 10 of 10
Thread: why wont $_POST['name'] echo?
-
Jun 12, 2006, 02:28 #1
- Join Date
- Sep 2005
- Location
- Zurconion Soon!
- Posts
- 1,549
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
why wont $_POST['name'] echo?
Why dont this work?
PHP Code:<?php echo("$_POST['name]");?>
PHP Code:<?
////////
$_POST['name'] = "Susy";
/////////
?>
-
Jun 12, 2006, 02:31 #2
- Join Date
- Aug 2004
- Location
- Manchester UK
- Posts
- 13,807
- Mentioned
- 158 Post(s)
- Tagged
- 3 Thread(s)
syntax
PHP Code:<?php echo $_POST['name']; ?>
Spike
Edit:
With it being a $_POST array it HAS to be sent via a form and can't have the value assigned to it as you have....
Mike Swiffin - Community Team Advisor
Only a woman can read between the lines of a one word answer.....
-
Jun 12, 2006, 02:32 #3
Try just using this for your echo
PHP Code:echo $_POST['name'];
-
Jun 12, 2006, 02:33 #4
- Join Date
- Sep 2005
- Location
- Zurconion Soon!
- Posts
- 1,549
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
hm nothin shows up for it
but i dont get errors, it has value
-
Jun 12, 2006, 02:34 #5
- Join Date
- Sep 2005
- Location
- Zurconion Soon!
- Posts
- 1,549
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
oh thru a form? dang.
i guess ill have to make a name variable for extra
-
Jun 12, 2006, 02:34 #6
- Join Date
- Aug 2004
- Location
- Manchester UK
- Posts
- 13,807
- Mentioned
- 158 Post(s)
- Tagged
- 3 Thread(s)
Did you read my edit btw?
If it still isn't playing, post your code that recieves the form inputMike Swiffin - Community Team Advisor
Only a woman can read between the lines of a one word answer.....
-
Jun 12, 2006, 02:35 #7
- Join Date
- Feb 2005
- Location
- Universum, 3rd Corner
- Posts
- 3,000
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
You are getting it from form, right?
-- Jelena --
-
Jun 12, 2006, 02:35 #8
- Join Date
- Sep 2005
- Location
- Zurconion Soon!
- Posts
- 1,549
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
oh it works i had the PHP code above the string, i didnt think that mattered :[
Yeah from a form.
I didnt know it has to be above, php doesnt relate to the entire doc?
-
Jun 12, 2006, 02:36 #9
- Join Date
- Aug 2004
- Location
- Manchester UK
- Posts
- 13,807
- Mentioned
- 158 Post(s)
- Tagged
- 3 Thread(s)
oops
Mike Swiffin - Community Team Advisor
Only a woman can read between the lines of a one word answer.....
-
Jun 12, 2006, 02:41 #10
- Join Date
- Sep 2005
- Location
- Zurconion Soon!
- Posts
- 1,549
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
thamnks for yall help, this php stuff is hard for me to learn cuz im bad at thinking lol
Bookmarks