Jump to content

Shawn

Members
  • Posts

    5
  • Joined

  • Last visited

Shawn's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. In main pages. I get to data, $id and $pwIt will popup a new windows(login.php) after I clicked submit. main.php<form name="form1" method="post" action="login.php"><input name="id" type="text" id="id" size="8" maxlength="8" style="font-size:12px"><input name="pw" type="password" id="pw" style="font-size:12px" value="" size="8"><a href="#" onClick="popwin=window.open('login.php','popwin','scrollbars, width=850,height=650');"> <input type="image" src="images/submit.gif" name="submit" value="submit" onClick="()">$id and $pw can not put into login.php, please help to solve. Thanks a lot.
  2. I use...$query=mysql_query("select * from record where id='$id');It choose line 1,5,8 in record.And I want to sum object 'print' in this 3 line.How to write the script?? Thanks a lot, a lot.
  3. Sorry for my late reply,I have a input page before. below is my script. THanks $list=mysql_query("select * from member");while (list($mno,$id,$pw,$nick,$team)=mysql_fetch_row($list)){ $check=mysql_query("select * from record where matchid='$no' and mno='$mno'"); list($rno,$matchid,$mno,$mgoal,$massist,$attend)=mysql_fetch_row($check); $mgoal=$mgoal; $massist=$massist; echo "<tr><td>$nick"; echo "<td><input type=text name=goal$mno size=1 maxlength=2 value=$mgoal>"; echo "<td><input type=text name=assist$mno size=1 maxlength=2 value=$massist>"; echo "<td><input type=checkbox name=attend$mno $attend>";}
  4. Hi gahzinia.I have not get error message, it also can add 1 row, but the value of mgoal,massist,attend is 0,0,0. matchid and mno is no problem.
  5. Red highlight item.$query=mysql_query("select * from member");while (list($mno,$id,$pw,$nick,$team)=mysql_fetch_row($query)){ $mgoal=$_POST["goal$mno"]; $massist=$_POST["assist$mno"]; $attend=$_POST["attend$mno"]; if ($attend!="") { $attend="checked"; } $check=mysql_query("select * from record where matchid='$no' and mno='$mno'"); $row=mysql_num_rows($check); if ($row==0) $record="insert record (matchid,mno,mgoal,massist,attend) values ('$no','$mno','$mgoal','$massist','$attend')"; mysql_query($record); echo "a"; } else { $update="update record set mgoal='$mgoal',massist='$massist',attend='$attend' where matchid='$no' and mno='$mno'"; mysql_query($update); echo $no; }}
×
×
  • Create New...