Echoing a form from a string

cloddy

New Member
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:-\[code\]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='http://stackoverflow.com/questions/10558829/submit comment' style='margin-left:60px' /></form>";\[/code\]but every time I click the button to submit the form I get the error\[quote\] Forbidden You don't have permission to access /< on this server.\[/quote\]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..\[code\]$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='http://stackoverflow.com/questions/10558829/submit comment' style='margin-left:60px' /> </form>";\[/code\]I know you can add inverted commas like \[code\]\"\[/code\], 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
 
Back
Top