I chose phplist because of this very helpful forum and have already received lots of help from searching the forum, but .....
I have incorporated a subscribe page in my site and the form looks great but when I click the submit button I just get redirected to
http://mysite/mysite/lists/?p=subscribe
I've tried allsorts and can't fix this - any help very gratefully received.
thanks in advance - code below
<script language="Javascript" type="text/javascript">
var fieldstocheck = new Array();
fieldnames = new Array();
function checkform() {
for (i=0;i<fieldstocheck.length;i++) {
if (eval("document.subscribeform.elements['"+fieldstocheck[i]+"'].value") == "") {
alert("Please enter your "+fieldnames[i]);
eval("document.subscribeform.elements['"+fieldstocheck[i]+"'].focus()");
return false;
}
}
return true;
}
function addFieldToCheck(value,name) {
fieldstocheck[fieldstocheck.length] = value;
fieldnames[fieldnames.length] = name;
}
function compareEmail()
{
return (document.subscribeform.elements["email"].value == document.subscribeform.elements["emailconfirm"].value);
}
</script>
</p>
<form method=post action="http:/mysite/lists/?p=subscribe" name="subscribeform"><table border=0>
<tr><td><div class="feature">Email</div></td>
<td class="feature">
<span class="feature">
<input type=text name=email value="" size="40">
<script language="Javascript" type="text/javascript">addFieldToCheck("email","Email");</script>
</span></td></tr><tr><td colspan=2 class="feature">
Preferred format for emails:<br/>
<input type=radio name="htmlemail" value="0" />
Text
<input type=radio name="htmlemail" value="1" checked />
HTML</td></tr>
<tr><td><div class="feature">name</div></td><td class="attributeinput">
<span class="feature">
<input type=text name="attribute1" class="attributeinput" size="40" value="">
<script language="Javascript" type="text/javascript">addFieldToCheck("attribute1","name");</script>
</span></td></tr>
<tr><td><div class="feature">post code</div></td><td class="attributeinput"> <span class="feature">
<input type=text name="attribute4" class="attributeinput" size="40" value="">
</span></td></tr>
<tr><td><div class="feature">phone number</div></td><td class="attributeinput"> <span class="feature">
<input type=text name="attribute5" class="attributeinput" size="40" value="">
</span></td></tr>
<tr><td colspan=2>
<span class="feature">
<input type="checkbox" name="attribute6" value="on" class="attributeinput">
Subscribe to Lists</span></td></tr>
</table>
<p>
<span class="feature">
<!-- CODE REMOVED FROM HERE-->
<input type=submit name="subscribe" value="Subscribe to the Selected Newsletters" onClick="return checkform();">
</span></p>
</form>
<p class="feature"><br/>
<br/>
<a href="http://mysite/phplist/?p=unsubscribe&id=1">Unsubscribe</a>
<style type="text/css">
.poweredphplist {font-family: arial, verdana, sans-serif;font-size : 10px; font-variant: small-caps; font-weight : normal; padding: 2px; padding-left:20px;}
a:link.poweredphplist,
a:active.poweredphplist,
a:visited.poweredphplist {font-family: Arial, verdana, sans-serif; font-size : 10px; font-variant: small-caps; font-weight : normal; color : #666666; text-align : center; text-decoration : none; padding: 2px;}
a:hover.poweredphplist {color : #7D7B7B;}
</style>
powered by <a href="http://www.phplist.com" class="poweredphplist" target="_blank">phplist</a> v 2.10.2, © <a href="http://tincan.co.uk/powered" target="_blank" class="poweredphplist">tincan ltd</a>
</p>
</p>
*********************************************
The code <!-- CODE REMOVED FROM HERE--> was
<input type="hidden" name="list[2]" value="signup">
<input type="hidden" name="listname[2]" value="ASDW Mailing List"/>
*************************************************
thanks