I am new to the solidity/dapp game, but I'm learning.
Here is some super simple code for a smart contract that I'd like to use to store user input strings from a webform and store those responses on the blockchain so they can be queried later:
pragma solidity ^0.4.0;
contract simpleStorage {
string name;
string email;
function simpleStorage() public {
name = "Hello";
email = "[email protected]";
}
function setInfo(string userName, string userEmail) public {
name = userName;
email = userEmail;
}
function getInfo() constant returns (string, string){
return (name, email);
}
}
Right now I'm trying to figure out how to a) accept string user input, convert to JS/JSON readable format with double quotes and b) set up the web form to work with this contract and my private geth network