![]() |
Sergey Kornilov admin 12/29/2006 |
You can try something like this. function BeforeAdd(&$values)
|
T
|
tdh author 1/3/2007 |
Hello again, |
![]() |
Sergey Kornilov admin 1/3/2007 |
See code example that includes the value of Reading scores into email if Reading score equals 58. |
T
|
tdh author 1/3/2007 |
Thanks Sergey. I am putting together a demo to show my boss what this can do for our school system. Hope to be done before trial expires. That gives me a good target date for approval and purchase. |
T
|
tdh author 1/3/2007 |
On the line below: See code example that includes the value of Reading scores into email if Reading score equals 58. if ( $values["Reading"]==58 ) { $email="test@test.com"; $message="Reading:" . $values["Reading"]; $subject="Sample subject"; mail($email, $subject, $message); } Regarding graphs - it's easy to plugin JPGraph or similar solution. Basically you just need to provide a set of data to graphing routine and it takes care of evertything. As I mentioned ealier you need to contact me directly at support@xlinesoft.com in regards of purchase questions. |
L
|
larsonsc 1/3/2007 |
On the line below: $message="Reading:" . $values["Reading"] ; This works good for the Reading, but if I wanted to output the email like this for instance: Reading:50 Math:50 Science:50 How could I accomplish this? Thank You <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=14260&image=1&table=forumreplies' class='bbc_emoticon' alt=':rolleyes:' />
if ( $values["Reading"]==58 )
|
T
|
tdh author 1/4/2007 |
Thanks Shawn for the reply. I tried using the synthax you posted, but it only output the last one. Keep adding as many $message= lines as you need. I Think to have multiples, it would look something like this: if ( $values["Reading"]==58 )
|
L
|
larsonsc 1/4/2007 |
Oh, sorry...I didn't pay attention to the $values parameter being passed to the if statement. The support team might have to give you some better code, but I think this should be pretty close to what you need. This would generate an email for any test score entered into any of the three fields with a value less than 60. You could of course customize the values to whatever you need. if (($values["Reading"] < 60) || ($values["Math"] < 60) || ($values["Science"] < 60)) {
|
T
|
tdh author 1/5/2007 |
Thanks Shawn! Oh, sorry...I didn't pay attention to the $values parameter being passed to the if statement. The support team might have to give you some better code, but I think this should be pretty close to what you need. This would generate an email for any test score entered into any of the three fields with a value less than 60. You could of course customize the values to whatever you need. if (($values["Reading"] < 60) || ($values["Math"] < 60) || ($values["Science"] < 60)) {
|
L
|
larsonsc 1/5/2007 |
Fantastic TonyD! Glad that worked out for you. |