zgkhoo Posted October 19, 2007 Share Posted October 19, 2007 <?php ob_start(); session_start(); echo date("D dS M,Y h:i a"); //show current date n time include 'config.php'; include 'opendb.php'; //start function of modeClick function displaybetbutton($mode){ // $modes = array('even','odd','big','small'); echo " <input type='submit' name='".$mode."Even" ."'value='97%'> </td> <td> <input type='submit' name='".$mode."Odd" ."'value='97%'> </td> <td> <input type='submit' name='".$mode."Big" ."'value='97%'> </td> <td> <input type='submit' name='".$mode."Small" ."'value='97%'> </td> <td> <input type='submit' name='".$mode."Flower10" ."'value='97%'> </td> <td> <input type='submit' name='".$mode."Flower100" ."'value='97%'> </td> <td> <input type=submit value=97%> </td> <td> <input type=submit value=97%> </td> <td> <input type=submit value=97%> </td> </tr> <tr>"; } function displayblank(){ echo " </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr>"; } function modeClick($category,$mode){ echo "modeclick"; $_SESSION['mode']=$mode; $_SESSION['category']=$category; header ('Refresh:2;url=placebet3.php'); echo "<center><table><tr><td bgcolor=#FFCC00><font color=#CC0000>Redirect to Next Page, Please Wait</font></td></tr></table></center>"; }//end of function of modeClick() echo " <h1>Place Bet2(Available Draw)</h1> <form action=placebet2.php method=post> <text>Please Select The Draw Date</text> <select name=drawnumber>"; //searching for the distinct drawdate $result=mysql_query("SELECT DISTINCT DrawDate FROM result") or die('Query failed: ' . mysql_error()); while ($row = mysql_fetch_array($result,MYSQL_ASSOC)) { echo "<option value=$row[DrawDate]>$row[DrawDate]</option>"; } //end of searching for distinct drawdate echo "</select> </br> <input type=submit name=Refresh value=Refresh></input> </form> "; function displaybet($mode){ $counter=0; $found=0; //echo "</br>detect"; $result=mysql_query("SELECT * FROM result") or die('Query failed: ' . mysql_error()); while ($row = mysql_fetch_array($result,MYSQL_ASSOC)) { //echo "</br>counter=$counter"; //echo "</br>$row[Category]"; //echo "</br>Drawdate in sql=$row[DrawDate]"; //echo "</br>POST drawdate=$_POST[drawnumber]"; if ($row[Category]==$mode && $row[DrawDate]==$_POST[drawnumber]) { //echo "if"; $found=1; }//end if else{ //echo "else"; }//end of else $counter++; }//end while loop return $found; }//end displaybet() if(isset($_POST['TotoEven'])){ modeClick('Toto','Even'); }//end of if(isset($_POST['TotoEven']) if(isset($_POST['TotoOdd'])){ modeClick("Toto","Odd"); }//end of if(isset) if(isset($_POST['TotoBig'])){ modeClick("Toto","Big"); }//end of if(isset) if(isset($_POST['TotoSmall'])){ modeClick("Toto","Small"); }//end of if(isset) if(isset($_POST['TotoFlower10'])){ modeClick("Toto","Flower10"); }//end of if(isset) if(isset($_POST['TotoFlower100'])){ modeClick("Toto","Flower100"); }//end of if(isset) if(isset($_POST['PMPEven'])){ modeClick('PMP','Even'); }//end of if(isset($_POST['TotoEven']) if(isset($_POST['PMPOdd'])){ modeClick("PMP","Odd"); }//end of if(isset) if(isset($_POST['PMPBig'])){ modeClick("PMP","Big"); }//end of if(isset) if(isset($_POST['PMPSmall'])){ modeClick("PMP","Small"); }//end of if(isset) if(isset($_POST['PMPFlower10'])){ modeClick("PMP","Flower10"); }//end of if(isset) if(isset($_POST['PMPFlower100'])){ modeClick("PMP","Flower100"); }//end of if(isset) if(isset($_POST['MagnumEven'])){ modeClick('Magnum','Even'); }//end of if(isset($_POST['TotoEven']) if(isset($_POST['MagnumOdd'])){ modeClick("Magnum","Odd"); }//end of if(isset) if(isset($_POST['MagnumBig'])){ modeClick("Magnum","Big"); }//end of if(isset) if(isset($_POST['MagnumSmall'])){ modeClick("Magnum","Small"); }//end of if(isset) if(isset($_POST['MagnumFlower10'])){ modeClick("Magnum","Flower10"); }//end of if(isset) if(isset($_POST['MagnumFlower100'])){ modeClick("Magnum","Flower100"); }//end of if(isset) if(isset($_POST['SgPoolsEven'])){ modeClick('SgPools','Even'); }//end of if(isset($_POST['TotoEven']) if(isset($_POST['SgPoolsOdd'])){ modeClick("SgPools","Odd"); }//end of if(isset) if(isset($_POST['SgPoolsBig'])){ modeClick("SgPools","Big"); }//end of if(isset) if(isset($_POST['SgPoolsSmall'])){ modeClick("SgPools","Small"); }//end of if(isset) if(isset($_POST['SgPoolsFlower10'])){ modeClick("SgPools","Flower10"); }//end of if(isset) if(isset($_POST['SgPoolsFlower100'])){ modeClick("SgPools","Flower100"); }//end of if(isset) if(isset($_POST['Refresh'])){ //if Refresh button is clicked //echo "refresh"; echo "</br>"; echo "post drawnumber=".$_POST['drawnumber']; $_SESSION['date']=$_POST['drawnumber']; echo "sesssion date=".$_SESSION['date']; //echo detect(); echo " <form action=placebet2.php method=post> <table border=1 width=100% heigth=100%> <tr> <td bgcolor=orange> </td> <td bgcolor=orange> <h5>Even</h5> </td> <td bgcolor=orange> <h5>Odd</h5> </td> <td bgcolor=orange> <h5>Big</h5> </td> <td bgcolor=orange> <h5>Small</h5> </td> <td bgcolor=orange> <h5>Flower 10</h5> </td> <td bgcolor=orange> <h5>Flower 100</h5> </td> <td bgcolor=orange> <h5>4d big</h5> </td> <td bgcolor=orange> <h5>4d small</h5> </td> <td bgcolor=orange> <h5>4d sure win</h5> </td> </tr> <tr> <td bgcolor=orange> <h5>Magnum</h5> </td> <td> "; if(displayBet("Magnum")){ displaybetbutton("Magnum"); }// end of if detectMagnum() else{ displayblank(); } echo " <td bgcolor=orange> <h5>Toto</h5> </td> <td> "; if(displayBet("Toto")){ displaybetbutton("Toto"); }// end of if detectToto() else{ displayblank(); } echo " <td bgcolor=orange> <h5>PMP</h5> </td> <td> "; if(displayBet("PMP")){ displaybetbutton("PMP"); }// end of if detectPMP() else{ displayblank(); } echo " <td bgcolor=orange> <h5>SgPools</h5> </td> <td> "; if(displayBet("SgPools")){ displaybetbutton("SgPools"); }// end of if detectSgPools() else{ displayblank(); } echo " </table> </form> "; } ?> when i click the button <input type='submit' name='".$mode."Even" ."'value='97%'> then it trigger this function and redirect function modeClick($category,$mode){ echo "modeclick"; $_SESSION['mode']=$mode; $_SESSION['category']=$category; header ('Refresh:2;url=placebet3.php'); echo "<center><table><tr><td bgcolor=#FFCC00><font color=#CC0000>Redirect to Next Page, Please Wait</font></td></tr></table></center>"; }//end of function of modeClick() then just become like this Fri 19th Oct,2007 01:06 am <h1>Place Bet2(Available Draw)</h1> <form action=placebet2.php method=post> <text>Please Select The Draw Date</text> <select name=drawnumber><option value=2007-07-09>2007-07-09</option><option value=2007-09-09>2007-09-09</option><option value=2007-07-07>2007-07-07</option><option value=2007-08-08>2007-08-08</option><option value=2007-10-10>2007-10-10</option></select> </br> <input type=submit name=Refresh value=Refresh></input> </form> the form Fri 19th Oct,2007 01:09 am <h1>Place Bet2(Available Draw)</h1> <form action=placebet2.php method=post> <text>Please Select The Draw Date</text> <select name=drawnumber><option value=2007-07-09>2007-07-09</option><option value=2007-09-09>2007-09-09</option><option value=2007-07-07>2007-07-07</option><option value=2007-08-08>2007-08-08</option><option value=2007-10-10>2007-10-10</option></select> </br> <input type=submit name=Refresh value=Refresh></input> </form> </br>post drawnumber=2007-07-07sesssion date=2007-07-07 <form action=placebet2.php method=post> <table border=1 width=100% heigth=100%> <tr> <td bgcolor=orange> </td> <td bgcolor=orange> <h5>Even</h5> </td> <td bgcolor=orange> <h5>Odd</h5> </td> <td bgcolor=orange> <h5>Big</h5> </td> <td bgcolor=orange> <h5>Small</h5> </td> <td bgcolor=orange> <h5>Flower 10</h5> </td> <td bgcolor=orange> <h5>Flower 100</h5> </td> <td bgcolor=orange> <h5>4d big</h5> </td> <td bgcolor=orange> <h5>4d small</h5> </td> <td bgcolor=orange> <h5>4d sure win</h5> </td> </tr> <tr> <td bgcolor=orange> <h5>Magnum</h5> </td> <td> <input type='submit' name='MagnumEven'value='97%'> </td> <td> <input type='submit' name='MagnumOdd'value='97%'> </td> <td> <input type='submit' name='MagnumBig'value='97%'> </td> <td> <input type='submit' name='MagnumSmall'value='97%'> </td> <td> <input type='submit' name='MagnumFlower10'value='97%'> </td> <td> <input type='submit' name='MagnumFlower100'value='97%'> </td> <td> <input type=submit value=97%> </td> <td> <input type=submit value=97%> </td> <td> <input type=submit value=97%> </td> </tr> <tr> <td bgcolor=orange> <h5>Toto</h5> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td bgcolor=orange> <h5>PMP</h5> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td bgcolor=orange> <h5>SgPools</h5> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> </table> </form> was disppear... Quote Link to comment Share on other sites More sharing options...
trq Posted October 19, 2007 Share Posted October 19, 2007 What exactly is your question? Quote Link to comment Share on other sites More sharing options...
zgkhoo Posted October 19, 2007 Author Share Posted October 19, 2007 function displaybet($mode){ $counter=0; $found=0; //echo "</br>detect"; $result=mysql_query("SELECT * FROM result") or die('Query failed: ' . mysql_error()); while ($row = mysql_fetch_array($result,MYSQL_ASSOC)) { //echo "</br>counter=$counter"; //echo "</br>$row[Category]"; //echo "</br>Drawdate in sql=$row[DrawDate]"; //echo "</br>POST drawdate=$_POST[drawnumber]"; if ($row[Category]==$mode && $row[DrawDate]==$_POST[drawnumber]) { //echo "if"; $found=1; }//end if else{ //echo "else"; }//end of else $counter++; }//end while loop return $found; }//end displaybet() form that draw by this function will be disppear after <input type='submit' name='".$mode."Even" ."'value='97%'> clicked Quote Link to comment Share on other sites More sharing options...
zgkhoo Posted October 19, 2007 Author Share Posted October 19, 2007 know wat i meant? Quote Link to comment Share on other sites More sharing options...
zgkhoo Posted October 19, 2007 Author Share Posted October 19, 2007 omg ??? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.