Welcome Guest, Not a member yet? Register   Sign In
Single html Form With Multiple Submit Buttons
#11

[eluser]Tim Brownlaw[/eluser]
Not exactly sure what you are trying to show here Bill!

But your Block [8500] won't display any values for the post variables named preview or create because they do not exist in the form!
Code:
// +---------+---------+---------+---------+---------+---------+
// [8500] these two lines do nothing
// +---------+---------+---------+---------+---------+---------+
echo '<br>[8501] do nothing ' . $this->input->post('preview'); // This will return the Boolean FALSE
echo '<br>[8502] do nothing ' . $this->input->post('create');   // This will return the Boolean FALSE

The following is Soley For Debug Purposes to see what is happening!!!
Code:
// +---------+---------+---------+---------+---------+---------+
// [8510] these two lines do nothing as the values do not exist
// +---------+---------+---------+---------+---------+---------+
echo '<br>[8511] I do something but  ';
echo ($this->input->post('preview')===false)?'I Do Not Exist':'I do Exist';
echo '<br>[8512] I do something but ';
echo ($this->input->post('create')===false)?'I Do Not Exist':'I do Exist';
// +---------+---------+---------+---------+---------+---------+
// [8520] Var_dump the Post Values - Both will Return False
// +---------+---------+---------+---------+---------+---------+
echo '<br>[8521] var_dump of preview';
var_dump($this->input->post('preview'));
echo '<br>[8522] var_dump of create';
var_dump ($this->input->post('create'));

Interesting Note: When echoing a string with a concatenated ternary like...
Code:
echo '<br>[8511] I do something but  '. ($this->input->post('preview')===false)?'I Do Not Exist':'I do Exist'
The first string part ie
Code:
'<br>[8511] do something but '.
- does not display. Only the result of the ternary displays. So the fix is to put them as separate echo calls!


Messages In This Thread
Single html Form With Multiple Submit Buttons - by El Forum - 12-10-2010, 03:34 PM
Single html Form With Multiple Submit Buttons - by El Forum - 12-10-2010, 04:30 PM
Single html Form With Multiple Submit Buttons - by El Forum - 12-11-2010, 03:36 AM
Single html Form With Multiple Submit Buttons - by El Forum - 12-11-2010, 04:07 AM
Single html Form With Multiple Submit Buttons - by El Forum - 12-11-2010, 06:55 AM
Single html Form With Multiple Submit Buttons - by El Forum - 12-11-2010, 08:40 AM
Single html Form With Multiple Submit Buttons - by El Forum - 12-12-2010, 12:45 AM
Single html Form With Multiple Submit Buttons - by El Forum - 12-12-2010, 12:45 AM
Single html Form With Multiple Submit Buttons - by El Forum - 08-04-2012, 09:08 PM
Single html Form With Multiple Submit Buttons - by El Forum - 08-08-2014, 06:39 PM
Single html Form With Multiple Submit Buttons - by El Forum - 08-08-2014, 09:02 PM
Single html Form With Multiple Submit Buttons - by El Forum - 08-09-2014, 12:18 PM
Single html Form With Multiple Submit Buttons - by El Forum - 08-09-2014, 01:19 PM
Single html Form With Multiple Submit Buttons - by El Forum - 08-09-2014, 07:29 PM



Theme © iAndrew 2016 - Forum software by © MyBB