![]() |
Paypal_lib Success Page Problem - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Paypal_lib Success Page Problem (/showthread.php?tid=11216) Pages:
1
2
|
Paypal_lib Success Page Problem - El Forum - 08-30-2008 [eluser]Jesse Schutt[/eluser] This code is in the "Success" view of the Paypal_lib. It is not displaying any information regarding the _POST information. Actually, it isn't displaying anything at all other than the "Success, Your Payment was received..." Any ideas? Code: <h2>Success!</h2> If I insert the following, I can see results, so I am pretty sure that there is _POST data. Code: <?php Jesse Paypal_lib Success Page Problem - El Forum - 08-30-2008 [eluser]Jesse Schutt[/eluser] I'm curious as to why print_r works and not $this->input->post()... Paypal_lib Success Page Problem - El Forum - 08-30-2008 [eluser]missionsix[/eluser] since this: $this->input->post() is a method, its going to check if the key passed has an associated value. Since you are not passing a key, there is not key / value pair to check it against in $_POST, so its going to return false, which is why you can't see anything. Paypal_lib Success Page Problem - El Forum - 08-30-2008 [eluser]Jesse Schutt[/eluser] Thanks for the response MissionSix! As I'm sure you can tell, I am just learning how to get around in all of this. What would you suggest I do to access the values held in the $_POST array? Thanks Much! Jesse Paypal_lib Success Page Problem - El Forum - 08-30-2008 [eluser]Bramme[/eluser] If you want to loop through them, I'd simply use the $_POST array, seeing as $_POST[$key] == $this->input->post($key) == $this->validation->$key Paypal_lib Success Page Problem - El Forum - 08-30-2008 [eluser]missionsix[/eluser] loop through the $_POST[$key]'s, but reference the $_post data through $this->input->post($key). This way your input will be cleaned before use (xss filtering, etc) Paypal_lib Success Page Problem - El Forum - 08-30-2008 [eluser]Jesse Schutt[/eluser] Thanks for the help. If it's not too much trouble, could you give me a sample of what you mean? I am doing my best to learn all of this. Paypal_lib Success Page Problem - El Forum - 08-30-2008 [eluser]missionsix[/eluser] Yeah, sure: From your example: Code: <h2>Success!</h2> you were also having problems with your echo statement. You used single quotes with enclosed Vars and that won't work in php. Paypal_lib Success Page Problem - El Forum - 08-30-2008 [eluser]Jesse Schutt[/eluser] Thank you very much! I'll go through this and see if I can't figure it out for myself. I really appreciate your help. Jesse Paypal_lib Success Page Problem - El Forum - 08-31-2008 [eluser]Bramme[/eluser] [quote author="missionsix" date="1220155851"]loop through the $_POST[$key]'s, but reference the $_post data through $this->input->post($key). This way your input will be cleaned before use (xss filtering, etc)[/quote]$_POST is laundered as well... So it really doesn't matter which one you use: $_POST[$key], $this->validation->$key or $this->input->post($key), they're all the same. |