joeliar Posted October 2, 2007 Share Posted October 2, 2007 <html> <head> <title>Untitled Document</title> </head> <body> <p> <?php include('mysql_connect.php'); $name = " "; $idsubmit = " "; $todays = mktime(0, 0, 0, date("m"), date("d"), date("y")); $datetoday = date("m/d/y", $todays); if(isset($_POST['submitbutton']) && strlen($_POST['idsubmit']) > 0){ $idsubmit = $_POST['idsubmit']; $query="SELECT * FROM user_transaction WHERE userid='$idsubmit' AND date='$datetoday'"; $result= mysql_query($query)or die("find all programme fatal error:".mysql_error()); $numcheck=mysql_numrows($result); if($numcheck == 0){ $query = "INSERT INTO user_transaction VALUES ('$idsubmit','1','$datetoday')"; mysql_query($query); } $query="SELECT * FROM mep WHERE userid='$idsubmit'"; $result=mysql_query($query)or die("find all programme fatal error:".mysql_error()); $num=mysql_numrows($result); $i=0; } mysql_close(); ?> </p> <table width="59%" height="156" border="1" align="center"> <tr> <td height="27" colspan="2"><form id="form1" name="form1" method="post" action=""> <label for="Submit"></label> <div align="center"> <input type="submit" name="Submit" value="GUEST / NEW MEMBER" id="Submit" /> </div> </form></td> </tr> <tr> <td width="50%">Date : <?php echo date("d/m/y", $todays); ?> </td> <td width="50%"> </td> </tr> <tr> <td valign="top"> <table width="316" height="99" border="1"> <tr> <td height="24" valign="top">NO</td> <td>NAME</td> <td>TIME</td> <td>DETAIL</td> </tr> <tr> <? while ($i < $num) { $name=mysql_result($result,$i,"name"); $i++; ?> <td valign="top"><form name="form8" method="post" action=""> <label for="textfield"></label> <input type="text" name="textfield"value="<? echo $i;?>"size="5"> </form> </td> <td valign="top"><form id="form5" name="form5" method="post" action=""> <label for="label3"></label> <input name="mep" type="text" value="<?php echo $name;?>" size="20" maxlength="20" /> </form></td> <td valign="top"><form id="form4" name="form4" method="post" action=""> <label for="label3"></label> <label for="textfield"></label> <input name="mep" type="text" value="<?php echo time("s/m/h", $todays);?>" size="8" maxlength="8" /> </form></td> <td valign="top"><form id="form3" name="form3" method="post" action=""> <label for="label2"></label> <div align="center"> <input type="submit" name="Submit3" value="Click" id="label2" /> </div> </form></td> </tr> <? } ?> </table> </td> <td valign="top"><table width="316" height="99" border="1"> <tr> <td height="21" valign="top">NO </td> <td>NAME</td> <td>TIME</td> <td>DETAIL</td> </tr> <tr> <? while ($i < $num) { $name=mysql_result($result,$i,"name"); $i++; ?> <td valign="top"><form name="form9" method="post" action=""> <label for="textfield"></label> <input type="text" name="textfield2"value="<? echo $i;?>"size="5"> </form> </td> <td valign="top"><form id="form6" name="form6" method="post" action=""> <label for="label4"></label> <input name="mep" type="text" value="<?php echo $print['NAME'];?>" size="20" maxlength="20" /> </form></td> <td valign="top"><form id="form7" name="form7" method="post" action=""> <label for="label5"></label> <input name="mep" type="text" value="<?php echo $print['TIME'];?>" size="8" maxlength="8" /> </form></td> <td valign="top"><form id="form2" name="form2" method="post" action=""> <label for="label"></label> <div align="center"> <input type="submit" name="Submit2" value="Click" id="label" /> </div> </form></td> </tr> <? } ?> </table></td> </tr> </table> </body> </html> <? function checkusertoday($userid,$today){ $idsubmit = $_POST['idsubmit']; $query="SELECT * FROM user_transaction WHERE userid='$idsubmit' date='$today' LIMIT 1"; $result=mysql_query($query)or die("find all programme fatal error:".mysql_error()); $num=mysql_numrows($result); return $num; } function insertusertoday($userid,$today){ $query = "INSERT INTO contacts VALUES ($userid,1,$today)"; mysql_query($query); } function listtodayuser(){ } Link to comment https://forums.phpfreaks.com/topic/71468-cant-make-the-row-in-the-inside-lab-member-adding/ Share on other sites More sharing options...
jd2007 Posted October 2, 2007 Share Posted October 2, 2007 please post the code again inside <code></code>... Link to comment https://forums.phpfreaks.com/topic/71468-cant-make-the-row-in-the-inside-lab-member-adding/#findComment-359767 Share on other sites More sharing options...
joeliar Posted October 2, 2007 Author Share Posted October 2, 2007 <html> <head> <title>Untitled Document</title> </head> <body> <p> <?php include('mysql_connect.php'); $name = " "; $idsubmit = " "; $todays = mktime(0, 0, 0, date("m"), date("d"), date("y")); $datetoday = date("m/d/y", $todays); if(isset($_POST['submitbutton']) && strlen($_POST['idsubmit']) > 0){ $idsubmit = $_POST['idsubmit']; $query="SELECT * FROM user_transaction WHERE userid='$idsubmit' AND date='$datetoday'"; $result= mysql_query($query)or die("find all programme fatal error:".mysql_error()); $numcheck=mysql_numrows($result); if($numcheck == 0){ $query = "INSERT INTO user_transaction VALUES ('$idsubmit','1','$datetoday')"; mysql_query($query); } $query="SELECT * FROM mep WHERE userid='$idsubmit'"; $result=mysql_query($query)or die("find all programme fatal error:".mysql_error()); $num=mysql_numrows($result); $i=0; } mysql_close(); ?> </p> <table width="59%" height="156" border="1" align="center"> <tr> <td height="27" colspan="2"><form id="form1" name="form1" method="post" action=""> <label for="Submit"></label> <div align="center"> <input type="submit" name="Submit" value="GUEST / NEW MEMBER" id="Submit" /> </div> </form></td> </tr> <tr> <td width="50%">Date : <?php echo date("d/m/y", $todays); ?> </td> <td width="50%"> </td> </tr> <tr> <td valign="top"> <table width="316" height="99" border="1"> <tr> <td height="24" valign="top">NO</td> <td>NAME</td> <td>TIME</td> <td>DETAIL</td> </tr> <tr> <? while ($i < $num) { $name=mysql_result($result,$i,"name"); $i++; ?> <td valign="top"><form name="form8" method="post" action=""> <label for="textfield"></label> <input type="text" name="textfield"value="<? echo $i;?>"size="5"> </form> </td> <td valign="top"><form id="form5" name="form5" method="post" action=""> <label for="label3"></label> <input name="mep" type="text" value="<?php echo $name;?>" size="20" maxlength="20" /> </form></td> <td valign="top"><form id="form4" name="form4" method="post" action=""> <label for="label3"></label> <label for="textfield"></label> <input name="mep" type="text" value="<?php echo time("s/m/h", $todays);?>" size="8" maxlength="8" /> </form></td> <td valign="top"><form id="form3" name="form3" method="post" action=""> <label for="label2"></label> <div align="center"> <input type="submit" name="Submit3" value="Click" id="label2" /> </div> </form></td> </tr> <? } ?> </table> </td> <td valign="top"><table width="316" height="99" border="1"> <tr> <td height="21" valign="top">NO </td> <td>NAME</td> <td>TIME</td> <td>DETAIL</td> </tr> <tr> <? while ($i < $num) { $name=mysql_result($result,$i,"name"); $i++; ?> <td valign="top"><form name="form9" method="post" action=""> <label for="textfield"></label> <input type="text" name="textfield2"value="<? echo $i;?>"size="5"> </form> </td> <td valign="top"><form id="form6" name="form6" method="post" action=""> <label for="label4"></label> <input name="mep" type="text" value="<?php echo $print['NAME'];?>" size="20" maxlength="20" /> </form></td> <td valign="top"><form id="form7" name="form7" method="post" action=""> <label for="label5"></label> <input name="mep" type="text" value="<?php echo $print['TIME'];?>" size="8" maxlength="8" /> </form></td> <td valign="top"><form id="form2" name="form2" method="post" action=""> <label for="label"></label> <div align="center"> <input type="submit" name="Submit2" value="Click" id="label" /> </div> </form></td> </tr> <? } ?> </table></td> </tr> </table> </body> </html> <? function checkusertoday($userid,$today){ $idsubmit = $_POST['idsubmit']; $query="SELECT * FROM user_transaction WHERE userid='$idsubmit' date='$today' LIMIT 1"; $result=mysql_query($query)or die("find all programme fatal error:".mysql_error()); $num=mysql_numrows($result); return $num; } function insertusertoday($userid,$today){ $query = "INSERT INTO contacts VALUES ($userid,1,$today)"; mysql_query($query); } function listtodayuser(){ } Link to comment https://forums.phpfreaks.com/topic/71468-cant-make-the-row-in-the-inside-lab-member-adding/#findComment-359772 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.