Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,199,768 members, 7,972,768 topics. Date: Friday, 11 October 2024 at 05:58 PM |
Nairaland Forum / Science/Technology / Webmasters / Php Script For Calculate B U L K S M S Price (795 Views)
Auto Post On Facebook With PHP Script / Were To Get A Php Script That Will Be Like Nairaland / Any Body Using G O L D S M S 2 4 7 Api ? For His Or Sms Portal (2) (3) (4)
(1) (Reply)
Php Script For Calculate B U L K S M S Price by Jacktech: 1:43pm On Jan 20, 2015 |
check out this php script for calculating price <?php ini_set('display_errors',0); if( isset( $_REQUEST['calculate'] )) { $operator=$_REQUEST['operator']; $operator=="*"; { $add1 = $_REQUEST['fvalue']; $add2 ='1.5'; $res =$add1*$add2; } if($_REQUEST['fvalue']==NULL && $_REQUEST['lvalue']==NULL) { echo "<script language=javascript> alert(\"Please Enter Number of Unit.\"</script>"; } else if($_REQUEST['fvalue']==NULL) { echo "<script language=javascript> alert(\"Please Enter Number of Unit.\"</script>"; } /** else if($_REQUEST['lvalue']==NULL) { echo "<script language=javascript> alert(\"Please Enter second value.\"</script>"; } **/ } ?> <form> <table style="border:groove darkblue"> <tr> <td style="background-color:darkblue; color:white; font-family:'Times New Roman' font-style:bold">Enter Number of Unit</td> <td colspan="1"> <input name="fvalue" type="text" style="color:Black;"/></td> </tr> <tr> <td style="background-color:darkblue;color:white;strong;">Price (N):</td> <td style="color:darkblue"><?php echo $res;?></td> </tr> <tr> <td></td> <td><input type="submit" name="calculate" value="Calculate" style="color:wheat;background-color:green" /></td> </tr> </table> </form> Just change my multiplier to your unit price I.e $add2 ='1.5'; change the 1.5 to your own value |
Re: Php Script For Calculate B U L K S M S Price by hilaryiwens05: 2:32pm On Jan 20, 2015 |
it has some errors....check ur codes Jacktech: 1 Share
|
Re: Php Script For Calculate B U L K S M S Price by Jacktech: 3:26pm On Jan 20, 2015 |
hilaryiwens05: It doesn't have any error. Run the code from your browser address. something like this http://localhost/new/pricecalculator.php Don't run the code my right clicking the file and lunch it with firefox or ur browser click here to download the script https://www.nairaland.com/download/2047975
|
(1) (Reply)
Joomla And Drupal Users Only Come And Teach/learn / Affordable Website Wanted Urgently. / 5 Popular Websites To Buy Inexpensive Domain Names
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 14 |