Hi, i have been stuc on this script literally for over 5 years. I’ve asked different forums year ago, but nobodys’ answer helped, so im finaly giving it another go. I have a small portion of the code I re did from scratch on a new document, but it wont work. I am trying to update with a form
I want to be able to clikc theo ne submit button at the button, but there is one text box for every row in my db that the “location” s set to 2.
basically iits somewhat like this:
name image - (textare for price)
name image (text area for price
SUBMIT
when i press submit it updates all of the price box to “Array”
here is my code:
[php][$uprice = $_POST[‘update’];
$updates = $_POST[‘price’];
if(!isset($uprice)) {
$get1 = “SELECT * FROM uitems WHERE username=’$suserid’ AND location=‘2’”;
$get = mysql_query($get1);
while($data = mysql_fetch_array($get)) {
$id = $data[‘uitemid’];
$owner = $data[‘username’];
$item = $data[‘theitemid’];
$location = $data[‘location’];
$price = $data[‘price’];
$item1 = “SELECT * FROM items WHERE itemid=’$item’”;
$getits = mysql_query($item1);
while($thi = mysql_fetch_array($getits)) {
$theid = $thi[‘itemid’];
$name = $thi[‘name’];
$pic = $thi[‘image’];
$desc = $thi[‘description’];
echo “
}
}
echo “”;
echo “”;
}
if(isset($uprice)) {
mysql_query(“UPDATE uitems SET price=’$updates’ WHERE username=’$suserid’ AND location=‘2’”);
echo “yes”;
}/php]]
again, even if i manually update the prices in the DB, and change them to what i want to, it shows in the textarea and database to “Array” if you need moren info before helping me please ask, if not can you please help me find a solution? ive been programming different sites for over 14 years now and this one has stumped me for years,. thank you in advance