<p>For a small project I was working on, I wanted to create a simple landing page that has a box for the user to enter and submit their email. </p>
<p>Any recommendations on this? Is it worth doing in Go?</p>
<hr/>**评论:**<br/><br/>hansdr: <pre><p>It depends on what you're planning to do with the email address. If you plan to send a newsletter, or a sequence of emails (e.g., maybe they're signing up for a mini email course), then the easiest option is to use a service like MailChimp, AWeber, GetResponse, etc. Those services have simple forms that you can embed in a webpage for email signups.</p>
<p>If you're planning on doing something else with the email address (or just want to learn how its done), then it would be worth doing in Go. The basics are:
- Create a form in the landing page
- Create a POST handler that reads the form, checks it for errors, duplicate emails, SQL injection attempts, etc., and then stores the email into a database</p>
<p>I don't have a complete example, but here's a page showing how to build a form and validate an email address in Go:
<a href="http://www.alexedwards.net/blog/form-validation-and-processing" rel="nofollow">http://www.alexedwards.net/blog/form-validation-and-processing</a></p></pre>gogolang: <pre><p>I'd also recommend checking out <a href="https://www.bitballoon.com/" rel="nofollow">https://www.bitballoon.com/</a> You basically create HTML/JS/CSS and bitballoon will capture all the input from the form and database it.</p>
<p>You can then link it up to Zapier and connect it up to various other services without having to write any code.
<a href="https://www.bitballoon.com/docs/zapier/" rel="nofollow">https://www.bitballoon.com/docs/zapier/</a></p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传