Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I have a form which people fill out details and click send. What happens, is depending on the details an email is sent to a different person.
The concerning variables in my form are:
'$publication' a series of checkboxes which are North, South and Bayside.
'$photo_for' which is also a series of checkboxes with the values of Advertisment, Editorial, Advertorial, Window Shop, Designers Feature.
Here is the break down of options for who the form gets sent to:Code: Select all
Ricky (myself): North (Advertisment, Editorial, Advertorial, Window Shop, Designers Feature) - Everything
South (Editorial) - Only Editorial
Desired Creations: Bayside (Advertisment, Editorial, Advertorial, Window Shop, Designers Feature) - Everything
South (Advertisment, Editorial, Advertorial, Window Shop, Designers Feature) - EverythingCode: Select all
if (in_array('North',$publication) || (in_array('South',$publication) && in_array('Editorial',$photo_for))){
$photographer = "Ricky Sullivan <ricky@stylemagazines.com.au>";
} else {
$photographer = "Desired Creations <admin@desiredcreations.com.au>";
}If there was a way to make it say
(in_array('South',$publication) && $photo_for == 'Editorial'))
I think its because its an array. Whats a good way to sort this?
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]