•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 426,024 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,703 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 4369 | Replies: 2 | Solved
![]() |
•
•
Join Date: Jan 2005
Posts: 13
Reputation:
Rep Power: 4
Solved Threads: 0
Have a look at the following code. It is the only thing in the file...the following variables are defined outside the php file:
When post data to this php file the value from the "first_name" field is printed - as shown above in the first print statement. However, the SAME data should be located in the $_POST array correct? So when I try to print the value (secont print statement) why does it show up blank? Nothing is there.
Any ideas?
Thanks,
JameZ
- $required
- $first_name
require_once("config.php");
if ($required)
{
$require = explode(",",$required);
for($n=0; $n<count($require); $n++);
{
$field = $require[$n];
print $first_name;
print $_POST[$first_name];
}
}When post data to this php file the value from the "first_name" field is printed - as shown above in the first print statement. However, the SAME data should be located in the $_POST array correct? So when I try to print the value (secont print statement) why does it show up blank? Nothing is there.
Any ideas?
Thanks,
JameZ
•
•
Join Date: Sep 2004
Location: in the j00-kay
Posts: 114
Reputation:
Rep Power: 5
Solved Threads: 5
try print $_POST['first_name'];
I'm pink, therefore, im spam.
http://www.vivaci.net - Quality Webhosting
http://gaming.vivaci.net - FAST UK Gaming servers
http://www.getsigned.org - Free Image Uploads
http://www.vivaci.net - Quality Webhosting
http://gaming.vivaci.net - FAST UK Gaming servers
http://www.getsigned.org - Free Image Uploads
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- unserialize an array! spitting out jibberish (PHP)
- -5volt and -12volt (Cases, Fans and Power Supplies)
- reading in a file into a 2d array (C++)
- code bug! (C++)
- server 2003 internet blocking (Network Security)
- Accessing a variable of another class (Java)
- Fun with Forms (PHP)
Other Threads in the PHP Forum
- Previous Thread: Typical PHP Extensions
- Next Thread: $_POST - What does it mean?


Linear Mode