Re: [PHP-WIN] insert data in to columns base on the selection of the list box.

2007-04-04 Thread Mikael Grön
Well, simply put (not really following your structure): --- code --- $sql = "update $tablename set address = '$address', phone = '$phone' where LastName = '$lastname';"; if (mysql_query($sql)): echo "Updated " . $_POST['R'] . "\n"; else: echo "Error: " . mysq

Re: [PHP-WIN] insert data in to columns base on the selection of the list box.

2007-04-04 Thread Mikael Grön
I don't get the purpose of your code. It's not looking right anywhere! I'm guessing the select-box isn't working too well, right? Let's say there's 4 $lines: foreach ($line as $value) { echo"$value"; will produce: value='value3'value4 ... You need to use this code for the

Re: [PHP-WIN] insert data in to columns base on the selection of the list box.

2007-04-03 Thread sam rumaizan
bedul, This is what I need (don't worry about the variable names since they are different from my previous email.) '; $query = "SELECT Assign_Engineer FROM lodata"; $result = mysql_query($query); echo""; echo""; echo""; echo""; echo"Choose Name : "; while ($line = m

RE: [PHP-WIN] insert data in to columns base on the selection of the list box.

2007-04-03 Thread sam rumaizan
Thank you for your corroboration. Maybe my question wasn’t clear. What I need to do is: 1- I have a table in mysql with column1(Last Name), column2(address), column3(phone Number), column4(job), column5(favorite food) 2- I have created a while loop to populate the list box in my webpage. 3

RE: [PHP-WIN] insert data in to columns base on the selection of the list box.

2007-04-03 Thread Bill Bolte
When you say "update in to column2, column3..." are you referring to the list boxes or database tables? If it's the list boxes, are you wanting this to happen on the client side? Or are you putting the data all out at once? -Original Message- From: sam rumaizan [mailto:[EMAIL PROTECTED]