Taku Posted January 28, 2013 Share Posted January 28, 2013 an example on how to put the retrieve data from database to a textfields? Quote Link to comment https://forums.phpfreaks.com/topic/273729-can-you-give-me-an-example/ Share on other sites More sharing options...
Muddy_Funster Posted January 28, 2013 Share Posted January 28, 2013 could you define "text fields"? Quote Link to comment https://forums.phpfreaks.com/topic/273729-can-you-give-me-an-example/#findComment-1408708 Share on other sites More sharing options...
Christian F. Posted January 28, 2013 Share Posted January 28, 2013 http://php.net/manual/en/reserved.variables.php Quote Link to comment https://forums.phpfreaks.com/topic/273729-can-you-give-me-an-example/#findComment-1408738 Share on other sites More sharing options...
thara Posted January 28, 2013 Share Posted January 28, 2013 what have you done so far? Please post your code and then others will help you to fix your problem. Quote Link to comment https://forums.phpfreaks.com/topic/273729-can-you-give-me-an-example/#findComment-1408759 Share on other sites More sharing options...
Taku Posted January 28, 2013 Author Share Posted January 28, 2013 <?php require "view_connect.php"; $query = "SELECT * FROM f_beg WHERE inven_id=4"; $result= mysql_query($query); $num=mysql_num_rows($result); $i=0; while ($i < $num); { $clt=mysql_result($result,$i,"Cafe_Latte"); $ct=mysql_result($result,$i,"Chocolate"); $i++; } ?> here is my code wherein I am planning to put the Cafe_Latte(from db table) to $clt(which is the name of the textfield) is this correct? (I believe I done something wrong because I don't know how to do this) Quote Link to comment https://forums.phpfreaks.com/topic/273729-can-you-give-me-an-example/#findComment-1408766 Share on other sites More sharing options...
Muddy_Funster Posted January 29, 2013 Share Posted January 29, 2013 $clt is the name of the variable, you still havn't clarified what you meen by "text field". Oh, and please don't use SELECT * Quote Link to comment https://forums.phpfreaks.com/topic/273729-can-you-give-me-an-example/#findComment-1408910 Share on other sites More sharing options...
cyberRobot Posted January 29, 2013 Share Posted January 29, 2013 Do you have any code where you attempted to put data in a "text field"? If you're looking to populate a form field, maybe this will help: http://forums.phpfre...m/#entry1393942 Side note: you're probably already aware of this, but the mysql_* functions have been depreciated. It might be time to look into an alternative. More information can be found here: http://php.net/manua...ysql-result.php Quote Link to comment https://forums.phpfreaks.com/topic/273729-can-you-give-me-an-example/#findComment-1408953 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.