My intention;
create 3 pages of code;
Page 1: two questions are asked
a. What is the database name ($dbname)
b. How many tables to create ($tableno)
and passed onto P2 using $_GET
Page 2: creates (using a while loop) the chosen number of txt boxes (given by $tableno) and creates a unique label for each table needed.
passes onto P3
Page 3 creates the tables with no fields. (yet! lol)
Achieved;
done page 1 ok..
page 2 am suffering with,
a. dynamic creation of txt boxes - OK
b. dynamic labelling - NOT OK (ie. table0, table2, etc)
c. passing onto page 3 - NOT OK
anyone help? Here is the code for page 2;
<html>
<body>
<?php
include ('dbop.php');
$dbnamec = $_GET['create'];
$tableno = $_GET['tableno'];
$tables0 = 0;
$name[0] = 0;
$padding = '<font color="#FFFFFF">2</font><body>';
while ($tables <> $tableno)
{
echo '<form action="createtables2.php" target="main" method="get">
<table border="0" width="260">
<tr>
<td height="26">
Table ';
echo '<td height="26" width="102"><input type "text" name="$name[$tables]" /></td></tr></table>';
$tables++;
}
echo '<input type="submit" value="Create"/><BR />';
?>
</body>
</html>
(I was trying to use arrays as you can see!!)
thanks in advance.
using php5, mysql 5 on
vista with apache 2.2 (installed xampp)