Location: PHPKode > scripts > AskPeople-Free PHP survey application > AskPeople_2_2_2/templatepreview.php
<?php

$template = file_get_contents($_REQUEST['templatename']);

$replacetext = "
<h1 class='clearbox'>Name of Survey</h1>

<div id='introduction'>
	<p>The introduction to the questionnaire goes here</p>
</div>

<div class='page'>
	<div class='question single'>
		<p class='questiontext'>The question text appears here</p>
		<p class='singleoption'>
			<label><input type='radio' name='answers[1][code]' value=\"Option1\" /> Option A</label>		
		</p>
		<p class='singleoption'>
			<label><input type='radio' name='answers[1][code]' value=\"Option2\" /> Option B</label>		
		</p>
		<p class='singleoption'>
			<label><input type='radio' name='answers[1][code]' value=\"Option2\" /> Option C</label>		
		</p>
	</div>
</div>

<div id='surveycontrol'>
	<div id='progress'><p id='progressindicator'><span id='progressbar' class='continuationpage' style='width:50%;'>50%</span>&nbsp;complete</p></div>

	<div id='buttons'><input type='submit' name='direction' value='Previous' />&nbsp;<input type='submit' name='direction' value='Next' /></div>
	<div class='breaker'></div>
</div>

";

$template = str_replace("<!-- SURVEYFORM -->",$replacetext,$template);

echo ($template);

?>
Return current item: AskPeople-Free PHP survey application