Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.