cgkh.webservices Posted March 9, 2009 Share Posted March 9, 2009 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 Quote Link to comment https://forums.phpfreaks.com/topic/148618-form-question/ Share on other sites More sharing options...
JonnoTheDev Posted March 9, 2009 Share Posted March 9, 2009 Can you not select the fields you need and join the tables using your SQL Quote Link to comment https://forums.phpfreaks.com/topic/148618-form-question/#findComment-780439 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.