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 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 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. 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 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
Archived
This topic is now archived and is closed to further replies.