Function name must be a string
Posted: Sun Apr 06, 2008 6:39 am
Hi Group!
I'm sure many of you have come across this particular error but this would be my first and it's doing my head in...
Error:
Fatal error: Function name must be a string in /home/logisof/public_html/testing/index.php on line 10
Line 10:
If ($isset($Page)) {
Code:
<?php
If ($isset($Page)) {
$questions = split(':', $_POST["QuestionID"]);
foreach ($questions as $id) {
$_SESSION["answers"] .= $id . ":" . $_POST['$id'] . "#";
}
If ($Page > 2) {
$to = "<email>";
$subject = "<subject>";
$txt = <answers>;
$header = "<from>";
mail($to,$subject,$txt,$headers);
echo "Thanks for participating. Your results have now been emailed.";
}
else {
writeQandA($Page);
echo '<A HREF=/"<link>?page=&' . ($Page + 1) . '\"';echo "Next Page</A>";
}
}
else {
echo "Welcome...";
}
function writeQandA($page)
{
Any assistance will be GREATLY appreciated.
Thanks,
Jess.
I'm sure many of you have come across this particular error but this would be my first and it's doing my head in...
Error:
Fatal error: Function name must be a string in /home/logisof/public_html/testing/index.php on line 10
Line 10:
If ($isset($Page)) {
Code:
<?php
If ($isset($Page)) {
$questions = split(':', $_POST["QuestionID"]);
foreach ($questions as $id) {
$_SESSION["answers"] .= $id . ":" . $_POST['$id'] . "#";
}
If ($Page > 2) {
$to = "<email>";
$subject = "<subject>";
$txt = <answers>;
$header = "<from>";
mail($to,$subject,$txt,$headers);
echo "Thanks for participating. Your results have now been emailed.";
}
else {
writeQandA($Page);
echo '<A HREF=/"<link>?page=&' . ($Page + 1) . '\"';echo "Next Page</A>";
}
}
else {
echo "Welcome...";
}
function writeQandA($page)
{
Any assistance will be GREATLY appreciated.
Thanks,
Jess.