Jump to content
Sign in to follow this  
cyberfly

Masukkan Markah Selepas Submit

Recommended Posts

Gmbar 1- List peserta format Single

listad4.jpg

Gambar 2 - Masukkan markah untuk peserta

markahkv8.jpg

Gambar 3 - table markah dalam database

markahtablerk6.jpg

Problem aku camni.Seperti gmbar 1,byk peserta dalam senarai tersebut.Bila aku tekan link markah,akn direct ke page markah mcm dalam Gambar 2.

Sistem aku ni,pengguna perlu masukkan markah selepas habis setiap game.Maknanya selepas habis game pertama,aku perlu masukkan markah dlm game1,klik submit dan proceed untuk markah peserta lain.

Problem sekarang ialah camne aku nak masukkan markah untuk game ke 2 dan seterusnya?Idea aku bila tekan balik link markah tu,markah game1 yg aku masukkan tadi dah keluar dalm column game1.Cth mcm dalam gmbar 4.

Gambar 4 - Step masa nak masukkan markah game2

markah3cy2.jpg

Ni coding mengikut idea aku,sape2 tau tlg tambah ye

<?php

$query="select * from markah where idPeserta='1' and idKejohanan='3'";
$doquery=mysql_query($query) or die(mysql_error());

$bilrow=mysql_num_rows($doquery);

if($bilrow<1)
{
$insert=mysql_query("INSERT INTO markah(idPeserta,idKejohana,game1) VALUES(1.3.$game1)");
}
else
{
$update=mysql_query("UPDATE markah SET game2=$game2");
{

?>

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...