Jump to content

alin19

Members
  • Posts

    334
  • Joined

  • Last visited

    Never

Everything posted by alin19

  1. can i insert a formula direct in mysql coll?
  2. let's say that i have three fields in one table: month january | month february | total 30 30 january+february 39 32 january+febrary how can i do this?
  3. sorry but i don't get any result; the page simply reloads
  4. what i have done wrong here? <form method="POST"> <b>Luna:</b> <select value="month"> <option value="Ianuarie">Ianuarie</option> <option value="Februarie">Februarie</option> <option value="Martie">Martie</option> <option value="Aprilie">Aprilie</option> <option value="Mai">Mai</option> <option value="Iunie">Iunie</option> <option value="Iulie">Iulie</option> <option value="August">August</option> <option value="Septembrie">Septembrie</option> <option value="Octombrie">Octombrie</option> <option value="Noiembrie">Noiembrie</option> <option value="Decembrie">Decembrie</option> </select> <b>Ziua: </b><select value="day"> <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> </select> <input type="submit"> </form> <?php $a=isset ($_POST['day']); $b=isset ($_POST['month']); echo "you have selected month: " , $a,"and day: " , $b; ?>
  5. i don't want that a user to avoid login form and go directly to the page with info; localhost/test1.php the login page; and redirect to localhost/test2.php if he write localhost/test2.php to recive the message that he is not log in and that link is not complete i think
  6. i need a form then if the login info are corect to open a second page; let's say that my login page is test1.php; and after the login to show info in test2.php 1. .... ... if ($passwordInserted==$passwordStored) && ($userInserted==$userStored) #open test2.php //here i don't know how to make the connection to the second page; 2. and if the user insert ....test2.php, to recive the message that he is not log in can you help me?
  7. geting data from a database; time and prize variation; i have another program that updates the database
  8. i have made a grafic; but i must refresh the page to update that grafic, can i make it to generate new data without refreshing the page?
  9. 10x; i'm just learning php from books,
  10. for ($j=1; $j<$100;$j+=0.01) { $z=470-2*$j; $x=50+$j; imagesetpixel($img,$x, $z,$black); } i have this script to draw a line from one point with a known lenght; but how can i drow a line between point a(10;20) and b(30;50) just an example please
  11. solve it boys; 10x; my mistake; there are more than one php.ini: C:\Program Files\EasyPHP1-8\apache\ C:\Program Files\EasyPHP1-8\php\ i only modify this one C:\Program Files\EasyPHP1-8\conf_files\
  12. yes; it is easyphp 1.8 that i'm using, and i have another php intalled on the computer, that i use for comand line can there be a conflict?
  13. i have done that and still geting an error;
  14. can i create an image(or a grafic) with only php? i'm reading in my book that i need pearl; <?php $width = 34*M_PI; $height = 110; $img = imagecreate($width,$height); $background = imagecolorallocate($img,200 ,200 ,200); $black = imagecolorallocate($img, 0 , 0, 0); $interval = 2*M_PI; for ($i=0; $i <$interval; $i+=0.01) { $m = 5 + (( $width/(2*M_PI)-2))*$i; $n= 5 + ($height/2-5)*(1-sin($i)); imagesetpixel ($img, $m, $n, $black); } header("Content-type: image/png"); imagepng($img); imagedestroy($img); ?> i get this error: Fatal error: Call to undefined function: imagecreate() in c:\program files\easyphp1-8\www\tabel.php on line 4
  15. the red line: <td valign="" align="center"><input type="submit" name="CALCULEAZA" value="CALCULEAZA" /></td> that was my question a little higher; how do i connect a var to a form; if there is only one i can; dut if there are more?
  16. let's say that i have this; how can i asign $a1-$a4 that belongs to the first form? $a1 = $_POST['aunu']; $a2 = $_POST['adoi']; $a3 = $_POST['atrei']; $a4 = $_POST['apatru']; $b1 = $_POST['bunu']; $b2 = $_POST['bdoi']; $b3 = $_POST['btrei']; $b4 = $_POST['bpatru']; $c1 = $_POST['cunu']; $c2 = $_POST['cdoi']; $c3 = $_POST['ctrei']; $c4 = $_POST['cpatru']; $d1 = $_POST['dunu']; $d2 = $_POST['ddoi']; $d3 = $_POST['dtrei']; $d4 = $_POST['dpatru']; $e1 = $_POST['eunu']; $e2 = $_POST['edoi']; $e3 = $_POST['etrei']; $e4 = $_POST['epatru']; $z1 = $_POST['zunu']; $z2 = $_POST['zdoi']; $z3 = $_POST['ztrei']; $z4 = $_POST['zpatru'];
  17. the code is not so important, i need more that one submit butons, for example i enter data into the first collumn, and press submit buton, just to calculate first collumn; the second the same, the third and the fourth the same can that be done? <?php if($_SERVER['REQUEST_METHOD'] == 'POST') { $a1 = $_POST['aunu']; $a2 = $_POST['adoi']; $a3 = $_POST['atrei']; $a4 = $_POST['apatru']; $b1 = $_POST['bunu']; $b2 = $_POST['bdoi']; $b3 = $_POST['btrei']; $b4 = $_POST['bpatru']; $c1 = $_POST['cunu']; $c2 = $_POST['cdoi']; $c3 = $_POST['ctrei']; $c4 = $_POST['cpatru']; $d1 = $_POST['dunu']; $d2 = $_POST['ddoi']; $d3 = $_POST['dtrei']; $d4 = $_POST['dpatru']; $e1 = $_POST['eunu']; $e2 = $_POST['edoi']; $e3 = $_POST['etrei']; $e4 = $_POST['epatru']; $z1 = $_POST['zunu']; $z2 = $_POST['zdoi']; $z3 = $_POST['ztrei']; $z4 = $_POST['zpatru']; $x1= number_format($z1*($e1/100*($b1-($d1/100*$b1)-$a1-(($c1+0.08)/100*$a1))), 4, '.', ''); $p1= number_format($z1*($b1-(($d1/100*$b1)+$a1+(($c1+0.08)/100*$a1)+$x1/300)), 4, '.', ''); $x2= number_format($z2*($e2/100*($b2-($d2/100*$b2)-$a2-(($c2+0.08)/100*$a2))), 4, '.', ''); $p2= number_format($z2*($b2-($d2/100*$b2)-$a2-(($c2+0.08)/100*$a2))-$x2, 4, '.', ''); $x3= number_format($z3*($e3/100*($b3-($d3/100*$b3)-$a3-(($c3+0.08)/100*$a3))), 4, '.', ''); $p3= number_format($z3*($b3-($d3/100*$b3)-$a3-(($c3+0.08)/100*$a3))-$x3, 4, '.', ''); $x4= number_format($z4*($e4/100*($b4-($d4/100*$b4)-$a4-(($c4+0.08)/100*$a4))), 4, '.', ''); $p4= number_format($z4*($b4-($d4/100*$b4)-$a4-(($c4+0.08)/100*$a4))-$x4, 4, '.', ''); $x= number_format($x1+$x2+$x3+$x4, 4, '.', ''); $p= number_format($p1+$p2+$p3+$p4, 4, '.', ''); if ($x1<0) $x1 = 0; if ($x2<0) $x2 = 0; if ($x3<0) $x3 = 0; if ($x4<0) $x4 = 0; } ?> <html> <body BACKGROUND="mapa2.jpg"> <form name="check" method="post"> </br></br></br></br></br></br> <table width="800" border="2" cellpadding="0" cellspacing="2" align="left"> <tr> <td></td> <td><font color="red" size="5"> ACTIUNEA 1</font></td> <td><font color="red" size="5"> ACTIUNEA 2</font></td> <td><font color="red" size="5"> ACTIUNEA 3</font></td> <td><font color="red" size="5"> ACTIUNEA 4</font></td> </tr> <tr> <td ><font color="green" size="3">NUMAR ACTIUNI</font></td> <td ><font color="green" size="3"> <input name="zunu" type="text" id="unu" /></font></td> <td ><font color="green" size="3"> <input name="zdoi" type="text" id="unu" /></font></td> <td ><font color="green" size="3"> <input name="ztrei" type="text" id="unu" /></font></td> <td ><font color="green" size="3"> <input name="zpatru" type="text" id="unu" /></font></td> </tr> <tr> <td ><font color="green" size="3">PRET CUMPARARE</font></td> <td ><font color="green" size="3"> <input name="aunu" type="text" id="unu" /></font></td> <td ><font color="green" size="3"> <input name="adoi" type="text" id="unu" /></font></td> <td ><font color="green" size="3"> <input name="atrei" type="text" id="unu" /></font></td> <td ><font color="green" size="3"> <input name="apatru" type="text" id="unu" /></font></td> </tr> <tr> <td ><font color="green" size="3">PRET VANZARE</font></td> <td ><font color="green" size="3"> <input name="bunu" type="text" id="unu" /></font></td> <td ><font color="green" size="3"> <input name="bdoi" type="text" id="unu" /></font></td> <td ><font color="green" size="3"> <input name="btrei" type="text" id="unu" /></font></td> <td ><font color="green" size="3"> <input name="bpatru" type="text" id="unu" /></font></td </tr> <tr> <td ><font color="green" size="3">COMISION CUMPARARE</font></td> <td ><font color="green" size="3"> <input name="cunu" type="text" id="unu" /></font></td> <td ><font color="green" size="3"> <input name="cdoi" type="text" id="unu" /></font></td> <td ><font color="green" size="3"> <input name="ctrei" type="text" id="unu" /></font></td> <td ><font color="green" size="3"> <input name="cpatru" type="text" id="unu" /></font></td </tr> <tr> <td ><font color="green" size="3">COMISION VANZARE</font></td> <td ><font color="green" size="3"> <input name="dunu" type="text" id="unu" /></font></td> <td ><font color="green" size="3"> <input name="ddoi" type="text" id="unu" /></font></td> <td ><font color="green" size="3"> <input name="dtrei" type="text" id="unu" /></font></td> <td ><font color="green" size="3"> <input name="dpatru" type="text" id="unu" /></font></td> </tr> <tr> <td><font color="green" size="3">COMISIONUL STATULUI</font></td> <td ><font color="green" size="3"> <input name="eunu" type="text" id="unu" /></font></td> <td ><font color="green" size="3"> <input name="edoi" type="text" id="unu" /></font></td> <td ><font color="green" size="3"> <input name="etrei" type="text" id="unu" /></font></td> <td ><font color="green" size="3"> <input name="epatru" type="text" id="unu" /></font></td> </tr> <tr> <td ><font color="green" size="3"></font></td> <td valign="" align="center"><input type="submit" name="CALCULEAZA" value="CALCULEAZA" /></td> </br></font></td> <td ><font color="green" size="3"></font></td> <td ><font color="green" size="3"></font></td> <td ><font color="green" size="3"></font></td </tr> <tr> <td ><font color="green" size="3">IMPOZIT PE ACTIUNI</font></td> <td ><font color="red" size="3"> <?php if(isset($x1)) { echo $x1; } ?> </br></font></td> <td ><font color="red" size="3"> <?php if(isset($x2)) { echo $x2; } ?> </br></font></td> <td ><font color="red" size="3"> <?php if(isset($x3)) { echo $x3; } ?> </br></font></td> <td ><font color="red" size="3"> <?php if(isset($x4)) { echo $x4; } ?> </br></font></td> </tr> <tr> <td ><font color="green" size="3">PROFIT NET PE ACTIUNI</font></td> <td ><font color="red" size="3"> <?php if(isset($p1)) { echo $p1; } ?> </br></font></td> <td ><font color="red" size="3"> <?php if(isset($p2)) { echo $p2; } ?> </br></font></td> <td ><font color="red" size="3"> <?php if(isset($p3)) { echo $p3; } ?> </br></font></td> <td ><font color="red" size="3"> <?php if(isset($p4)) { echo $p4; } ?> </br></font></td> </tr> </br></br> <tr> <td><font color="green" size="3">IMPOZIT TOTAL</font></td> <td ><font color="red" size="3"><?php if(isset($x)) { echo $x; } ?> </font></td> <td></td> <td ><font color="green" size="3">PROFIT TOTAL</font></td> <td ><font color="red" size="3"><?php if(isset($p)) { echo $p; } ?> </font></td> </table> </form> </html> [attachment deleted by admin]
  18. echo $row['simbol'],' ', $row['piata'],' ', $row['bidvol'],' ', $row['bestbid'],' ', $row['bestask'],' ', $row['bidask'],' ',$row['data'],' ',$row['var']; it outputs numbers unlined; i've found this: echo nl2br($yourTextData); but if i apply this i get an error;
  19. i want to design a data base and i don't have exprerience, i don't want later to find out that it was wrong from the start; so i ask for you're openion, ion south market volume price 21.01.2008 gheorghe north market volume price 28.12.2007 lisa east market volume price 21.01.2008 i have a lot of line like this, i need to insert them into a database with tables and line, table: ion gheorghe or table: east market north market or date: 18.01.2008 19.01.2008 ion, gheorhge and lisa can sell in all markets in any day, markets are just a dozen, but names and days are a lot, and later a may need to make a grafic with the sells, what is the size that a database in working slow?
  20. that's ok, i think this will do it, in 1-2 hours what this script does? : <?php function say($chars = array()) { $str = null; $alphabeth = range('a','z'); foreach($chars as $char) { $str .= $char==-1 ? ' ' : $alphabeth[$char]; } return $str; } echo say(array(7,4,11,11,14,-1,22,14,17,11,3)); ?>
×
×
  • 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.