How can I check captcha with PHP?

Please check this php codes?

  • /* this is my d.php which i hav linked to another html file*/ <?php //Connecting to MySQL Database $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } //Select Database mysql_select_db("dictionary", $con); //MySQL Query: SELECT $sql="SELECT * FROM dictionary.list WHERE word like '&#3231%'"; $result=mysql_query($sql,$con); //Design HTML Output //echo "<table border='1'> //<tr></tr>"; //while($row = mysql_fetch_array($result)){ //echo "<td>" . $row['word'] . "</td>"; //echo "<td>" . $row['word'] . "</td> "</tr>"; //echo "</table>"; while($row = mysql_fetch_array($result)){ //echo $row['word'] . "</br>"; $curr_word=$row['word']; echo '<a href="http://localhost/dr.php/?selword='... '">' .$curr_word.'</a>'; echo "<br/>"; } //Terminating MySQL Connection mysql_close($con); ?> /*this is my dr.php which i have called in d.php */ <?php // Connect to database server mysql_connect("localhost", "root", "") or die (mysql_error ()); // Select database mysql_select_db("dictionary") or die(mysql_error()); // SQL query //$word=$_POST["selword"]; //$strSQL = "SELECT * FROM list WHERE selword='[$word]'"; $selword=$_POST["word"]; $strSQL = "SELECT * FROM list WHERE selword='$selword'"; // Execute the query (the recordset $rs contains the result) $rs = mysql_query($strSQL); // Loop the recordset $rs // Each row will be made into an array ($row) using mysql_fetch_array while($row = mysql_fetch_array($rs)) { // Write the value of the column FirstName (which is now in the array $row) echo $row['word'] . "</br>"; echo $row['meaning']. "</br>"; } // Close the database connection mysql_close(); ?> can anyone please tel me wat changes i hav to mak in my sql statement in dr.php.....

  • Answer:

    What is it that you are trying to accomplished?

Swathi at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

What is it that you are trying to accomplished?

Gabs777

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.