Solved

I think I'm in a loop

Posted on 2007-03-23
1
178 Views
Last Modified: 2010-07-27
Have I put myself into a loop here?

<?php
$i = 0;
while ($i < 2) {
      $i = $i+1;
      if ($i=1) {
            echo "<tr>";
      }
      echo "<td>";
?>
<form action="/admin/delete_provider.php?Company=<?= $strCompanyname ?>" method="post">
  <td width="250">
     <a href="/admin/edit_provider.php?providerID=<?= $providerID ?>" >
       <?= $strCompanyname ?>
     </a>&nbsp;
     <a href="/admin/confirm_provider.php?Company=<?= $strCompanyname ?>">
       <input type="button" value="Delete" class="btn2">
     </a>
   </td>
</tr></form>
<?php
 echo "</td>";
      if ($i=3) {
            echo "</tr>";
            $i=0;
      }
}
?>
0
Comment
Question by:pingeyeg
1 Comment
 
LVL 5

Accepted Solution

by:
Trakos earned 500 total points
ID: 18781710
You have wrong if syntax. You should use == (compare) instead of = (change value).
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question