![]() |
|
|
+ Search |
![]()
|
Mar 19th, 2008 21:56
ha mo, Scott Noyes, B C,
Form variables appear in two superglobal arrays: $_REQUEST, and either
$_GET or $_POST. The element names appear as the indices of these arrays.
For example, if your form contained this element:
<input type='text' name='tableName'>
then the value of that input will appear in
$_REQUEST['tableName']
You can construct a string in several ways. The following all result in
the same string:
$sql = sprintf("CREATE TABLE %s", $_REQUEST['tableName']);
$sql = "CREATE TABLE " . $_REQUEST['tableName'];
$sql = "CREATE TABLE {$_REQUEST['tableName']}";
http://www.php.net/reserved.variables
http://www.php.net/manual/en/function.sprintf.php
http://www.php.net/types.string
http://www.tantofa.com
http://www.fantofa.com
http://www.mantofa.com
http://www.tanpola.com
http://www.tampola.com
http://www.yamot.com
http://www.mozmar.com
http://www.templatestemp.com