Jump to content

Can you give me an example?..


Taku

Recommended Posts

<?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)

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

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.