Apex
Dear Sir Kamran - PHP instructor

Im getting this parse error:
Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\Lesson10.php on line 31

Sir, Kindly guide me what to do to resolve this error ?

PHP code is :

<?php

$chkcon = mysqli_connect("localhost", "root", "@Mcse2015") or die("Failed"); //check connection
// echo "Connected!"; 

$chkdb = mysqli_select_db($chkcon, "college") or die( "DB Failed");
// echo "DB is Connected";

$viewAll = mysqli_query($chkcon, "Select *from stInfo");

echo "<table border=1>
<th>stRollno</th>
<th>stClass</th>
<th>stName</th>
<th>Update</th>";

while($rowsFetch = mysqli_fetch_array($viewAll))  //fetching rows
{ ?>
   <tr>
  <td><? echo $rowsFetch[0];?> </td>
  <td><? echo $rowsFetch[1];?> </td>
  <td><? echo $rowsFetch[2];?> </td>
 <td <a href="Lesson10.php?id =<? echo $rowsFetch[0]; ?>">Edit</a></td>

  </tr>
<? } ?>

</table>


Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\Lesson10.php on line 31

And also why there is no any category for PHP ?
Quote 0 0
hamzabaloch
salam 
ap code main php starting aur ending tag ka one standard follow karo <?php ?> ya pher <? ?> 
next thing 
Code:

echo "<table border=1>
<th>stRollno</th>
<th>stClass</th>
<th>stName</th>
<th>Update</th>";

ap uper diya gya table simple html main be to likh saktay thay ap nay kon sa ic main database sa data liya aur put kia 
last baat jo muj ap ka code main nai samaj lagi 
ap table ko start echo sa kar raha ho 
aur end  html per ka tag sa kar rahay ho 
ap nay echo sa table ko end kyu nai kiya ?
Quote 0 0

Add a Website Forum to your website.

 
Urdu IT Accademy � 2013 | License Agreement