kristenju Posted October 3, 2009 Author Share Posted October 3, 2009 What does that have to do with anything? We are writting a script to process a HTML form and e-mail the details. There is really no point in worrying about sending an e-mail untill we know the processsing is working correctly. If when we echo out $feedback it contains all the correct information. We slap it into an e-mail, job done. If you would rather keep e-mailing the result, checking your e-mail, just to check if a values working rather than print it straight to screen then you go right ahead, I'm just trying to make life easier for you. Sorry I'm still quite new at this stuff Can you pls code it out exactly how it should look like? I googled it and it's because $feedback needs to be an array... can that be.. like [ $feedback = array(); foreach($feedback as $k=>$v) { $feedback .= $_POST['comp'][$k] . "\r\n"; $feedback .= "Traffic: " . $_POST['traffic_' . $k] . "\r\n"; $feedback .= "Promo: " . $_POST["promo"][$k] . "\r\n"; $feedback .= "Comments: " . $_POST["comments"][$k] . "\r\n\r\n"; } something like that? cause by doing so, i got rid of the error.. Quote Link to comment https://forums.phpfreaks.com/topic/176134-solved-php-email-form-with-array/page/2/#findComment-929950 Share on other sites More sharing options...
cags Posted October 3, 2009 Share Posted October 3, 2009 It doesn't need to be an array, your obviously just not using it right. I downloaded a block of shops from your site, made the few suggestions I changed and tested the code it seemed to work perfectly. The only PHP on the page was the 7 lines I gave earlier and echo $feedback. I'm going to bed now, if your still stuggling tomorrow I'll think about showing you the full code you need (which isn't much) Quote Link to comment https://forums.phpfreaks.com/topic/176134-solved-php-email-form-with-array/page/2/#findComment-929955 Share on other sites More sharing options...
kristenju Posted October 4, 2009 Author Share Posted October 4, 2009 Thanks! It finally worked! Quote Link to comment https://forums.phpfreaks.com/topic/176134-solved-php-email-form-with-array/page/2/#findComment-930009 Share on other sites More sharing options...
cags Posted October 4, 2009 Share Posted October 4, 2009 Glad you got it working Quote Link to comment https://forums.phpfreaks.com/topic/176134-solved-php-email-form-with-array/page/2/#findComment-930042 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.