So as the title entails, my if else statemnt in php won't execute. i mean i would undrstand if the 'if' didn't execute but it didn't even read the else statement. so when i submit nothing happens. <?php session_start(); if(isset($_POST['jansave'])) { $basic = $_POST['basic']; $allowance = $_POST['allowance']; $bonus = $_POST['bonus']; $epf = $_POST['epf']; $asb = $_POST['asb']; $royalty = $_POST['royalty']; $sub = $_POST['sub']; $div = $_POST['div']; $others = $_POST['others']; if($basic&&$allowance&&$bonus&&$epf&&$asb&&$royalty&&$sub&&$div&&$others) { require "connect.php"; $total=($basic + $allowance + $bonus + $epf + $asb + $royalty + $sub + $div + $others); $query=("INSERT INTO january VALUES ('$basic', '$allowance', '$bonus', '$epf', '$asb', '$royalty', '$sub', …

Member Avatar
Member Avatar
+0 forum 13

Okay i have 2 variable named bid price and offer price . I need to fill in the values into the variables through cases. For each row of data ,i want to retrieve the rates for the currency pairs (eg. eur/usd,audusd) . I have 2 values for each currency for bid and offer price which are already defined( eg $bid ,$bid1,$bid2,$bid3,$bid4,$bid5,$bid6.) For clarification , one pair has 2 variables which i want to put the variables in. So EG. if the row's currency pair is eur/usd , i want to take $bid and $bid1 or if its usd/jpy, i want …

Member Avatar
Member Avatar
+0 forum 1

Hi All, I am currently trying to figure out to finish this project. Below is my code that I have so far. There are some blank methods that I am not sure where to even begin on how to complete them. I have a description of what the methods should do above them, so please help guide me on the blank methods so I can figure them out. Part of what is confusing to me is how to get the data that is read from the file and use it in the conversions since some of the data is inputted …

Member Avatar
Member Avatar
+0 forum 126

Okay so I've searched just about everywhere but can't seem to find what I'm looking for. I'm learning as I go with PHP and I'm having a problem figuring out what is wrong. I've got two different queries calling a group of information. Within each query is a field that is the same. I want to use an if statement to pull another field comparing the two identical fields. The if statement is the only problem in the code. Everything else works fine. I'm not even sure this is possible. Here is the piece that is the problem: [CODE]if ($row['id'] …

Member Avatar
Member Avatar
+0 forum 8

What is a better way to write the code, [CODE] public void showFeelings(int howManyGoals) { switch (howManyGoals) { case 0: System.out.println("Oh dear, not very good"); break; case 1: System.out.println("Oh dear, not very good"); break; case 2: System.out.println("Oh dear, not very good"); break; case 3: System.out.println("Ive seen donkeys shoot better"); break; case 4: System.out.println("Ive seen donkeys shoot better"); break; case 5: System.out.println("Ive seen donkeys shoot better"); break; //and so on } } [/CODE] Is there a possible way of writing cases 0-2 as one case or am i better writing it as follows [CODE] public void showFeelings(int howManyGoals) { if(howManyGoals >= …

Member Avatar
Member Avatar
+0 forum 15

The End.