This topic is locked

Send Mail to selected checkboxes

7/31/2008 9:10:39 AM
PHPRunner General questions
B
bowlingmar author

Hi...great software you created there! But I'm having a little problem.
I created a databases containing 3 tables ( students, courses, whowhat). By checking the checkboxes in front of all courses I'd like to have the opportunity to send a message to each of the students who follow that course. When the page for the courses is created I can see all possible courses with a checkbox in front of it ( the way I want it...so far so good) .

I also inserted a text field already, but I want the message that I type in the text field to be sent to all students who follow that course.
For example, a working SQL statement is (this works for me when I do not load the courses dynamically, but just create the script myself, writing my own php code, not using phprunner)

Don't bother about the structure...only the last part is important:
[codebox]SELECT student.Mail FROM students, courses, whowhat WHERE students.Name = whowhat.Name AND whowhat.CourseId = courses.Id AND Course= 'Economics';[/codebox]
But is this statement , "economics" should be replaced by the (variable) word that is loaded next to the checkbox. I thought you called the checkbox : selection[]. But I don't know how to deal with it.
I also tried to load a list dynamically in Dreamweaver and this worked as well (the chexbox name was checkgroup1)

[codebox]....AND Course= . $_GET['checkGroup1'].[/codebox]
I (first of all hope you understand my question and) hope you can help me with this issue.
Tnx a lot in advance,

Ingmar

J
Jane 7/31/2008
B
bowlingmar author 8/1/2008

Thanks, but I'm sorry ...I still don't know which variable name to use in my SQL statement.

Could you please help me out with this as that function is the mean reason I use PhpRunner.

J
Jane 8/1/2008

Hi,
have you checked the above thread?

I think it's the same problem.

B
bowlingmar author 8/1/2008

I checked it but I'm not a phpexpert (otherwise I wouldn't buy phprunner probably:p), but I don't seem to find the link with my issue.

I just have to know the variable name for a dynamically loaded checkbox to put into my SQL statement. Pls help. Tnx!

J
Jane 8/1/2008

Hi,
there is no such variable.

You can create new link, check selected records in the Before delete event and save ID os selected records in the $_SESSION variable.