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
https://forums.phpfreaks.com/topic/261477-coding-help-pls/
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
https://forums.phpfreaks.com/topic/261477-coding-help-pls/#findComment-1339824
Share on other sites

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.