I have this problem :
I have 2 php files > index.php and control.php.
Inside control.php are a variable called "$ControlNumber"
, this has the default value on 10 and a variable called "$Name"
Inside index.php I have a while with a condition ($ControlNumber < 10)
and each time this it's executed , $ControlNumber
its increased by 1.
The end of the code i made a div with the name of "$Name"
, but this doesn't work.
I execute the code by this way with a href link :
<?php
if ($_GET['run_func'] == 'yes') {
include "control.php";
$ControlNumber--;
} else {
echo '<a href="?run_func=yes">Press here 2 add a player</a>';
}
?>
Code inside the while :
<?php
include "control.php";
while($ControlNumber < 10) {
$ControlNumber++;
echo '<div id="Linea1" style="background-color#751313; color:white; font- size:150%;";>' . $Name .'</div>';
$Name = "Used";
}
?>
Code of "Control.php"
<?php
$ControlNumber;
$ControlNumber = 10;
$Name = "John";
?>
I try a lot of different options when writing this code , but the "Text/Echo"
doesn't work or appears.