Head hits wall... forums, check boxes, and writers block

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
AfterZero
Forum Newbie
Posts: 4
Joined: Sun Oct 19, 2008 8:25 pm

Head hits wall... forums, check boxes, and writers block

Post by AfterZero »

hey everyone

I have a situation that I have been trying to figure out but I keep hitting walls

I will be building a contact form with a check box to opt into a news letter


if the user checks the box...the info from the contact form gets via email to a sales rep, but also gets sent to a proprietary script belonging to the company they use to do email blasts which adds them to their double opt in list...which means I cannot see the script only the variable info they need, but it is not a big deal... all i need to do is send the info to a page called "multidouble.ice" and thats it

now if the user does NOT check the box to be added to the list....the contact info just gets emailed to a sales rep and not to the blast program

I am trying to diagram out how I am going to accomplish this and have no code in place yet....


I am looking for advice on how to approach this...either using IF statements or SWITCHES I am not sure and I cannot picture it in my mind..


ANY advice would be of complete help!!


thanks

JUSTIN!
:drunk:
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Head hits wall... forums, check boxes, and writers block

Post by requinix »

Code: Select all

if (box was checked) {
    blast away;
}
email to rep;
Am I missing something that's making this a more complicated issue than it appears to be?
AfterZero
Forum Newbie
Posts: 4
Joined: Sun Oct 19, 2008 8:25 pm

Re: Head hits wall... forums, check boxes, and writers block

Post by AfterZero »

makes sense....do i use a header function to tell it where to go inside the IF statement?
AfterZero
Forum Newbie
Posts: 4
Joined: Sun Oct 19, 2008 8:25 pm

Re: Head hits wall... forums, check boxes, and writers block

Post by AfterZero »

So here is a smippet of what i threw together in the past few minutes...this time using a radio buttons because that is what the company wants...if they say no i need to just email the info to a sales rep but if they say yes it needs to be emailed and also posted to the script.

I am just not getting it tonight :(

Code: Select all

<form method="post" action="http://www.icebase.com/multidouble.ice">
                    <table cellspacing=0 cellpadding=4 border=0 class="bodytext" width="100%">
                      <tr> 
             <td><strong>Would you like to be added to our mailing list?</strong></td>
                        <td><input name="MailingList" type="radio" value="Yes">
                        Yes &nbsp; &nbsp;  &nbsp;
            <input name="MailingList" type="radio" value="No">
             No Thanks </td>
                      </tr>
                      <tr>
                        <td></td>
                        <td><input type="submit" value="Tell Me More!">                        </td>
                      </tr>
                    </table>
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Head hits wall... forums, check boxes, and writers block

Post by requinix »

If you want to do something when the form is submitted you can't have it going to somebody else.
Get the results from the form, send your email, and then... depends. You can probably use cURL to fake a form submission.
AfterZero
Forum Newbie
Posts: 4
Joined: Sun Oct 19, 2008 8:25 pm

Re: Head hits wall... forums, check boxes, and writers block

Post by AfterZero »

which is what I was trying to avoid hahaha


ok makes sense thank you!
Post Reply