Jump to content

alin19

Members
  • Posts

    334
  • Joined

  • Last visited

    Never

Everything posted by alin19

  1. and how should i protect this var to not be find out? change the $var name into something like this: $aoiajdsa215545_;+ ?
  2. $cyrpt_salt = 'blah'; what this means? the codification pather (key);
  3. i'm reading a book on php, and when i got the part with crypting paswords i've tryed this: <html> <?php $x=$_POST['nume']; $x2=$_POST['prenume']; $x3=$_POST['parola']; $x4=$_POST['confparola']; echo $x; echo " "; echo $x2; echo " "; echo $x3; echo " "; echo $x4; echo " "; $c=crypt($x3); echo $c; echo " "; $d=crypt($x4); echo $d; if ($c==$d) echo "bun"; ?> </html> $1$pi5.87..$Gioj06xz2YWzM0/fgqLkW0 $1$vK1.Mf..$3zp/OoUq51QsbcTEwTjsU1 my crypt paswords are not the same, how can i verify a password if they are not the same? and one more thing they say that ceil() and floor() is the same as round () except one rounds the number in the superior value and the other in the inferior value but rounds (4.239,2) //4.24 but ceil and floor can only be used as ceil(3,59) //4 can you help me?
  4. if (0.0101< $x AND $x<= 0.2000) { if ($xmax <= 0.2000) { $xmax=$xmax*10000; $h=$xmax % 10; $xmax=$xmax - $h; $xmax=$xmax/10000; $xmax= number_format($xmax, 4, '.', ''); } if ($xmin >0.0101) { $xmin=$xmin*10000; $j=$xmin % 10; $xmin=$xmin-$j; $xmin=$xmin/10000; $xmin= number_format($xmin, 4, '.', ''); } if ($xmax >0.2000) { $xmax=$xmax*10000; $h1=$xmax % 10; $xmax=($xmax-$h1) /10; $h2=$xmax % 10; $xmax=(($xmax-$h2) /10)*100; $xmax=$xmax/10000; $xmax= number_format($xmax, 4, '.', ''); } if ($xmin <= 0.101) { } } i've done this; when all of $x, $xmin and $xmax are between 0.0101 and 0.2000 all it's ok, but when $x is 0.1900 i get: MAX 0.2300 good x 0.1900 good MIN 0.1421 bad
  5. $a= 0.0501 $b=$a %10; $c=$a-$b; will this work if those won't be int numbers?
  6. if (0.0101< $a AND $a<= 0.2000) { $h=number_format($xmax % 10, 4, '.', '') $xmax=number_format($xmax-$h; 4, '.', '') if ($xmax >0.2000) { $h1=number_format($xmax % 10, 4, '.', '') $xmax=($xmax-$h1) /10 $h2=number_format($xmax % 10, 4, '.', '') $xmax=(($xmax-$h2) /10)*100 } if ($xmin <= 0.101) { } something like this i think it will work, still working on it
  7. if (isset ($b)) { if ($b=='rgbs' OR $b=='dlbs' || $b=='odbs' || $b=='xmbs' || $b=='xdeal' ||$b=='RGBS' || $b=='DLBS' || $b=='ODBS' || $b=='XMBS' || $b=='XDEAL' ) { if ($a<=0.0100) { } if (0.0101< $a AND $a<= 0.2000) { $h=number_format($xmax % 10, 4, '.', '') $xmax=number_format($xmax-$h; 4, '.', '') } if (0.2001<$a AND $a<=1.0000) { } if (1.0001<$a AND $a<=5.0000) { } if (5.0001<$a AND $a<=20.0000) { } if (20.0000<$a) { } } } this is what i have until now, it is complicated, not tehnical but work, i will have 3 numbers, x xmin xmax, xmin=x-15/100*x xmax=x+15/100*x and those steps: x <0.0100 here x, xmin , xmax can grow with 0.0001 0.0101<x<0.2000 here x, xmin , xmax can grow with 0.0010 0.2001<x<1,0000 here x, xmin , xmax can grow with 0.0100 1.0001<x<5.0000 here x, xmin , xmax can grow with 0.0500 5.0001<x<20.0000 here x, xmin , xmax can grow with 0.1000 x<20.0000 here x, xmin , xmax can grow with 0.5000 the big problem is when for example x= 0.1900 because xmax will go into the other step, i'm working on it
  8. my numbers are in format 0.0000 4 zecimals not (INT)
  9. yes, i think that will work the same, 10x
  10. yes this is good, but i need one more, from 52 i need to get 50 from 58 also 50
  11. what is the comand to eliminate the last number from a number $a= $a /10? and how i get that number that i took out? $x=$a .... 10 why whis comand dosn't work? if (0.0101< $a<=0.2000) { }
  12. well just add 15% of that number and decrease 15% of that number the same with 25% it just eases this to some people, but i need to complete it to be more helpful
  13. if i had set A and the web client posted a only the x number would be "echo" on the page, min and max don't appear there
  14. my client must insert a number and a method method A or B(15 and 25) if he chose number x and method A he will get this: x+15/100*x x x-15/100*x i have made this <?php if($_SERVER['REQUEST_METHOD'] == 'POST') { $a = $_POST['unu']; $b = $_POST['doi']; $x= number_format($a, 4, '.', ''); if (isset ($b)){ if ($b=='A) $procent=15; if ($b=='a') $procent=15; } if (isset ($b)) { if ($b=='B') $procent=25; if ($b=='b') $procent=25; } if (isset ($procent)) { $xmax = number_format(($a+($a*$procent/100)), 4, '.', ''); $xmin = number_format(($a-($a*$procent/100)), 4, '.', ''); } } } ?> .... but i have some steps, if ( 0<x<1000) x, min and max is the form abcd a,b,c,d are numbers if ( 1000 <=x<10000) x, min and max is the form abc0 if ( 10000 <=x<100000) x, min and max is the form ab00 the big problem is when x is 900 the i get 1.035 max over 1000 0.9000 x and min under 1000 0.765 i can do this by inserting a lot of if's but it will be had to debug after it, i don't know if i explaind very well, can you help me?
  15. <?php if($_SERVER['REQUEST_METHOD'] == 'POST') { $a = $_POST['unu']; $b = $_POST['doi']; $c = $_POST['trei']; $d = $_POST['patru']; $x = ($a*100+$d*$c)/(100+$c+$b); } ?> <html> <table> <form> <td height="35" valign="" align="center"><font color="green" size="8" ><?php if(isset($x)) { echo $x; } ?> </font></td> </tr> </table> </form> </html> i get a number like this : 2.9150943396226 i want to get something like this : 2.91 what i must add?
  16. i've read the topic, i hope it was the right one, o've configure phpmyadmin to request pasword at conection, but my password dosn't work i had a visual c++ instaled with a myql data base included, may that be a problem? [attachment deleted by admin]
  17. i'm trying to install this mysql server but at the end when i try to configure it i get this error, i've set off my firewall but i still get this error [attachment deleted by admin]
  18. i'll try to download a newer version, you're right that dll is for apache 2.0 if i hover the mouse pointer over that dll it says that 10 guy's, you're the best
  19. i have apache 2.2.2 and php 5.1.4 in the php directory i cant find php5apache2_2.dll
  20. # If the AddEncoding directives above are commented-out, then you # probably should define those extensions to indicate media types: # AddType application/x-compress .Z AddType application/x-gzip .gz .tgz AddType application/x-httpd-php .php i have those lines but if i add loadmoadule php5... my apache won't restart
  21. http://www.etutoriale.ro/articles/154/1/Instalare-Apache,-MySQL-si-PHP-in-Windows i've try'ed to configure my apache, mysql and php using this tutorial, except this line : LoadModule php5_module "c:/php/php5apache2.dll" i didn't find this on the http.conf configuration file and when i open my browser and try to type localhost/test.php it tryes to download something, what i must do?
  22. <?php if($_SERVER['REQUEST_METHOD'] == 'POST') { $a = $_POST['unu']; $b = $_POST['doi']; $x= number_format($a, 4, '.', ''); if ($b='JOHM') $procent=15; if ($='MIHAIL') $procent=25; $xmax = number_format(($a+($a*$procent/100)), 4, '.', ''); $xmin = number_format(($a-($a*$procent/100)), 4, '.', ''); } ?> <html> <body BACKGROUND="mapa2.jpg"> <form name="check" method="post"> </br></br></br></br></br></br> <table width="304" border="2" cellpadding="0" cellspacing="2" align="center"> <!--DWLayoutTable--> <tr> <td border="0">test</td><td valign=""align="center" ><font color="red" size="3">PRETUL NET</font></td> <td width="304" height="79" valign="" align="center"> <input name="unu" type="text" id="unu" /> </td><td> </tr> <tr><td border="0">test</td> <td valign=""><font color="red" size="3" align="center">PIATA</font></td> <td height="86" valign="" align="center" ><input name="doi" type="text" id="doi" /></td> </tr> <tr><td border="0">test</td> <td valign="" align="center" ><font color="red" size="3" align="green"></font></td> <td height="86" valign="" align="center"><input type="submit" name="CALCULEAZA" value="CALCULEAZA" /></td> </tr> <tr><td border="0">test</td> <td valign="top" align="center" ><font color="red" size="3" align="green"></font></td> <td height="35" valign="" align="center"> <font color="green" size="8" > <?php if(isset($xmax)) { echo $xmax; } ?></br> <font color="blue"> <?php if (isset ($x)) echo $x; ?> <font color="red"></br> <?php if(isset($xmin)) { echo $xmin; } ?> </font></td> </tr> </table> </form> </html>
×
×
  • 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.