wadims Posted October 12, 2004 Report Posted October 12, 2004 Esmu iesaacejs, taa kaa piedodiet par dumju jautajienu: Esmu uztaisijis lapu, kuraa aizpilda pasutijumu: <html> <head> <title> Boba Veikals </title> </head> <body> <form action="processorder.php" method=post> <table border=0> <tr bgcolor=#cccccc> <td width=150>Item</td> <td width=15>Quantity</td> </tr> <tr> <td>Tired</td> <td align=center><input tupe="text" name="viens" size=3 maxlength=3></td> </tr> <tr> <td>Oil</td> <td align=center><input type="text" name="divi" size=3 maxlength=3></td> </tr> <tr> <td>Spark Plugs</td> <td align=center><input type="text" name="tris" size=3 maxlength=3></td> </tr> <tr> <td colspan=2 align=center><input type=submit value="Submit Order"></td> </tr> </table> </form> </body> </html> Un processorder.php , bet vinjhs nezin kapeec negrib raadiit man iegutos ciparus (ciparus, kurus ieguust no 1aas lapuses): html> <head> <title>Boba Veikals - Pasutijuma Rezultati</title> </head> <body> <h1>Boba auto veikals</h1> <h2>Pasutijuma rezultati</h2> <? $html_post_vars["viens"] = $viens; echo "<p>Pasutijums izpildic "; #Uz pieprasijumu tika atbildec echo date("H:i, jS F"); echo "<br>"; echo "<br>"; echo "$viens riepas<br>"; echo $divi." ellas daudzums<br>"; echo $tris." spark plugi<br>"; echo date("l dS of F Y h:i:s A"); echo $viens; $atbilde = $viens * $divi * $tris; echo $atbilde; ?> </body> </html> Luudzu paliidziet, lasiiju manuaaljis... tad tur tiek piemineets php.ini failaa taads subjekc kaa register_globals viskautkaa izmeegjinaajos.... pedejais luugums Jums! Paldies!
Gacha Posted October 12, 2004 Report Posted October 12, 2004 Tev laikam register_globals ir OFF, bet lai strādātu ar $mainigais vajag ON. Ja tā nesanāk, tad mēģini $viens, $divi, $tris vieta lietot $_GET['viens'], $_GET['divi'], $_GET['tris'].
рпр Posted October 13, 2004 Report Posted October 13, 2004 atstaaj konfiguraacijaa register_global = off // droshiibas peec un lapaa izmanto $_POST['viens'] $_POST['divi'] $_POST['tris']
wadims Posted October 13, 2004 Author Report Posted October 13, 2004 atstaaj konfiguraacijaa register_global = off // droshiibas peec un lapaa izmanto $_POST['viens'] $_POST['divi'] $_POST['tris'] Paldies!
Recommended Posts