Jump to content

karthik.v29

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by karthik.v29

  1. Hey guys i have a project, Im wondering on how to approach it I have 5x5 table which is filled with data 1 day at a time. I need to save and retrieve the values everyday and show the same incomplete table to the user for 5 days. after 5 days i need to upload the values to DB. Uploading to DB isnt an issue. where/how to save data for each day and retrieve the values?
  2. function insertUserTeam($user_id,$teamname,$driver1,$driver2,$driver3,$sum){ $userid = (int)$user_id; $sum1 = (int)$sum; $link = mysqli_connect('localhost', 'user', 'pwd','db'); if($stmt = mysqli_prepare($link,"Insert into User_Team (User_ID,UTeam_Name,UTeam_Driver1,UTeam_Driver2,UTeam_Driver3,UTeam_Budget,UTeam_Points,UTeam_Susbtitue) VALUES (?,?,?,?,?,?,'0','N')")){ echo "Hello"; mysqli_stmt_bind_param($stmt,'issssi',$userid,$teamname,$driver1,$driver2,$driver3,$sum1); mysqli_stmt_execute($stmt); mysqli_stmt_close($stmt); echo "Success"; } insertUserTeam($user_id,$teamname,$driver1,$driver2,$driver3,$sum); Hey guys i am not able to insert the record in the DB. Any ideas why. There is no error on the page and the page executes fully Thanks
  3. Hello guys, I have these lines of code echo $_POST['uteamid']; $iddquery1 = mysql_query("Select Driver_ID from Driver where Driver_Name='".$temp."'"); $result = mysql_fetch_assoc($iddquery1); $idquery2 =mysql_query("Select Driver_ID from Driver where Driver_Name='".$_POST['DriverSubst']."'"); $resultidquery2 = mysql_fetch_assoc($idquery2); $replaceid = $result['Driver_ID']; echo $replaceid; $updatequery2 = "Update Team_Driver SET Driver_ID = '".$resultidquery2['Driver_ID']."' where UTeam_ID='".$_POST['uteamid']."' and Driver_ID='".$replaceid."'"; echo $updatequery2; Output of the query is: 5 1 Update Team_Driver SET Driver_ID = '2' where UTeam_ID='5' and Driver_ID='' Why is that last Driver_ID = null? wen it should be 1..and its echoing 1 right before that line. Any help will be appreciated
×
×
  • 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.