How can I echo if on certain php file?

  • Thread starter Thread starter lildjrich
  • Start date Start date
L

lildjrich

Guest
I'm writing a CMS and I want to boost the installation a little more by adding a Support box to the right.

I've got the basic if echo command on there, but I can't get it to change the support text for each individual installation page.

The code is as follows:
<?php
$support1 = "<h5>Support</h5>Read through the license and then agree or disagree. However you must agree to continue the installation.";
if directory='index.php?step1' {
echo $support1;
}
else {
echo "No support available.";
}


The pages load fine without whatever bit is wrong (the first bit I believe), and it installs properly.

Any ideas as to whats best to do what I wanted?

I was thinking about doing something like
<?php
$support1 = "<h5>Support</h5>Read through the license and then agree or disagree. However you must agree to continue the installation.";
if include('step1'.php'); {
echo $support1;
?>
 
i am not understanding but you seem to have syntax error in your code.

<?php
$support1 = "<h5>Support</h5>Read through the license and then agree or disagree. However you must agree to continue the installation.";
if include('step1'.php'); {
echo $support1;
?>


if(include('step1.php'); {
echo $support1;
}
else{
echo "No support";
}


and

if directory='index.php?step1' is wrong to me

$directory = is_dir('index.php') ? true : false;

if($directory === false){
echo "I can't include because i am not a directory, I am a file";
}


and to echo based of a query string then

if(isset($_GET['action']) && $_GET['action'] == "step1"){
echo "Support";
}
else{
echo "no support";
}
 
i am not understanding but you seem to have syntax error in your code.

<?php
$support1 = "<h5>Support</h5>Read through the license and then agree or disagree. However you must agree to continue the installation.";
if include('step1'.php'); {
echo $support1;
?>


if(include('step1.php'); {
echo $support1;
}
else{
echo "No support";
}


and

if directory='index.php?step1' is wrong to me

$directory = is_dir('index.php') ? true : false;

if($directory === false){
echo "I can't include because i am not a directory, I am a file";
}


and to echo based of a query string then

if(isset($_GET['action']) && $_GET['action'] == "step1"){
echo "Support";
}
else{
echo "no support";
}
 
Back
Top