I’m just starting with PHP. Working currently on simple message display system.
If I have following statement in one file PageWithMessages.php:
<span class="msg">
<?php
if( $tableChange == true ) { echo "Table saved. ";}
else if ( $rowChange == true ) { echo "Record saved. ";}
else if ( $rowDelete == true ) { echo "Record deleted. ";}
else if ( $rowNew == true ) { echo "New record created. ";}
?>
</span>
How can I pass the information of that variable (e.g. $rowNew = true ) with following exiting statement from another file?
if($result) {
header("location: PageWithMessages.php");
// set $variable = true ??
exit();
} else {
die("Query failed");
}
Any suggestion much appreciated.
If I understand your question correctly:
then on PageWithMessage.php: