Forum Moderators: coopster

Message Too Old, No Replies

send data at same id?

         

Meer

7:07 pm on May 10, 2009 (gmt 0)

10+ Year Member



send data at same id?
i have alot of check boxes and through that check boxex one select seat and send tha seat number to database.

i have a table named called trip in which i have some fields which are ok but they are on the start page user send booking time and selects "from" "to" after sending that there is a page of seat selection when ever im sending data of seat selection it sends data to the other line how can i send that too on the same line as the others are?

im sending data through this its working.

<?php

$connection = mysql_connect("localhost","root","password") or die("error connect");
mysql_select_db("online_bus_project");

if(isset($_POST['team']))

{

foreach($_POST['team'] as $value) {

$insert="INSERT INTO trip (seat) VALUES ('$value')";

mysql_query($insert);

}

}

?>

PokeTech

9:36 pm on May 10, 2009 (gmt 0)

10+ Year Member



function LastIdEntered() {
$last_id = mysql_fetch_array(mysql_query("select last_insert_id()"));
$id = $last_id[0];
return $id;
}

Here's a function I made a while ago. I hope this is what you are looking for.

Meer

10:49 am on May 11, 2009 (gmt 0)

10+ Year Member



ya thanx for the help