Jump to content

CODING HELP :(.. pls'


jushiro

Recommended Posts

Im having trouble making a code for a feedback system.

Can anyone help me to make a code like this.

 

I have a table w/c contains

--------------------------------------------

| Itemname | Itemprice | Seller |

 

Laptop | 15000 | Name

Phone | 5000 | Name

-----------------------------------

 

Then.. i want a code that will query those values.. And have a button :

[bUY] and after the values.

 

Then after clicking POST FEEDBACK it will show the values of the SELLER name in another page.

 

HELP ME PLS :(

Link to comment
Share on other sites

I dont know how to say it but. To simplify this :

 

I want to know how can i put values on the button?

 

what i did is make a array to output those values and have buttons. here.

 

if($result){
while($row = mysql_fetch_assoc($result)) 
    { 
    $itemname = $row['itemname']; 
$itemprice= $row['itemprice']; 
$owner =$row['owner']; 

$items[] = array($itemname,$itemprice,$owner);
    } 
}



echo("<form action=\"buy.php\" method=\"post\">\n");
for ($i=0;$i<count($items);$i++) {
	echo("".$items[$i][0]."<br>\n");
	echo("".$items[$i][1]."<br>\n");
	echo("".$items[$i][2]."<br>\n");

	echo "<input type=\"submit\" value=\"BUY\" name =\"buy\">";
	echo "<input type=\"submit\" value=\"POST FEEDBACK\" name=\"name\"></br><br></form>";

}

 

 

I succeeded in making those queries and button. but my problem is'

The button "POST FEEDBACK" i want it to have the value of $items[$i][2]..

So that when i turn to the next page i can echo the value of that POST FEEDBACK.

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.