Solved

I think I'm in a loop

Posted on 2007-03-23
1
177 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
This article discusses four methods for overlaying images in a container on a web page
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

821 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