it doesnt like the variable and gives the T_VARIABLE error any ideas
Code: Select all
<?php
$table=$_POST['tbname'];
if ($_POST['form_create_table'] == 'yes'){
$endfield=1;
while ( $endfield <= $howmanyfields ) {
$field$endfield=$_POST['field$endfield'];
$endfield++;
}
$endfield=1;
while ( $endfield <= $howmanyfields ) {
$length$endfield=$_POST['length$endfield'];
$endfield++;
}
$endfield=1;
while ( $endfield <= $howmanyfields ) {
$attribute$endfield=$_POST['attribute1$endfield'];
$endfield++;
}
$endfield=1;
while ( $endfield <= $howmanyfields ) {
$null$endfield=$_POST['null$endfield'];
$endfield++;
}
$endfield=1;
while ( $endfield <= $howmanyfields ) {
$default$endfield=$_POST['default$endfield'];
$endfield++;
}
$endfield=1;
while ( $endfield <= $howmanyfields ) {
$extra$endfield=$_POST['extra$endfield'];
$endfield++;
}
$endfield=1;
$maketable="CREATE TABLE $_POST['tbname'];(
while ( $endfield <= $howmanyfields ) {
$field$end varchar($length$end) $null$end $default$end '',
$endfield++;
}thanks reece