Jump to content

alin19

Members
  • Posts

    334
  • Joined

  • Last visited

    Never

Everything posted by alin19

  1. i have this code, but i recive $max as my las record in that table, i must go and edit the last record and save it to get the real $max can you help me? $query="SELECT * FROM `$operator` LIMIT 0 , 30"; if ($r=mysql_query($query)) { while ($row = mysql_fetch_array($r)) { //$cupoane[]=$row['nr.cupoane']; $zile[]=$row['zi']; $cupoane[]=$row['nr.cupoane']; echo " "; } } $inrCupoane=count ($cupoane); $inreZi=count ($zile); $min=999; $max=0; for ($v=0;$v<$inreZi;$v++) { if ($max<$cupoane[$v]) $max=$cupoane[$v]; if($min>$cupoane[$v]) $min=$cupoane[$v]; }
  2. i have found an alternative, sorry for posting
  3. if i add that red line, in the page i will have an input text right and down from the option list, but i want to have that right next to option value="vasile" can you help me? <FORM method="POST"> <select name="Operator" size=45> <option value="vasile">vasile </option> <option value="Chiriac">Chiriac </option> <option value="Dragos">Dragos </option> <option value="Oprescu">Oprescu </option> </select> <input type="text" value="vasile"> </form>
  4. 10x, i have modified that, but i don't see any difference ???
  5. it works just fine, i would have wished that value of ziua to be: "Toata Luna" but i've solvet it with this: $_POST['ziua']='Toata Luna'
  6. what i must do to to have the default option : <option value="Toata Luna">Toata Luna</option> selected? <select name="ziua" size=5> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> <option value="13">13</option> <option value="14">14</option> <option value="15">15</option> <option value="16">16</option> <option value="17">17</option> <option value="18">18</option> <option value="19">19</option> <option value="20">20</option> <option value="21">21</option> <option value="22">22</option> <option value="23">23</option> <option value="24">24</option> <option value="25">25</option> <option value="26">26</option> <option value="27">27</option> <option value="28">28</option> <option value="29">29</option> <option value="30">30</option> <option value="31">31</option> <option value="Toata Luna">Toata Luna</option> </select>
  7. i've found another login form, is more easy to use and better i think
  8. i have this login for: it's from the net <html> <head> <title>Log-In</title> <style> h1{font:12pt arial} h2{font:11pt arial} </style> </head> <body> <br> <center> <h2>Webmasters feel free to change this log in form/page to suit your needs</h2> <br> <br> <br> <h1>Log in to my secret page... <br> <br> Example usernames and passwords are:<br> <br> <b> name1 and pass1<br> name2 and pass2<br> name3 and pass3<br> </b> </h1> <br> <form method="post" action="dataProcess.php"> <p style="font:11pt arial">Enter Name: <input type="text" name="loginName"> <p style="font:11pt arial">Enter Pass: <input type="password" name="passWord"> <p><input type="submit" name="submit" value="Log In"> </form> </body> </html> and this secure page: <?php // Secure multiple user Log-In script by Dave Lauderdale - Originally published at: www.digi-dl.com $filename = "user.log"; $log = fopen($filename, "r"); $contents = fread($log, filesize($filename)); fclose($log); // Add usernames below if ($contents == "name1" || $contents == "name2" || $contents == "name3") { $filename = "user.log"; $log = fopen($filename, "w+"); fputs($log,""); fclose($log); here i have a php script } else { echo "<center><Br><font color=red face=arial size=3 >Error</font>...<font face=arial size=3 >You will have to log on via the log on form to view this page.<br><br><a href='login.html' style='color:black'>Click here</a> to try again."; } ?> i login, i view the page but when i press a submit button i recive the message that i'm not log in; and this error Warning: fread(): Length parameter must be greater than 0. in c:\program files\easyphp1-8\www\ext\secure.php on line 7
  9. how can i encrypt my conection? [attachment deleted by admin]
  10. ok, i understand, but let's say that i get in a php array all the the ements from a table of mysql, can i pass them into a javascript array to use them later with what client does?
  11. can i use something like this, but in stead of javascript to use php? <html> <script language="javascript" type="text/javascript"> <!-- function test() { with (document.forms.form1) { reset.disabled=false } } --> </script> <body> <form action="" method="POST" name="form1"> <input type="text" name="nume" value="nume" onchange="test()"> <input type="submit" name="submit" value="submit" onmouseover="test()"> <input type="reset" name="reset" value="reset" disabled=true> </form> </body> </html>
  12. i'm thinking to try and make a visual moving image like thys: to declare 2 images the same, and when $i=1.3..5...7..9.. to generate image1, when $i=2...4...6..8...10 to generate image 2 and give the aspect that the image is generating dinamic, could something like this work? <?php $img= imagecreate(300,300); $img2= imagecreate(300,300); $background = imagecolorallocate($img,200,200,200); $black = imagecolorallocate($img,0,0,0); $background2 = imagecolorallocate($img2,200,200,200); $black2 = imagecolorallocate($img2,0,0,0); header("Content-type: image/png"); for ($i=1;$i<300;$i+=0.01) { imagesetpixel($img,$i,$i,$black); imagesetpixel($img2,$i,$i,$black2); sleep(1); if ($i / 2 != int) { imagedestroy ($img2); imagepng($img); } if ($i / 2 == int ) { imagedestroy ($img); imagepng($img2); } } ?>
  13. alin19

    form

    <html> <script language="javascript" type="text/javascript"> <!-- function test() { with (document.forms.form1) { reset.disabled=false } } --> </script> <body> <form action="" method="POST" name="form1"> <input type="text" name="nume" value="nume" onchange="test()"> <input type="submit" name="submit" value="submit" onclick="test()"> <input type="reset" name="reset" value="reset" disabled=true> </form> </body> </html> if i click on the submit buton , the reset buton disabled go to false but go to true right away, whay is this?
  14. 10x kenrbnsn, the code i have found : http://www.php.net/set_time_limit,
  15. yes, i see that soon after i post, and modify my post, but still i recive only 02.02.xx, when the time reaches 02.02.59 it starts again from 02.02.00
  16. this is a code that ouputs date, but it only shows 02.02.xx why? <?php echo date("H:m:s"), "\n"; set_time_limit(30); for ($i = 0; $i < 100; $i++) { sleep(10); echo date("H:m:s"),"\n"; } echo "Done!"; ?> 02:02:30 02:02:31 02:02:32 02:02:33 02:02:34 02:02:35 02:02:36 02:02:37 02:02:38 02:02:39 02:02:40 02:02:41 02:02:42 02:02:43 02:02:44 02:02:45 02:02:46 02:02:47 02:02:48 02:02:49 02:02:50 02:02:51 02:02:52 02:02:53 02:02:54 02:02:55 02:02:56 02:02:57 02:02:58 02:02:59 PHP Fatal error: Maximum execution time of 30 seconds exceeded in C:\Documents and Settings\user\Desktop\php\testjava.php on line 7
  17. i need to create a grafic, and then to create another one and put it over the first, and to give the impresion that the line is drowing it self, but i need this timeout comand
  18. i hope that it's ok that i post this here i need help with a timeout comand i want to write these until number reach 3 and then wait a little and continue <html> <body> <script language="javascript" type="text/javascript"> <!-- for (i=1;i<10;i++) { document.write ( (i+1) + 'number') document.write ('<br>') if (i==3) { setTimeout(1) } } --> </script> </body> </html>
  19. 10x; it works but i was aspecting something else, instead of opening 5 windows, only one and the number to change withowth pressing ok,
  20. <html> <body> <script language="Javascript" type="text/javascript"> <!-- <?php for($i=1;$i<6;$i++) echo "alert ('clientul este:' + $i )"; ?> --> </script> </body> </html> it only works if $i=1,$i<2;
  21. can i do something like this?: <html> <body> <script language="Javascript" type="text/javascript"> <!-- <?php for($i=1;$i<5;$i++) echo <<<EOF alert ('clientul este:' + EOF; echo $i; echo ")"; ?> --> </script> </body> </html> i want that the numbers in the alert window to change;
  22. can php and javascript be mixet? e meen something like this <html> <body> <script language="Javascript" type="text/javascript"> <!-- var ion ='ion' alert ('clientul este:' + ion) --> </script> </body> </html> <html> <body> <script language="Javascript" type="text/javascript"> <!-- var ion ='ion' alert ('clientul este:' + <?php echo "ion"; ?>) --> </script> </body> </html>
  23. $query="SELECT data FROM `year2008` WHERE data='14-ian-08' AND 'nr.cupoane'='2' LIMIT 0 , 30"; -doesn't work $query="SELECT data FROM `year2008` WHERE data='14-ian-08' LIMIT 0 , 30";- works and i have : data nr.cupoane Edit Delete 8-ian-08 4 Edit Delete 9-ian-08 8 Edit Delete 10-ian-08 12 Edit Delete 11-ian-08 2 Edit Delete 14-ian-08 2 Edit Delete 15-ian-08 3
  24. let's say i have a database jannet january 1 jannet january 2 ..... jannet february 1 ...... mary ianuary mary february lee ianuary lee february can i make a query like this: ? SELECT * FROM `year2008` where month=january AND day=3 LIMIT 0 , 30 ?
×
×
  • 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.