Jump to content

Tauheed

Members
  • Content Count

    13
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Tauheed

  • Rank
    Newbie
  1. Hi folks, There is a third party application, which supports javascript. It gives modification options. I would like to write a script in which it searches a file from ElasticSearch, if it finds the file then it should attach the file. I'm not good with javascript, just I started learning it for the last few days. Can someone help me, please? I really appreciate it.
  2. Is it not possible in HTML?? actually i have better know in HTML than PHP. if it is possible to make every page separate then joint it. I mean button page, header, footer, ad etc....... I will be thankful for your kind reply.
  3. Dear Experts, i have crated my personal page, whenever i need to change in header, buttons and etc, where i will change in each page, now i would like to separate button page, header & footer page, so friends how i can link these pages to my index and other pages.
  4. Dear Sir, please explain, how and where i can use utf8 encode & decode functions. will you please guid me? i will be thankful.
  5. Dear Experts, i have created a arabic to persian to english dictionary, whenever i will enter english keyword to search box it will show the result, but when i will type persian and arabic word in box it will show zeero result, actually i have saved alots of arabic and persian words in my databse. i have saved all file using encoding "UTF-8". i dont know where i need to change. both pages source codes are mentioned below. please help me i will be thankful for this kindness. index.php <html><head><link rel="stylesheet" type="text/css" href="style.css" /><title>Dictionary</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><script type="text/javascript" src="ajax.js"></script><script type="text/javascript"> function getScriptPage(div_id,content_id,get_count){subject_id = div_id;content = document.getElementById(content_id).value;http.open("GET", "script_page.php?content=" + escape(content)+"&count="+get_count, true);http.onreadystatechange = handleHttpResponse;http.send(null);} </script><link href="styles.css" rel="stylesheet" type="text/css"></link></head> <body><div class="ajax-div"><div class="input-div">Enter Search Keyword here :<input type="text" id="text_content" size="40" onKeyUp="getScriptPage('count_display','text_content','1')"><input type="button" class="button" value="Search" onMouseUp="getScriptPage('output_div','text_content','0')"><div id="count_display"> </div></div><div class="output-div-container"><div id="output_div"></div></div></form></div></body></html> script_page.php <link rel="stylesheet" type="text/css" href="style.css" /><?php// You can do anything with the data. Just think of the possibilities!include('conn.php'); $strlen = strlen($_GET['content']);$display_count = $_GET['count']; $select = "select * from dic where (english like '%".$_GET['content']."%') or (arabic like '%".$_GET['content']."%') or (persian like '%".$_GET['content']."%')";$res = mysql_query($select);$rec_count = mysql_num_rows($res); if($display_count){echo "There are <font color='red' size='3'>".$rec_count."</font> matching records found.Click Search to view result.";}else{?> <center> <table class="sofT" cellspacing="0" border="1"><tr><td colspan="5" class="helpHed" align="center">Search Result</td></tr><tr> <td class='helpHed'>English</td> <td class='helpHed'>Arabic</td> <td class='helpHed'>Arabic Roman</td> <td class='helpHed'>Persian</td> <td class='helpHed'>Persian Romant</td> </tr><?phpif($rec_count > 0){while($data=mysql_fetch_array($res)){echo "<tr><td class='sup'>".$data['english']."</td><td class='sup'>".$data['arabic']."</td><td class='sup'>".$data['aroman']."</td><td class='sup'>".$data['persian']."</td><td class='sup'>".$data['proman']."</td> </tr>";}}elseecho '<td colspan="5" align="center"><FONT SIZE="2" COLOR="red">No matching records found....!</FONT></td>'; }?></center>
  6. I want to connect any other website to my website. i mean in a website there are examination results added, i just want that a small part of that website (screen shot enclosed) should appear in my website, and that website name should not be appear there. my be centeral part of that web. I just want that user should check there result in my website. is there any code for linking like that? please help me i will be thankful for this kindness.
  7. Dear Friends, i am trying to make ajax search engine, whenever i will enter text in search field and click on button then search result will not appear. please help me. screen shot and source codes are mentioned below.first page <html><head><link rel="stylesheet" type="text/css" href="style.css" /><title>Ajax Search</title><script type="text/javascript" src="ajax.js"></script><script type="text/javascript"> function getScriptPage(div_id,content_id){subject_id = div_id;content = document.getElementById(content_id).value;http.open("GET", "search.php?content=" + escape(content), true);http.onreadystatechange = handleHttpResponse;http.send(null);} </script><link href="styles.css" rel="stylesheet" type="text/css"></link></head> <body><div class="ajax-div"><div class="input-div">Enter Search Keyword here :<input type="text" id="text_content" size="40"><input type="button" class="button" value="Search" onMouseUp="getScriptPage('output_div','text_content','0')"> </div><div class="output-div-container"><div id="output_div"></div></div></form></div></body></html> 2nd pagesearch.php <?php mysql_connect("localhost", "root", "root") or die("Error connecting to database: ".mysql_error()); mysql_select_db("mysql") or die(mysql_error()); ?> <html><head> <title>Search results</title> </head><body><?php $query = $_GET['content']; // gets value sent over search form $min_length = 1; if(strlen($content) >= $min_length){ // if query length is more or equal minimum length then $query = htmlspecialchars($query); $query = mysql_real_escape_string($query); $raw_results = mysql_query("SELECT * FROM customer_table WHERE `id` = $content") or die(mysql_error()); if(mysql_num_rows($raw_results) > 0){ // if one or more rows are returned do following echo "<table border='1'><tr> <th><h2>Id</h2></th><th><h2>Name</h2></th><th><h2>Regestration No</h2></th><th><h2>Remarks</h2></th></tr>"; while($results = mysql_fetch_array($raw_results)){ echo "<tr>"; echo "<td> " . $results['id'] . "</td>"; echo "<td>" . $results['name'] . "</td>"; echo "<td>" . $results['reg'] . "</td>"; echo "<td>" . $results['remarks'] . "</td>"; echo "</tr>"; }echo "</table>"; } else{ // if there is no matching rows do following echo "No results"; } } else{ // if query length is less than minimum echo "Minimum length is ".$min_length; } ?></body></html>
  8. Tauheed

    Search engine (Help)

    Dear sir, i need some more help about my search engine, i just want that my search result should show in first page, i mean without loading. Some 1 told it is possible with the help of ajax, but i dont have any idea about ajax. Please help me i will be thanlful, my both pages source codes are mentioned above.
  9. Tauheed

    Search engine (Help)

    Dear sir, i need some more help about my search engine, i just want that my search result should show in first page, i mean without loading. Some 1 told it is possible with the help of ajax, but i dont have any idea about ajax. Please help me i will be thanlful, my both pages source codes are mentioned above.
  10. Tauheed

    Search engine (Help)

    Dear sir, i need some more help about my search engine, i just want that my search result should show in first page, i mean without loading. Some 1 told it is possible with the help of ajax, but i dont have any idea about ajax. Please help me i will be thanlful, my both pages source codes are mentioned above.
  11. Tauheed

    Search engine (Help)

    Thank you sir, now it is working. once again a lots of thanks, you resolve this matter. Thank you very much
  12. Tauheed

    Search engine (Help)

    Dear then if i want to search an other record suppose 5,6 etc then? it is complete mysql search engine, for seaching every record it is not possible to change customer id every time.i just wanna to say whenever i will enter keyword in search box then required record should be appear on the page. but now whenver i will enter keyword in search box suppose 1, every reocrd have 1 (1,11,12,13...21,31,41,91,101 etc) that will appear and if i will enter 2 every records have 2 (2,12,20,21...32,42,92,102 etc) that will appear, i mean when i will enter 1 in search box then that recrod id is 1 should be appear. please help me, i will be thankful for this kindness.
  13. Tauheed

    Search engine (Help)

    I have created a search engine to find records which are added in mysql database, whenever i will enter customer id to find record all records appear, suppose a customer id is 1 and when i will enter 1 then data of 11,12,13,....21,31,101 etc also appear on my page, both pages source code are mentioned below. please help me i m in deep trouble. i will be thankful for this kindness. index.php <html><head> <title>Search</title> </head><body> <form action="search.php" method="GET"> <input type="text" name="query" /> <input type="submit" value="Search" /> </form></body></html> -------------------------------------------------------------------------------------search.php <?php mysql_connect("localhost", "root", "root") or die("Error connecting todatabase: ".mysql_error()); mysql_select_db("mysql") or die(mysql_error()); ?><html><head> <title>Search results</title> </head><body><?php $query = $_GET['query']; $min_length = 1; if(strlen($query) >= $min_length){ $query = htmlspecialchars($query); $query = mysql_real_escape_string($query); $raw_results = mysql_query("SELECT * FROM result WHERE (`rollno` LIKE '%".$query."%')") or die(mysql_error()); if(mysql_num_rows($raw_results) > 0){ echo "<table border='1'><tr><th><h2>Roll No</h2></th><th><h2>Student Name</h2></th><th><h2>Marks Obtained</h2></th><th><h2>Remarks</h2></th></tr>"; while($results = mysql_fetch_array($raw_results)){ echo "<tr>"; echo "<td> <h3><center>" . $results['rollno'] . "</td></h3></center>"; echo "<td><h3>" . $results['name'] . "</td></h3>"; echo "<td><h3><center>" . $results['marks'] . "</td></h3></center>"; echo "<td><h3><center>" . $results['remarks'] . "</td></h3></center>"; echo "</tr>"; }echo "</table>"; } else{ echo "No results"; } } else{ echo "Minimum length is ".$min_length; } ?></body></html>
×
×
  • Create New...