SkyRanger Posted May 11, 2007 Share Posted May 11, 2007 I am trying to figure out how to insert multiple entries when required Example: To: Name 1 CC: Name 2 CC1: Name 3 But if CC1 value doesn't exist it only inserts the values of To and CC and if the values of CC and CC1 don't exist it only inserts the value for To Quote Link to comment https://forums.phpfreaks.com/topic/50936-solved-multi-insert-when-required/ Share on other sites More sharing options...
taith Posted May 11, 2007 Share Posted May 11, 2007 $to='first'; $cc=''; $cc2='second'; if(empty($cc)){ $cc=$cc2; unset($cc2); } //$to=first //$cc=second Quote Link to comment https://forums.phpfreaks.com/topic/50936-solved-multi-insert-when-required/#findComment-250534 Share on other sites More sharing options...
SkyRanger Posted May 11, 2007 Author Share Posted May 11, 2007 Doh, thanks taith, got it. Quote Link to comment https://forums.phpfreaks.com/topic/50936-solved-multi-insert-when-required/#findComment-250538 Share on other sites More sharing options...
taith Posted May 11, 2007 Share Posted May 11, 2007 cheers mate Quote Link to comment https://forums.phpfreaks.com/topic/50936-solved-multi-insert-when-required/#findComment-250541 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.