Jump to content

Can the name of a textbox be numbers?


JakeSilver

Recommended Posts

This is a dynamic form  :( and i am not having any luck at all. Im trying to assign a text box to a record in the database. i shall show some code :

 

<?$sectionquery=mysql_query("SELECT * FROM `section` ORDER BY 'id' ASC");

while($data=mysql_fetch_object($sectionquery)){

echo "<p>$data->name<input type='text' value='' name='$data->textcode' size='4'></p> ";

}

 

$data->textcode is a ten digit number

 

if ($_POST['Submit']){

$numsec=mysql_query("SELECT * FROM `section` ORDER BY 'id' ASC")or die (mysql_error()); 

while($secdata=mysql_fetch_object($numsec)){
$boxcode=$secdata->textcode;
echo $boxcode;
$navvalue= $_POST['$boxcode'];
echo" this is nav value $navvalue";

 

When i echo $boxcode it appears as the same number as $data->textcode which is correct

 

However it does not get the value of the textbox  :-[

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.