Current location: Hot Scripts Forums » Programming Languages » PHP » php, removing messages ?


php, removing messages ?

Reply
  #1 (permalink)  
Old 05-02-04, 08:30 AM
pretaurion pretaurion is offline
New Member
 
Join Date: May 2004
Location: belgium
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
php, removing messages ?

hello all.

I could use (allot) help with my php script.
the php sends me an email after a bunch of values that are entered via my flash form.

I want the php NOT to send the lines that have no value

<?
$msg .= "soepkommen $soepkommen\n";
$msg .= "pindaschaaltjes $pindaschaaltjes\n";
?>

with NO numbers added in the swf i get "soepkommen" and "pindaschaaltjes" in my email

with a number 50 added i get, "soepkommen 50" and "pindaschaaltjes 50" in my email.
But what i want is , when the value of "soepkommen or pindaschaaltjes" is blank the email dont show soepkommen or pindaschaaltjes.

So basicly i want the email to be completely empty when no valeus are entered.

yeez hard to explain when youre not dutch
anyways, i hope someone understand what i said and also have an answer.

thx in advance
Reply With Quote
  #2 (permalink)  
Old 05-02-04, 10:25 AM
NeverMind's Avatar
NeverMind NeverMind is offline
Community VIP
 
Join Date: Aug 2003
Location: K.S.A
Posts: 2,257
Thanks: 0
Thanked 2 Times in 1 Post
why don't you do this in your flash file!?
because instead of reaciving an empty email, it wouldn't be sent from the begining!!
I think it would be easier but anyway in php this is how you can do it:
PHP Code:

//check $soepkommen and if it was not empty, include it in the msg

if ($soepkommen) {
  
$msg .= "soepkommen $soepkommen\n";
}

//now we check $pindaschaaltjes
if ($pindaschaaltjes) {
  
$msg .= "pindaschaaltjes $pindaschaaltjes\n";

this code will check each variable and if it was not empty it will include it in $msg ..
__________________
PHPSimplicity
We don't need a reason to help people - Zidane [FF9]
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP and MySQL ? rob2132 Hot Scripts Forum Questions, Suggestions and Feedback 4 08-29-08 02:22 AM
PHP Dudes - Hi All stuart New Members & Introductions 4 05-03-04 01:22 PM
PHP XML Blog Script Xengor PHP 2 01-21-04 04:35 PM
100 Web Templates & 10 PHP Scripts for sale! HostersUK.co.uk General Advertisements 0 01-10-04 12:31 AM
How to convert php generated pages to SE friendly HTML or PHP(SE friendly) -CLASS 101 crippled PHP 1 11-16-03 06:37 AM


All times are GMT -5. The time now is 10:31 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.