Click here to Skip to main content
15,886,362 members
Home / Discussions / - Uncategorised posts -
   

- Uncategorised posts -

Please don't post in this forum. If you've posted in this forum it's because you've selected the first forum on the list without thinking through which forum would be best. All messages in this forum are periodically removed.

 
GeneralRe: How to display a list of text in a text file on a number of HTML pages? Pin
INDtanay9-Nov-17 7:29
INDtanay9-Nov-17 7:29 
QuestionUncaught TypeError: $(...).dataTable(...).rowReordering is not a function in row reordering Pin
svknair2-Nov-17 8:11
svknair2-Nov-17 8:11 
AnswerRe: Uncaught TypeError: $(...).dataTable(...).rowReordering is not a function in row reordering Pin
Afzaal Ahmad Zeeshan2-Nov-17 8:28
professionalAfzaal Ahmad Zeeshan2-Nov-17 8:28 
AnswerRe: Uncaught TypeError: $(...).dataTable(...).rowReordering is not a function in row reordering Pin
ZurdoDev3-Nov-17 2:32
professionalZurdoDev3-Nov-17 2:32 
QuestionPhone extension on the fly Pin
Tyle331501-Nov-17 17:28
Tyle331501-Nov-17 17:28 
GeneralRe: Phone extension on the fly Pin
PIEBALDconsult1-Nov-17 17:31
mvePIEBALDconsult1-Nov-17 17:31 
GeneralRe: Phone extension on the fly Pin
Tyle331501-Nov-17 17:44
Tyle331501-Nov-17 17:44 
QuestionJavascript Sending Data to PHP Pin
Valecia_cho17-Oct-17 13:20
Valecia_cho17-Oct-17 13:20 
Hello all. This is my 1st time using this so apologies if I haven't got this in the right posting category or if my wording is horrible.

Anyways, what I wanted to query: so I'm trying to send an array from a javascript page to another PHP page. Separate files. Here's the javascript:

JavaScript
var purchase, sendDB;
  purchase = {"Boots":"100","Phone":"800","AK":"600"};

  sendDB = JSON.stringify(purchase);

  $.post("http://localhost/POS_Proj/POS_DB.php", sendDB, function(){
    alert("sending purchase data to php.");
  });


So in the $.post part of the code the callback does its thing and gives the alert. So in theory there's nothing wrong with that part of the code.

Here's what I currently have for the php side:

PHP
header("Content-Type: application/json; charset=UTF-8");
$recData = json_decode($_GET['http://localhost/POS_Proj/testFront.php'], false);


I'm just trying to get the php to actually accept/handle the data sent from the javascript. If anyone can point me in the right direction or any sort of advice would be much appreciated

Thanks
AnswerRe: Javascript Sending Data to PHP Pin
Richard Deeming18-Oct-17 2:03
mveRichard Deeming18-Oct-17 2:03 
GeneralRe: Javascript Sending Data to PHP Pin
Valecia_cho18-Oct-17 12:16
Valecia_cho18-Oct-17 12:16 
GeneralRe: Javascript Sending Data to PHP Pin
Richard Deeming19-Oct-17 9:12
mveRichard Deeming19-Oct-17 9:12 
GeneralRe: Javascript Sending Data to PHP Pin
Valecia_cho24-Oct-17 5:04
Valecia_cho24-Oct-17 5:04 
QuestionUSB Pin
Member 1337396522-Aug-17 20:22
Member 1337396522-Aug-17 20:22 
AnswerRe: USB Pin
Richard MacCutchan22-Aug-17 21:18
mveRichard MacCutchan22-Aug-17 21:18 
GeneralRe: USB Pin
Terry Perez27-Sep-17 17:56
Terry Perez27-Sep-17 17:56 
QuestionOut of Memory Exception in C++ Pin
divya0310-Aug-17 1:34
divya0310-Aug-17 1:34 
SuggestionRe: Out of Memory Exception in C++ Pin
Jochen Arndt10-Aug-17 2:01
professionalJochen Arndt10-Aug-17 2:01 
QuestionNeed for new Interface to understand 2 AI Bot's communication? Pin
INDtanay4-Aug-17 21:52
INDtanay4-Aug-17 21:52 
AnswerRe: Need for new Interface to understand 2 AI Bot's communication? Pin
Richard MacCutchan4-Aug-17 21:55
mveRichard MacCutchan4-Aug-17 21:55 
PraiseRe: Need for new Interface to understand 2 AI Bot's communication? Pin
INDtanay4-Aug-17 22:05
INDtanay4-Aug-17 22:05 
GeneralRe: Need for new Interface to understand 2 AI Bot's communication? Pin
Richard MacCutchan4-Aug-17 22:11
mveRichard MacCutchan4-Aug-17 22:11 
GeneralRe: Need for new Interface to understand 2 AI Bot's communication? Pin
INDtanay4-Aug-17 22:19
INDtanay4-Aug-17 22:19 
GeneralRe: Need for new Interface to understand 2 AI Bot's communication? Pin
Richard MacCutchan4-Aug-17 22:56
mveRichard MacCutchan4-Aug-17 22:56 
QuestionJson default property Pin
aboubkr9020-Jul-17 23:35
professionalaboubkr9020-Jul-17 23:35 
AnswerRe: Json default property Pin
Graeme_Grant1-Aug-17 15:14
mvaGraeme_Grant1-Aug-17 15:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.