I have an echo statement that is supposed to run a specific amount of times, i.e ‘n’ times, right now the function abc() is empty, for testing purposes, what I’m trying to to is this:-
echo "
<form method=\"post\" action=\"<?php abc(); ?>\" >
<input type='text' name='comment' style='width: 80%;height: 70px; margin-left: 60px' /> <br/>
<input type='submit' value='submit comment' style='margin-left:60px' />
</form>
";
but every time I click the button to submit the form I get the error
Forbidden
You don’t have permission to access /< on this server.
If what I am trying to do isn’t possible, is there an alternative way?
What I want to do is; create a button which, when clicked, calls a php function (which may or may not reload the page, doesn’t really matter). There will be multiple functions created via a loop and for each loop iteration the values passed to the function will be different. By values, I don’t mean variable types, I mean variable values will be different. I know there aren’t any variables passed to the abc function at the moment, but like I said, abc function is for testing only to try to get past the forbidden error.
What I am actually trying to do is this..
$doubleinverted='"';
echo "
<form action=".$doubleinverted."<?php f_comment(".$row['ScrapId'].",'".$row1['Email']."');?>".$doubleinverted." method='post'>
<input type='text' name='comment' style='width: 80%;height: 70px; margin-left: 60px' /><br/>
<input type='submit' value='submit comment' style='margin-left:60px' />
</form>
";
I know you can add inverted commas like \", but I just found that out.
Also, this echo statement will be in a loop and for each iteration, the values passed to the function will be different
The action of the form is
<?php abc(); ?>while you are already in PHP mode. I’m afraid I can’t let you do that Dave!Change the form to
<form method=\"post\" action=\"' . abc() . '\" >