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 'ಟ%'"; $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
Other answers
What is it that you are trying to accomplished?
Gabs777
Related Q & A:
- Are there any open-source check-in / check-out systems?Best solution by stackoverflow.com
- How to generate unique codes in PHP?Best solution by Stack Overflow
- How to store data in php and get data from php?Best solution by Stack Overflow
- Animal Crossing: Wild World Friend codes please?Best solution by Yahoo! Answers
- Anybody psychic or clairvoyant? I really need some help and advice please. Please see question below?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
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.