torsdag den 19. januar 2017
do not use var_dump before a header() in php
It will cause to show the var_dump and never execute header()
mandag den 9. januar 2017
Interesting ajax php $_POST problem
<b>Notice</b>: Undefined index: method in <b>C:\x\htdocs\data\functions\main\sub\sendemail.php</b> on line <b>2</b><br />
If you make a post request via ajax:
jQuery.ajax({
type: 'POST',
url: 'data/functions/main/sub/createuser.php',
data: postdata,
dataType: 'JSON',
and did not define a "method" and you do not explicilty said that you wanted to send a method call in a file.
The first file has:
but it still references it:
In "sendemail.php" it has a method call:
If you make a post request via ajax:
jQuery.ajax({
type: 'POST',
url: 'data/functions/main/sub/createuser.php',
data: postdata,
dataType: 'JSON',
and did not define a "method" and you do not explicilty said that you wanted to send a method call in a file.
The first file has:
ob_start();I this file it does not have a $_POST["method"]; php call.
include $_SERVER['DOCUMENT_ROOT'] ."/data/functions/main/sub/sendemail.php";
ob_end_clean();
but it still references it:
In "sendemail.php" it has a method call:
echo $_POST["method"];This still runs even thought you did not specifically said it.
Abonner på:
Opslag (Atom)