Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Word meanings</title>
- <?php
- mysql_connect("localhost", "root", "radhika");
- mysql_select_db("dictionary");
- if(isset($_POST['Submit1']))
- {
- $req=$_REQUEST['word'];
- $strSQL = "SELECT * FROM dict WHERE word='$req'";
- $rs = mysql_query($strSQL);
- while($row = mysql_fetch_array($rs))
- {
- $x=$row["word"];
- $y=$row["meaning"];
- $z=$row["synonym"];
- echo "<b>Word</b>: " . $x ."<br/>" ;
- echo "<b>Meaning</b>: " . $y ."<br/>" ;
- echo "<b>Synonym</b>: " . $z ."<br/>" ;
- }
- }
- mysql_close();
- ?>
- </head>
- <body>
- <form name="form1" action="lastry.php" method="POST">
- <input type="text" name="word" value="<?php echo isset($_POST['word'])?$_POST['word']:''?>"x-webkit-speech/>
- <Input Type ="Submit" Name ="Submit1" Value ="submit">
- </form>
- <?php if($_POST)
- {
- ?>
- <audio controls="controls" autoplay="autoplay">
- <source src="<?php echo "http://tts-api.com/tts.mp3?q=$z";?>" type="audio/mp3" />
- </audio>
- <?php }?>
- </body>
- </html>
- urlencode($z)
- http://tts-api.com/tts.mp3?q=<?php echo urlencode($y);?>&type="audio/mp3" />
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement