EddieX 0 Newbie Poster

hi, i'm trying to create a form generator from mysql database, i'm already made database and table selector now im trying to generate form elements based on generated fields, so in short :
select database > select table > list fields >> in list field, people can choose what form elements they want to use for each fields like textfield,textarea, checkbox etc,
my problems is, i want to generate the result as plain text (or in textarea) but i dont know how to get this fields query into the results page, should i use $_POST ? how? please help
and this is my fields code after selecting table

<?php 
require_once('../cnct.php');
$sdb = $_GET['sdb'];
$table = $_GET['table'];
$fld = mysql_query("SHOW FIELDS FROM $sdb.$table", $cnct);
$i = 0;
?>
<form name="submit" action="generated.php" method="post">
<label>Form Name <input name="name" type="text" id="name" /></label><br /><br />
<label>Form Action <input name="action" type="text" id="action" /></label><br /><br />
<label>Form Methods 
<select name="methods" size="1" id="methods" style="margin-left:5px">
<option selected="selected">Select</option>
<option value="POST">POST</option>
<option value="GET">GET</option>
</select></label><br /><br />
<label>Form Enctype
<select name="enc" size="1" id="enc" style="margin-left:5px">
<option selected="selected">Select</option>
<option value="application/x-www-form-urlencoded">application/x-www-form-urlencoded</option>
<option value="multipart/form-data">multipart/form-data</option>
<option value="text/plain">text/plain</option>
</select></label><br /><br />
<?php while ($row = mysql_fetch_array($fld)) { ?>
<?php echo $row['Field']; ?> : <label><input type="radio" name="type_<?php echo $row['Field']; ?>" value="&lt;input type=&quot;text&quot; name=&quot;<?php echo $row['Field']; ?>&quot; value=&quot;<?php echo $row['Field']; ?>&quot; /&gt;" /> TextField</label>
<label><input type="radio" name="type_<?php echo $row['Field']; ?>" value="&lt;textarea name=&quot;<?php echo $row['Field']; ?>&quot;&gt;&lt;/textarea&gt;" /> TextArea</label>
<label><input type="radio" name="type_<?php echo $row['Field']; ?>" value="&lt;input type=&quot;checkbox&quot; name=&quot;<?php echo $row['Field']; ?>&quot; value=&quot;<?php echo $row['Field']; ?>&quot; /&gt;" /> Checkbox</label>
<label><input type="radio" name="type_<?php echo $row['Field']; ?>" value="&lt;input name=&quot;<?php echo $row['Field']; ?>&quot; type=&quot;radio&quot; value=&quot;<?php echo $row['Field']; ?>&quot; /&gt;" /> Radio</label><br /><br />
<?php } ?>	
<input type="submit" name="Submit" value="Generate" />
</form>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.