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)

Link to comment
Share on other sites

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

Link to comment
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.