Jump to content

Form question


Recommended Posts

As a newbie I have been fiddling around with php/mysql for a couple of years of and on.

 

I am trying now to build a new sub website which will have a form that using php will write to a MYSQL database.

 

However, I would like to use this form as a template for other future forms. So I would like to actually be able to design a form that calls the field descriptions from one table in the database, the INPUT name description from another table, etc.

 

I have got the form working calling the field descriptions from one table using a while loop.

 

$rib_ql_1 = "SELECT * FROM Ticker_Master_From_Headers ";

$rib_ql_2 = mysql_query($rib_ql_1) or die(mysql_error());

 

while ($rib_ql_3 = mysql_fetch_array( $rib_ql_2,MYSQL_ASSOC ))

{

$rib_ql_4 = $rib_ql_3['item_name'];

 

Print "<tr>";

Print "<td>$rib_ql_4:</td>";

Print "<td><input type=\"text\" name=\"$xxxxx\" \/></td>";

Print "</tr>";

 

}

 

However, I now want to be able to call the variable $xxxxx from another table. Is it possible ot join two while statements?

 

I have spent time scouring the net for a tutorial to try and work through this without any success.

 

Can anyone here point me to a good tutorial where I might be able to work through this.

 

Many Thanks

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/148618-form-question/
Share on other sites

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.