jushiro Posted April 23, 2012 Share Posted April 23, 2012 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 Quote Link to comment https://forums.phpfreaks.com/topic/261477-coding-help-pls/ Share on other sites More sharing options...
Muddy_Funster Posted April 23, 2012 Share Posted April 23, 2012 your database is totaly insuficcient for the task you want to perform. You will need multiple tables and relational fields. Quote Link to comment https://forums.phpfreaks.com/topic/261477-coding-help-pls/#findComment-1339818 Share on other sites More sharing options...
jushiro Posted April 23, 2012 Author Share Posted April 23, 2012 What do you mean? But what i want is to query just those 3 values from my database and have button for that. Quote Link to comment https://forums.phpfreaks.com/topic/261477-coding-help-pls/#findComment-1339819 Share on other sites More sharing options...
jushiro Posted April 23, 2012 Author Share Posted April 23, 2012 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. Quote Link to comment https://forums.phpfreaks.com/topic/261477-coding-help-pls/#findComment-1339824 Share on other sites More sharing options...
scootstah Posted April 23, 2012 Share Posted April 23, 2012 He means that there is no way to reference that data from other tables. You'll need to use ID's and such so that you will be able to tell your feedback posts which item they belong to. Quote Link to comment https://forums.phpfreaks.com/topic/261477-coding-help-pls/#findComment-1339826 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.