[SOLVED] Index.php subscribe and unsubscribe link

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
brand_beatrice
Forum Newbie
Posts: 10
Joined: Tue Aug 30, 2005 5:43 am
Location: London
Contact:

[SOLVED] Index.php subscribe and unsubscribe link

Post by brand_beatrice »

Hi everybody
I have a small problem and I have no idea how it can be fixed.
I have a website and I have just installed a php mailing list. Everything works fine, the list works great etc.
These are the links:

Subscribe
http://bicestertown.co.uk/mailnews/?p=subscribe
Unsubscribe
http://bicestertown.co.uk/mailnews/?p=unsubscribe
Confirm subscription
http://bicestertown.co.uk/mailnews/?p=confirm
Update details
http://bicestertown.co.uk/mailnews/?p=preferences

Now, I have a form made in FrontPage on my index page. This form has only one field and a mobile (radio) button.-add/remove.
The issue is that I can not make it work from my index page. Every time I subscribe an email through that form from my index page (http://www.bicestertown.co.uk) I get the following error:

http://www.bicestertown.co.uk/mailingli ... om&send=ok


What I would like to do is to use that form box from my index page (to add or remove emails) without going to these pages:
Subscribe
http://bicestertown.co.uk/mailnews/?p=subscribe
Unsubscribe
http://bicestertown.co.uk/mailnews/?p=unsubscribe
--------------------------------------
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post by n00b Saibot »

First of all the link you posted for showing error is wrong. it should have mailnews instead of mailinglist.

Secondly the form is submitted through POST so submitting values through QueryString won't work. You will have to change it to GET to make it work.
brand_beatrice
Forum Newbie
Posts: 10
Joined: Tue Aug 30, 2005 5:43 am
Location: London
Contact:

Post by brand_beatrice »

hi, thank you for your quick replay.
thank you very much i have changed the location(it was the old name of my mailinglist)


<FORM name=e_mailing_list
form name="e_mailing_list" action=http://www.bicestertown.co.uk/[b]mailnews[/b]/index.php
target=_blank><P><FONT color=#ffffff><INPUT
------------------------------


"Secondly the form is submitted through POST so submitting values through QueryString won't work. You will have to change it to GET to make it work."
how do you know that( i can not find it to chage it to get) :(
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post by n00b Saibot »

it is in the index.php file. Find the <form> tag and change the attribute method="POST" to method="GET".

edit: Oops, thanks for that, feyd. must've been processor overload in my head :)
Last edited by n00b Saibot on Tue Aug 30, 2005 8:12 am, edited 2 times in total.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

ahem, method.

method="post", not action="post".

and the above mention of what was changed has no method specified, so it's likely just needing the addition of the method.
brand_beatrice
Forum Newbie
Posts: 10
Joined: Tue Aug 30, 2005 5:43 am
Location: London
Contact:

Post by brand_beatrice »

i feel like i want to cry... :(

this is the form from my index file:

Code: Select all

<FORM name=e_mailing_list 
                  form name="e_mailing_list" action=http://www.bicestertown.co.uk/mailnews/index.php
                  target=_blank><P><FONT color=#ffffff><INPUT 
                  style="BORDER-RIGHT: #537bbd 1px solid; BORDER-TOP: #537bbd 1px solid; FONT-WEIGHT: normal; FONT-SIZE: 10px; BACKGROUND: #537bbd; BORDER-LEFT: #537bbd 1px solid; COLOR: #ffffff; BORDER-BOTTOM: #537bbd 1px solid; FONT-STYLE: normal; FONT-VARIANT: normal" 
                  input type="radio" CHECKED value="subscribe" name="page"></FONT><FONT 
                  class=V10 style="FONT-SIZE: 10px" color=#ffffff 
                  size=1>register</FONT><FONT class=V10 color=#333333 
                  size=1><BR></FONT><FONT color=#ffffff><INPUT 
                  style="BORDER-RIGHT: #537bbd 1px solid; BORDER-TOP: #537bbd 1px solid; FONT-WEIGHT: normal; FONT-SIZE: 10px; BACKGROUND: #537bbd; BORDER-LEFT: #537bbd 1px solid; COLOR: #ffffff; BORDER-BOTTOM: #537bbd 1px solid; FONT-STYLE: normal; FONT-VARIANT: normal" 
                  input type="radio" value="unsubscribe" name="page"></FONT><FONT class=V10 
                  style="FONT-SIZE: 10px" color=#ffffff 
                  size=1>remove</FONT><FONT class=V10 color=#333333 size=1> </FONT><BR><INPUT 
                  style="border:0px solid #ff0000; FONT-WEIGHT: normal; FONT-SIZE: 7pt; WIDTH: 92; COLOR: #0a3e87; FONT-STYLE: normal; BACKGROUND-COLOR: #9dc1e7; FONT-VARIANT: normal; class: V8 color: #0A3E87; height:15" 
                  onfocus="if(document.e_mailing_list.email.value == 'mailaddress') { document.e_mailing_list.email.value = '' };" 
                  size=15 value="e-mail address" name=email> <INPUT style="border:0px solid #C0C0C0; FONT-WEIGHT: normal; FONT-SIZE: 10px; WIDTH: 20px; COLOR: #0A3E87; BOTTOM: 0px; FONT-STYLE: normal; POSITION: relative; BACKGROUND-COLOR: #9ACC9A; FONT-VARIANT: normal" type=submit value=Go></P><INPUT 
                  style="BORDER-RIGHT: #000000 0px solid; BORDER-TOP: #000000 0px solid; FONT-WEIGHT: normal; FONT-SIZE: 10px; BORDER-LEFT: #000000 0px solid; COLOR: #000000; BORDER-BOTTOM: #000000 0px solid; FONT-STYLE: normal; BACKGROUND-COLOR: #ffffff; FONT-VARIANT: normal" 
                  type=hidden value=ok name=send></FORM>
----------------------------------------------------------------------------------------

no method="POST" in here to be changed to method="GET"

----------------------------------------------------------------------------------------
you said , is in index.php
i open index.php from mailnews folder(on my server and is not there)
i am very confused....what shall i do to make it work :?:


feyd | Please use

Code: Select all

and

Code: Select all

tags where approriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
brand_beatrice
Forum Newbie
Posts: 10
Joined: Tue Aug 30, 2005 5:43 am
Location: London
Contact:

Post by brand_beatrice »

i've just added ----> method get.

form name="e_mailing_list" action=http://www.bicestertown.co.uk/mailnews/index.php method=get
no changes,..this is the result:
http://www.bicestertown.co.uk/mailnews/ ... om&send=ok

i don;t want to see that orange page ..is it possible? all i want is to input the email into that form(index.html) and get subscribed or unsubscribed. is that possible or is to complicated to be done?

thank you very much :oops:
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post by n00b Saibot »

First of all, your link is wrong again. it should have ?p instead of ?page.

Secondly you haven't change the form I wuz talking about.

Click the link here and see for yourself.

http://www.bicestertown.co.uk/mailnews/ ... e.com&id=4

PS: I have attained my MASTERS degree. yay! :D
brand_beatrice
Forum Newbie
Posts: 10
Joined: Tue Aug 30, 2005 5:43 am
Location: London
Contact:

sorted

Post by brand_beatrice »

thanks a lot.
it has been elegantly sorted by Abakyamau.
best regards you champion!
Post Reply