|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-10-20 00:36 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 13:00:01 2025 UTC |
<?php if ((!$nome_tabella) || (!$num_campi)) { header("Location: http://localhost/mostra_creatabella.html"); exit; } $blocco_modulo =" <form method=\"post\" action=\"creatabella.php\"> <input type=\"hidden\" name=\"nome_tabella\" value=\"$nome_tabella\"> <TABLE CELLSPACING=5 CELLPADDING=5> <tr> <th>nome campo></th><th>tipo</th><th>lunghezza</th></tr> "; for ($i = 0; $i < $num_campi; $i++) { $blocco_modulo .= " <tr> <td align=center><input type=\"text\" name=\"nome_campo[]\" size=\"30\"></td> <td align=center> <select name=\"tipo_campo[]\"> <option value=\"char\">char</option> <option value=\"date\">date</option> <option value=\"float\">float</option> <option value=\"int\">int</option> <option value=\"text\">text</option> <option value=\"varchar\">varchar</option> </select> </td> <td align=center><input type=\"text\" name=\"lunghezza_campo[]\" size=\"5\"></td> </tr> "; } $blocco_modulo .= " <tr> <td align=center colspan=3<input type=\"submit\" value=\"crea la tabella\"></td> </tr> </table> </form> "; ?> <html> <head> <Title>Creazione di una tabella in un database: fase 2 </head> <body> <h1>Definizioni dei campi di <? echo "$nome_tabella"; ?> </h1> <? echo "$blocco_modulo"; ?> </body> </html>