chuy08 Posted November 8, 2006 Share Posted November 8, 2006 I have constructed a framed web form. The frames are equally divided into two rows taking up 50% of the screen space each. The top frame is supposed to be static and the bottom frame is where results should be returned when web form is submitted. Currently when I land on this framed web form within a browser I am getting a blank screen. What I would like to have is a message below that prompts the user to fill in above to get results. My problem is the test that I am using to evaluate if the POST array has been initialized or not. I have constructed an if/else statement that is supposed to test for this, example below:if (is_array($pricing)) { $pricing = $_POST['pricing']; print_r($_POST); //just for testing purposes only } else { echo "Please fill out form above to get results below<BR>"; }When I land on the page for the first time the Please fill out form above... condition is met and printed. Once I begin to fill in my webform and select the submit button I can't seem to get my test to ever evaluate to true. Adding my $pricing = $_POST and print_r command to the false section of the if/else statement does what it's supposed to do, but why is the test not responding accordingly. Any help appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/26521-framed-web-form-testing-arrays/ Share on other sites More sharing options...
doni49 Posted November 8, 2006 Share Posted November 8, 2006 Ok--without seeing the code, I can only offer generalities. But it would be REALLY helpful if I could see the HTML code and some more PHP code.1) check the CASE of your variables and form fields. They HAVE to be the same. If the Form field is [b]<input type="Pricing">[/b] then you have to obtain the variable like this: [b]$pricing = $_POST['Pricing'];[/b] Quote Link to comment https://forums.phpfreaks.com/topic/26521-framed-web-form-testing-arrays/#findComment-121348 Share on other sites More sharing options...
sasa Posted November 8, 2006 Share Posted November 8, 2006 try[code]print_r($_POST); //just for testing purposes onlyif (isset($_POST['pricing']) // < == change this line { $pricing = $_POST['pricing']; } else { echo "Please fill out form above to get results below<BR>"; }[/code] Quote Link to comment https://forums.phpfreaks.com/topic/26521-framed-web-form-testing-arrays/#findComment-121728 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.