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="<input type="text" name="<?php echo $row['Field']; ?>" value="<?php echo $row['Field']; ?>" />" /> TextField</label>
<label><input type="radio" name="type_<?php echo $row['Field']; ?>" value="<textarea name="<?php echo $row['Field']; ?>"></textarea>" /> TextArea</label>
<label><input type="radio" name="type_<?php echo $row['Field']; ?>" value="<input type="checkbox" name="<?php echo $row['Field']; ?>" value="<?php echo $row['Field']; ?>" />" /> Checkbox</label>
<label><input type="radio" name="type_<?php echo $row['Field']; ?>" value="<input name="<?php echo $row['Field']; ?>" type="radio" value="<?php echo $row['Field']; ?>" />" /> Radio</label><br /><br />
<?php } ?>
<input type="submit" name="Submit" value="Generate" />
</form>