0

How to save values from an HTML form into block chain through a browser, I have gone through different tutorials, but it is confusing, how this go-ethereum blockchain and smart contract can access from the browser. Please help me I am a noob with blockchain

  • 1
    See if programtheblockchain.com/posts/2017/12/13/… helps. – user19510 Feb 23 '18 at 8:25
  • I don't even understand the question. Can you rephrase? – cleanunicorn Mar 13 '18 at 11:37
  • Have a look at web3.js – Nicolas Massart Mar 13 '18 at 12:41
  • The Ethereum blockchain is not a data storage - or at least it's currently not feasible to store any bigger amounts of data there. Smart contracts are used to implement logic for small amounts of data. You should probably read more first about what the smart contract are and what they are meant for. – Lauri Peltonen Mar 13 '18 at 12:43
  • Did you use truffle framework.They have expalined all these stuff with metacoin. – Crissi Mariam Robert Mar 13 '18 at 16:12
0
  1. Create a smart contract that lets you pass in data in the form of a String or Int or whatever data type you are retrieving from the website.

  2. Using html/css create the webpage and allow the user to input the data they want

  3. retrieve the data the user submitted in the html with some backend like Node.js

  4. use the web3 api to deploy your contract to the blockchain. For example:

    // deploy new contract
    var contractInstance = MyContract.new([data retrieved from html], {data: '0x12345...', from: myAccount, gas: 1000000});
    

Note that it requires more steps to deploy a contract than just this snippet of code, just look online because there are many tutorials that literally walk you through the entire process.

If you are new to programming, there are tutorials online for each of these steps. They just may not be all in 1 video.

0

I can help you with some good tutorials and examples.

Basically, you can communicate with ethereum node from website using a Javascript API called Web3 JS.

If you dont have a node already running, try private net.

  1. Download Geth

  2. Create Genesis block -> Create accounts -> Start miner -> Enable JSON RPC HTTP communication for three modules (web3,eth,net), everything explained simply HERE.

  3. Take a look at Video demonstration of Web3 JS.

Once you done with private nets, try test nets and main net.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.