Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Based on the comments I'd say a quick answer is to check the linked article in my first comment. Yes the problem is your Form Output code is likely expecting data in a variable and not code. You need to eval() the variable in order to actually execute the code contained within. However this is not best practice. </p> <p>A better solution would be to just store the contents of $email in the DB and just send that to your form</p> <p>It's the difference between: </p> <pre><code>$x = '&lt;php? echo $hello ?&gt;'; $outstr= "&lt;input type='hidden' value=' $x ' &gt;"; //no this wont work unless you use eval($x) </code></pre> <p>EDIT:</p> <p>Based on your explanation above with content, you may just need a way to ignore everything between the tags in content and replace it with the actual content? I'm assuming you can't change the db design...</p> <p>Two quick&amp; dirty &amp; perhaps unsafe thing you can try is:</p> <pre><code>include("data:,$content"); //or eval('?&gt;'.$content.'&lt;?'); </code></pre> <p>Or you can replace with regex:</p> <pre><code>$phpTagPattern = "#&lt;\?.*?(echo)\s+(\$\w+);.*?(\?&gt;|$)#s"; //just searching specifically //for &lt;?php echo $varname; ?&gt; to replace with $varname; $replacePattern = "$2"; // this may need some cleaning/debugging here. It's late... $newContent = preg_replace($phpTagPattern,$replacePattern,$content); </code></pre> <p>Then you're still going to have to parse_str to get the variable contents anyway...somewhat safer than executing code perhaps.</p> <pre><code>echo parse_str($newContent); //should get you to actual contents of $email variable </code></pre> <p>This all might be more easily achieved with the tokenizer extension: <a href="http://www.php.net/manual/en/tokenizer.examples.php" rel="nofollow">http://www.php.net/manual/en/tokenizer.examples.php</a> You'd be searching for T_OPEN_TAG and T_CLOSE_TAG.</p> <p>For a high-level Better Way To Do This(TM) kind of explanation, it would make more sense to simply store your actual data in the database, and put the content into a templating engine like smarty. Then you create the shell of the form and just pass variables to it where needed. Keep data separate from logic, and output/formatting markup separate still. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

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