No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
I've simplified it quite a bit but it's still not working. PHP: [CODE] <?php $a = array('data' => 'Hello'); echo json_encode($a); ?> [/CODE] Here's the JQuery Code: [CODE] function getCityAndState(data, location) { var jsonString = {"zipCode": data}; var outR = outputResults alert("JSON String:" + jsonString.zipCode); if (location === "living") { … |
|
Problemo: My PHP Script (it's just a snippet) is not picking up my JavaScript code. It doesn't even see the zip code field. It says it doesn't exist: [CODE] <?php $zipCode = $_GET[zipCode]; //echo "data:".$zipCode; $json = "{data:.$zipCode}"; echo $json; //echo json_encode(array("data"=>$zipCode)); //print ("Zip Code:".$zipCode); ?> [/CODE] I'm passing it … |
|
Hi. I have a problem. This is my code. // the array.h file #ifndef ARRAY_H #define ARRAY_H #include <iostream> #include "arr_exception.h" using namespace std; class Array { friend ostream &operator <<(ostream &os, const Array &arr); // done public: Array(int n); // done Array(const Array &array); // done ~Array() {cout << … |
|
#include<string> #include<iostream> #include<fstream> using namespace std; class fileHandleString { private: ifstream infile; ofstream outfile; public: fileHandleString() { infile.open("input.txt", ios::in); outfile.open("output.txt", ios::in); } ~fileHandleString() { infile.close(); } string getFromFile() { string str; getline (outfile, str); return (str); } }; The above code is what I am using but I keep getting … |