mysql - PHP variable looses value -


have report showing query output invoicing clients @ feedyard. queries produce blank page, instead of r1 or r3 layout came variable query.

finally figured out if statement choose report layout not receiving value. questions here , other forums involved passing variable across pages or methods when lost value, next line.

echoed variable right before if statement , shows r1, in next line variable not equal r1. (i moving pdo connection, client waited until harvest in full swing ask formula/input changes , new reports, closed system on network.)

$theq query correct syntax, generates right answer, i'm starting code block @ $report variable set, showing code until $report isn't same value...

if ($getticketsfetch['highmoisture'] === "r2") {     $report = "r1"; } else {     $report = $getticketsfetch['highmoisture']; }  if (mysql_numrows($gettickets) < 1) {     echo 'no tickets report on parameters, please go , `try again ';     echo '<input type=button value="back" onclick="history.go(-1)">'; } else { //run report     /* echo $theq; debugging, query pasted in phpmyadmin executes       echo $report; debugging shows r1 */     if ($report === "r1") {         //use r1 layout     } else {         //use r3 layout     } } 

thanks time

please, need input - still not working. i've changed code multiple times using:

`echo $report //see report layout  if($report === "r1") {          //use r1 layout     } else {         //use r3 layout       }     } 

the echo shows r1, layout uses r3

change code read:

    echo $report //see report layout  if($report == "r1") {          //use r1 layout     } else {         //use r3 layout       }     } 

still uses r3 layout everytime, when $report = r1 changed read:

    echo $report //see report layout  if($report !=="r3") {          //use r1 layout     } else {         //use r3 layout       }     } 

the !== working, client finds goes r3 layout again. production server hostcentric mysql - 5.5.44-0; php 5.3


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -