opt in page error help ?

Once you've installed phpList Version 2... ask questions here!
Forum rules
Please help the volunteers to help you by supplying the version of phpList you are using, browser & version and if possible, a link to your phpList installation. This is for Version 2 of phpList (the orange one).

opt in page error help ?

Postby pauldb38 » 3:12pm, Wed 15 Jan, 2014

Hi i'm trying to get my email form working basically its just a email opt in but i get errors firstly it asks for confirmation email then when it submits i get errors. I am learning php so i probably made a simple mistake ? All i want is to record someones name and email address from a page
for a simple mailing list ?

Heres the code any help advice would be great xx

Code: Select all

<title>New Page 2</title>


<!-- newsletter subscribe below here -->

<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]);
return false;
return true;
function addFieldToCheck(value,name) {
fieldstocheck[fieldstocheck.length] = value;
fieldnames[fieldnames.length] = name;

<form method="post" action="http://computerlaptoprepairsyork.co.uk/phplist/?p=subscribe&id=1" name="subscribeform">
Email:<input type="text" name="email" value = ""><br>
<script language="Javascript" type="text/javascript">addFieldToCheck("email","Email Address");</script>
Name: <input type="text" name="name" value = "">
<script language="Javascript" type="text/javascript">addFieldToCheck("name","Name");</script>
<input type="hidden" name="list[1]" value="signup" />
<input type="submit" name="subscribe" value="Subscribe" onClick="return checkform();">

<!-- newsletter subscribe ends here --></body>

Posts: 8
Joined: 8:11pm, Tue 14 Jan, 2014

Re: opt in page error help ?

Postby Dragonrider » 9:55pm, Thu 16 Jan, 2014

Shouldn't the script be in the <head> rather than in the <body>?
My sites:- http://wharfedalefestival.co.uk, http://ilkleygardeners.org.uk, http://emergencyaid.net, http://dragonrider.co.uk
Latest phpList version is now 3.0.12 (3 February 2015) and requires a minimum of MySQL 5.0 and PHP 5.3.x
Posts: 3460
Joined: 6:58am, Sun 02 Jul, 2006
Location: Ilkley, West Yorkshire, United Kingdom

Return to Question & Problems - after installing

Who is online

Users browsing this forum: No registered users and 2 guests