hi everybody!
i have one error in sql like this. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
and i could not fine the problem there was answer but not helpfull
here is the code
thanks
i have one error in sql like this. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
and i could not fine the problem there was answer but not helpfull
here is the code
Code:
> <?php // put the action here ?> <form
> action="http://onevatan.net/?page_id=15" method="post"> <p>Please
> Enter Your ID: <input name="frm" type="text" /> <input
> name="searchbtn" type="submit" value="Search" /></p>
>
> </form>
>
> <?php $frm= $_POST['frm']; $result = mysql_query("SELECT * FROM
> wp_participants_database WHERE sid = $frm"); if(!$result){
> die(mysql_error()); } echo "<table border='1'> <tr> <th>photo</th>
> <th>Student ID</th> <th>First Name</th> <th>Father Name</th>
> <th>address</th> <th>Class</th> </tr>";
>
> while($row = mysql_fetch_array($result)) { echo "<tr>"; echo
> "<td>" . $row['photo'] . "</td>"; echo "<td>" . $row['sid'] .
> "</td>"; echo "<td>" . $row['first_name'] . "</td>"; echo "<td>" .
> $row['last_name'] . "</td>"; echo "<td>" . $row['address'] .
> "</td>"; echo "<td>" . $row['class'] . "</td>"; echo "</tr>"; }
> echo "</table>"; ?> </body> </html>
>
> <?php //close mysql_close(); ?>
Comment