I’m facing this issue were i have text Appearing on the my php website but its not in the HTML
here is the code
<div class="row">
<div class="col">
<?php echo "<h4>Menu - ".$viewData['jobnumber']."</h4>"; ?>
</div>
<div class="col text-right">
<a href="dashboard.php?cat=website-content&subcat=home-content" class="btn btn-secondary content-link">Back</a>
</div>
</div>
<br>
<div class="row">
<div class="col">
<div class="table-responsive">
<h1><?php echo $revison; ?></h1>
<h2><?php echo $groupp; ?></h2>
<p><?php echo $checker; ?></p>
<p><?php echo $designer; ?></p>
<p><?php echo $releasedate; ?></p>
</div>
</div>
</div>
<!-----==================table content end===================-->
<?php
}
else{?>
<!-----=================table content start=================-->
<br>
<div class="row">
<div class="col">
<h4>Current Jobs </h4>
</div>
<div class="col text-right">
<?php if($roleData['role'] == 'admin'){ ?>
<a href="dashboard.php?cat=website-content&subcat=add-home-content" class="btn btn-secondary content-link">Add New </a> <?php } ?>
</div>
</div>
<br>
<div class="row">
<div class="col">
<div class="table-responsive">
<table class="table">
<tr>
<?php if($roleData['role'] == 'admin' || $roleData['role'] == 'checker' || $roleData['role'] == 'designer' ){ ?>
<th>id</th>
<th>Job Number</th>
<th>Revison</th>
<?php } ?>
<?php if($roleData['role'] == 'admin'){ ?>
<th>Group</th>
<th>Checker</th>
<?php } ?>
<?php if($roleData['role'] == 'admin' || $roleData['role'] == 'checker' ){ ?>
<th>Designer</th>
<?php } ?>
<?php if($roleData['role'] == 'admin' || $roleData['role'] == 'designer' ){ ?>
<th>Release Date</th>
<?php } ?>
<?php if($roleData['role'] == 'admin' || $roleData['role'] == 'checker' || $roleData['role'] == 'designer' ){ ?>
<th>View</th>
<th>Edit</th>
<?php } ?>
<?php if($roleData['role'] == 'admin'){ ?>
<th>Delete</th
<?php } ?>>
</tr>
<?php
$sql1="SELECT * FROM current_job ORDER BY id DESC";
$res1= $conn->query($sql1);
if($res1->num_rows>0)
{$i=1;
while($data=$res1->fetch_assoc()){
?>
<tr>
<?php if($roleData['role'] == 'admin' || $roleData['role'] == 'checker' || $roleData['role'] == 'designer' ){ ?>
<td><?php echo $i; ?></td>
<td><?php echo $data['jobnumber']; ?></td>
<td><?php echo $data['revison']; ?></td>
<?php } ?>
<?php if($roleData['role'] == 'admin'){ ?>
<td><?php echo $data['groupp']; ?></td>
<td><?php echo $data['checker']; ?></td>
<?php } ?>
<?php if($roleData['role'] == 'admin' || $roleData['role'] == 'checker' ){ ?>
<td><?php echo $data['designer']; ?></td>
<?php } ?>
<?php if($roleData['role'] == 'admin' || $roleData['role'] == 'designer' ){ ?>
<td><?php echo $data['releasedate']; ?></td>
<?php } ?>
<?php if($roleData['role'] == 'admin' || $roleData['role'] == 'checker' || $roleData['role'] == 'designer' ){ ?>
<td><a href="dashboard.php?cat=website-content&subcat=home-content&view=<?php echo $data['id']; ?>" class="text-secondary content-link"><i class='far fa-eye'></i></a></td>
<td><a href="dashboard.php?cat=website-content&subcat=add-home-content&edit=<?php echo $data['id']; ?>" class="text-success content-link"><i class=' far fa-edit'></i></a></td>
<?php } ?>
<?php if($roleData['role'] == 'admin'){ ?>
<td><a href="javascript:void(0)" class="text-danger delete" name="current_job" id="<?php echo $data['id']; ?>"><i class='far fa-trash-alt'></i></a></td>
<?php } ?>>
</tr>
<?php
$i++;}
}else{
?>
<?php } ?>
</table>
</div>
</div>
</div>
<!-----==================table content end===================-->
<?php } ?>
</div>
as you can see in the image I get this string: > > > >
.
And I can’t find it anywhere in the code
I tried to go and check every line of the code but I couldn’t find it.
2
Answers
looks like blocks of code like this one
<th>Delete</th<?php } ?>>
should be changed to<th>Delete</th><?php } ?>
instead.You place those symbols after your
<?php } ?>
blocks.Probably it’s the root of the problem 🙂
You may try the following code snippet. I’m noticed some errors in your code that are
</th
tag>>
in php codeSo try the following code. I tried to clear this error