Page 1 of 1

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

Posted: Sun Oct 19, 2008 8:31 pm
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:

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

Posted: Sun Oct 19, 2008 8:42 pm
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?

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

Posted: Sun Oct 19, 2008 8:48 pm
by AfterZero
makes sense....do i use a header function to tell it where to go inside the IF statement?

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

Posted: Sun Oct 19, 2008 9:04 pm
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>

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

Posted: Sun Oct 19, 2008 9:26 pm
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.

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

Posted: Sun Oct 19, 2008 9:28 pm
by AfterZero
which is what I was trying to avoid hahaha


ok makes sense thank you!