I'm very weak in Perl/PHP, spent the last 2 days figuring out passing multiple checkboxes to a PHP page and was able to figure it out with some help from online tutorials. But now I'm stuck, I've searched for any working solutions similar to my dilemma: how to pass the dynamic PHP array to Perl for emailing. The code doesn't throw any errors, but it doesn't send the info either - seems like the variables aren't being passed or not being read. Here is the code from the PHP form page:
<code>
<?php
foreach($_POST['ptitle'] as $key => $ptitle) {
print("<br><input type=\"checkbox\" name=\"ptitle[]\" value=\"$ptitle\" checked>" . $ptitle);
}
?>
</code>
This is the code from within a subroutine on my .pl page that emails the form contents:
<code>
print MAIL "PROPERTIES OF INTEREST: ";
foreach $ptitle (@ptitle)
{
print "$value ", "\n";
}
</code>
I've looked for any similar solutions and read perl books, but all it's maganged to do is confuse me even more! If I had a choice, I'd rewrite the .pl email in PHP, but that is not an option, so I need to make these 2 pages play nice together. I would appreciate any help you Perl and PHP experts can give me on this!
<code>
<?php
foreach($_POST['ptitle'] as $key => $ptitle) {
print("<br><input type=\"checkbox\" name=\"ptitle[]\" value=\"$ptitle\" checked>" . $ptitle);
}
?>
</code>
This is the code from within a subroutine on my .pl page that emails the form contents:
<code>
print MAIL "PROPERTIES OF INTEREST: ";
foreach $ptitle (@ptitle)
{
print "$value ", "\n";
}
</code>
I've looked for any similar solutions and read perl books, but all it's maganged to do is confuse me even more! If I had a choice, I'd rewrite the .pl email in PHP, but that is not an option, so I need to make these 2 pages play nice together. I would appreciate any help you Perl and PHP experts can give me on this!