Submit Name & Email To Aweber Via Form
I am trying to figure out how to take a users name and email address and submit that to aweber (autoresponder) before opening up main form.
Here is how it works via html:
Quote:
<html>
<head>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff" link="#0000DD" vlink="#333399" alink="#990099">
<!-- Web Form Generator 2.0 -->
<center><form method="post" action="http://www.aweber.com/scripts/addlead.pl">
<input type="hidden" name="meta_web_form_id" value="123456789">
<input type="hidden" name="meta_split_id" value="">
<input type="hidden" name="unit" value="testform">
<input type="hidden" name="redirect" value="http://www.aweber.com/thankyou-coi.htm?m=audio" id="redirect_b2fb7df497579d51e3f5c505e726b184">
<input type="hidden" name="meta_redirect_onlist" value="">
<input type="hidden" name="meta_adtracking" value="">
<input type="hidden" name="meta_message" value="1">
<input type="hidden" name="meta_required" value="from">
<input type="hidden" name="meta_forward_vars" value="0">
<table>
<tr><td colspan=2><center></center></td></tr>
<tr><td>Name:</td><td><input type="text" name="name" value="" size="20"></td></tr>
<tr><td>Email:</td><td><input type="text" name="from" value="" size="20"></td></tr>
<tr><td colspan=2><center></center></td></tr>
<tr><td align="center" colspan="2"><input type="submit" name="submit" value="Register Now"></td></tr>
</table>
</form>
</center>
</body>
</html>
So I want to just create a simple form that loads up on startup that says something like enter your name and email address before you can use our free software...
Then when cmdSubmit is pressed it sends information to aweber in background and then form2 is presented.
What is the best way to handle something like this?
I know it's done with the httpwebrequest post but I've never tackled something like this and all examples
I'm finding aren't helping.
Will anyone share a simple solution kindly?
-Chris
Re: Submit Name & Email To Aweber Via Form
You can use a WebClient to interact with a web server from code. If you need more control then you can use an HttpWebRequest. Start by reading the MSDN documentation for the classes and then search for examples if you need to. There will be lots around. If you still need help, post back and show us what you've done and let us know exactly where you're stuck.
Re: Submit Name & Email To Aweber Via Form
Will do. I'm currently trying to use this example code for the httpwebrequest:
http://joel.net/code/easyhttp.aspx
Will this work for what I need to do?
EasyHttp.Send("http://www.aweber.com/scripts/addlead.pl", "name=" & TextBox1.Text & "from=" & TextBox2.Text)
No, it won't. I need to tell it what meta_web_form_id to post to as well.
I'm going to get some rest. Hopefully someone will have a good idea for this when
I get back.
Thanks for your help jmcilhinney!
-Chris
Re: Submit Name & Email To Aweber Via Form
In essence, yes. I've never actually used an HttpWebRequest myself though, so I can't give you details.
Re: Submit Name & Email To Aweber Via Form
Does anyone know how I would structure the code for sending their name and email to the form using the html code above?