Note that there are some explanatory texts on larger screens.

plurals
  1. POEchoing a form from a string
    text
    copied!<p>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:-</p> <pre><code>echo " &lt;form method=\"post\" action=\"&lt;?php abc(); ?&gt;\" &gt; &lt;input type='text' name='comment' style='width: 80%;height: 70px; margin-left: 60px' /&gt; &lt;br/&gt; &lt;input type='submit' value='submit comment' style='margin-left:60px' /&gt; &lt;/form&gt; "; </code></pre> <p>but every time I click the button to submit the form I get the error</p> <blockquote> <p>Forbidden</p> <p>You don't have permission to access /&lt; on this server.</p> </blockquote> <p>If what I am trying to do isn't possible, is there an alternative way?</p> <p>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. </p> <p>What I am actually trying to do is this..</p> <pre><code>$doubleinverted='"'; echo " &lt;form action=".$doubleinverted."&lt;?php f_comment(".$row['ScrapId'].",'".$row1['Email']."');?&gt;".$doubleinverted." method='post'&gt; &lt;input type='text' name='comment' style='width: 80%;height: 70px; margin-left: 60px' /&gt;&lt;br/&gt; &lt;input type='submit' value='submit comment' style='margin-left:60px' /&gt; &lt;/form&gt; "; </code></pre> <p>I know you can add inverted commas like <code>\"</code>, but I just found that out. </p> <p>Also, this echo statement will be in a loop and for each iteration, the values passed to the function will be different</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload