Jump to content

HowdeeDoodee

Members
  • Posts

    118
  • Joined

  • Last visited

    Never

Everything posted by HowdeeDoodee

  1. I need a php text search script to search records in my db. I need a script to give the user the following options when running a search on the db. Using a drop-down box or some other alternative, I want to enable the user to select from the following search options. All words Any words Exact phrase Words within x number of records Boolean expression Regular expression Thank you in advance for your reply.
  2. After running the following code to create a table and then after inserting records, I am seeing the word BLOB in phpMyAdmin using Browse instead of the text in the fields. Here is the table created. CREATE TABLE `thistable`.`search_test` (`id` INT(11) NOT NULL, `name` TEXT NOT NULL, `description` TEXT NOT NULL, `price` INT(11) NOT NULL, `img` TEXT NOT NULL) ENGINE = MyISAM CHARACTER SET latin1 COLLATE latin1_bin; Here are the records inserted. INSERT INTO `search_test` (`id`, `name`, `description`, `price`, `img`) VALUES (1, 'Nike running shoe', 'Fantastic nike running shoe. Comes in both blue and white', 100, 'nike.png'), (2, 'Reebok basket shoe', 'Great basket shoe from Reebok. Unisex model. Comes in both red and white', 90, 'reebok.png'), (3, 'Nike basket shoe', 'Basket shoe from Nike. Comes in both white and red', 80, 'nike2.png'), (4, 'Reebok running shoe', 'Running shoe from Reebok. Comes in both white and red', 75, 'reebok2.png'), (5, 'New Nike basket shoe', 'New Basket shoe from Nike. Comes in both blue and red', 80, 'nike3.png'); Here are the values appearing in the Browse option in phpMyAdmin. Edit Delete 1 [bLOB - 17B] [bLOB - 57B] 100 [bLOB - 8B] Edit Delete 2 [bLOB - 18B] [bLOB - 72B] 90 [bLOB - 10B] Edit Delete 3 [bLOB - 16B] [bLOB - 50B] 80 [bLOB - 9B] Edit Delete 4 [bLOB - 19B] [bLOB - 53B] 75 [bLOB - 11B] Edit Delete 5 [bLOB - 20B] [bLOB - 53B] 80 [bLOB - 9B]
  3. OK, I have deeply regressed. Error reporting is 135 Display errors is ON I am now getting... Parse error: syntax error, unexpected $end in /home6/findthep/public_html/CP/this.php on line 43 When I run the following script. <html> <head> <title>Sans Titre</title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <meta name="generator" content="HAPedit 3.1"> </head> <body bgcolor="#FFFFFF"> <?php //phpinfo() ; $c = isset($_GET['c']) ? (int)$_GET['c'] : 0; $keyword = isset($_POST['keyword']) ? $_POST['keyword'] : ''; /* call this script "this.php" */ if ($c != 1) { ?> <form action="this.php?c=1"> <input type="text" name="keyword"> <input type="submit" value="Search!"> </form> <?php } else if ($c==1) { $username = "findthep"; $password = "DiannaK[1952]"; $hostname = "localhost"; $dbh = mysql_connect($hostname, $username, $password) or die("Unable to connect to MySQL"); $dbname = "findthep_DBProj"; mysql_select_db($dbname, $dbh); $sql = "select * from `View2_BibleFT` where match (Topic, Subtopic, Theswords) against ('$keyword')"; //$res = MySQL_query($sql); $res = mysql_query($sql) or die(mysql_error); ?> </body> </html>
  4. Thank you for the reply. I pasted your changes into the script without any changes but I still get no records showing. Is there any way to run a test to see where the problem might be?
  5. Thank you for the reply. I tried your suggestions but still get no display of records in the db.
  6. I am trying to teach myself how to use Full Text. I copied a simple script from a teaching site (lol) and cannot get the script to display any records. Can someone tell me where the error is in the script. Thank you in advance for your replies. <?php /* call this script "this.php" */ if ($c != 1) { ?> echo "input box starts here"; <form action="this.php?c=1"> <input type="text" name="keyword"> <input type="submit" value="Search!"> </form> <?php } else if ($c==1) { $username = "____"; $password = "_____"; $hostname = "localhost"; $dbh = mysql_connect($hostname, $username, $password) or die("Unable to connect to MySQL"); $dbname = "findthep_DBProj"; mysql_select_db($dbname, $dbh); $sql = "SELECT * FROM `View2_B` WHERE MATCH (Topic, Subtopic, Theswords) AGAINST ('$keyword') ORDER BY score DESC"; $res = MySQL_query($sql); ?> <table> <tr><td>SCORE</td><td>TITLE</td><td>ID#</td></tr> <?php while($row = MySQL_fetch_array($res)) { echo "<tr><td>{$sql['score']}</td>"; echo "<td>{$sql['Topic']}</td>"; echo "<td>{$sql['Subtopic']}</td>"; echo "<td>{$sql['Theswords']}</td>"; echo "<td>{$sql['id']}</td></tr>"; } echo "</table>"; } ?> </body>
  7. This is my semi-annual attempt to set up full text searching on my site. Currently I am using the LIKE operator without FULL TEXT. I am looking for a free program where I fill in the blanks and the program sets up the rest of the script, including an input page. Does a program like this exist?
  8. I am building a self-tutorial and have hit a snag on the matter of backslashes. With these settings in php.ini, it makes no difference in how these settings are set. The backslashes are not stripped out of words where backslashes appear no matter how the magic quotes are set in php.ini. magic_quotes_gpc = On magic_quotes_runtime = On magic_quotes_sybase = On OR magic_quotes_gpc = Off magic_quotes_runtime = Off magic_quotes_sybase = Off Makes no difference. Can someone explain why the backslashes appear no matter what the settings in php.ini might be? Here is sample code... $SeeAlso = "It is the Lord\'s day of 1000\'s"; echo '<br>'; echo $SeeAlso; echo '<br>'; echo get_magic_quotes_gpc(); function quote_smart($SeeAlso) { // Stripslashes //get_magic_quotes_gpc Returns 0 if magic quotes gpc are off, 1 otherwise. if (get_magic_quotes_gpc()) { $SeeAlso = stripslashes($SeeAlso); } // Quote if not a number or a numeric string //mysql_real_escape_string — Escapes special characters in a string //for use in a SQL statement if (!is_numeric($SeeAlso)) { $SeeAlso = "'" . mysql_real_escape_string($SeeAlso) . "'"; } return $SeeAlso; } echo '<br>'; echo '<br>'; echo $SeeAlso; echo '<br>'; echo '<br>'; Thank you in advance for any help.
  9. Did not have to install an earlier version. I found this tutorial that helped me solve a number of issues. http://www.arterground.com/
  10. After too many efforts at solving this issue, I am going to try to install an earlier version of PHP. From my research, the latest version of php is loaded with undesirables.
  11. Thank you. OK, the above commands typed in after the command prompt did start and stop apache. However, php is still not being called. Need more suggestions, please.
  12. For others reading this thread and as an update... On my system the full path name using Apache 2.2 is... C:\Program Files\Apache Software Foundation\Apache2.2\bin\httpd -k restart Pasting and running the above command in Windows Explorer address bar did bring up a command window. However, the command window appeared and disappeared so fast the contents of the command window could not be read. If indeed Apache did restart, the issue of php not being still called remains.
  13. Where are the following commands to be entered? net stop apache2.2 net start apache2.2
  14. Thank you for the response. Since I am a total novice regarding installation and configuration matters, my answer is "probably not." Can you look at the following lines taken from Apache httpd.conf and make suggestions as to what I need to add or change? Thank you again. From the httpd.conf file of Apache, here are the LoadModule lines # # Dynamic Shared Object (DSO) Support # # To be able to use the functionality of a module which was built as a DSO you # have to place corresponding `LoadModule' lines at this location so the # directives contained in it are actually available _before_ they are used. # Statically compiled modules (those listed by `httpd -l') do not need # to be loaded here. # # Example: # LoadModule foo_module modules/mod_foo.so # LoadModule actions_module modules/mod_actions.so LoadModule alias_module modules/mod_alias.so LoadModule asis_module modules/mod_asis.so LoadModule auth_basic_module modules/mod_auth_basic.so #LoadModule auth_digest_module modules/mod_auth_digest.so #LoadModule authn_alias_module modules/mod_authn_alias.so #LoadModule authn_anon_module modules/mod_authn_anon.so #LoadModule authn_dbd_module modules/mod_authn_dbd.so #LoadModule authn_dbm_module modules/mod_authn_dbm.so LoadModule authn_default_module modules/mod_authn_default.so LoadModule authn_file_module modules/mod_authn_file.so #LoadModule authnz_ldap_module modules/mod_authnz_ldap.so #LoadModule authz_dbm_module modules/mod_authz_dbm.so LoadModule authz_default_module modules/mod_authz_default.so LoadModule authz_groupfile_module modules/mod_authz_groupfile.so LoadModule authz_host_module modules/mod_authz_host.so #LoadModule authz_owner_module modules/mod_authz_owner.so LoadModule authz_user_module modules/mod_authz_user.so LoadModule autoindex_module modules/mod_autoindex.so #LoadModule cache_module modules/mod_cache.so #LoadModule cern_meta_module modules/mod_cern_meta.so LoadModule cgi_module modules/mod_cgi.so #LoadModule charset_lite_module modules/mod_charset_lite.so #LoadModule dav_module modules/mod_dav.so #LoadModule dav_fs_module modules/mod_dav_fs.so #LoadModule dav_lock_module modules/mod_dav_lock.so #LoadModule dbd_module modules/mod_dbd.so #LoadModule deflate_module modules/mod_deflate.so LoadModule dir_module modules/mod_dir.so #LoadModule disk_cache_module modules/mod_disk_cache.so #LoadModule dumpio_module modules/mod_dumpio.so LoadModule env_module modules/mod_env.so #LoadModule expires_module modules/mod_expires.so #LoadModule ext_filter_module modules/mod_ext_filter.so #LoadModule file_cache_module modules/mod_file_cache.so #LoadModule filter_module modules/mod_filter.so #LoadModule headers_module modules/mod_headers.so #LoadModule ident_module modules/mod_ident.so #LoadModule imagemap_module modules/mod_imagemap.so LoadModule include_module modules/mod_include.so #LoadModule info_module modules/mod_info.so LoadModule isapi_module modules/mod_isapi.so #LoadModule ldap_module modules/mod_ldap.so #LoadModule logio_module modules/mod_logio.so LoadModule log_config_module modules/mod_log_config.so #LoadModule log_forensic_module modules/mod_log_forensic.so #LoadModule mem_cache_module modules/mod_mem_cache.so LoadModule mime_module modules/mod_mime.so #LoadModule mime_magic_module modules/mod_mime_magic.so LoadModule negotiation_module modules/mod_negotiation.so #LoadModule proxy_module modules/mod_proxy.so #LoadModule proxy_ajp_module modules/mod_proxy_ajp.so #LoadModule proxy_balancer_module modules/mod_proxy_balancer.so #LoadModule proxy_connect_module modules/mod_proxy_connect.so #LoadModule proxy_ftp_module modules/mod_proxy_ftp.so #LoadModule proxy_http_module modules/mod_proxy_http.so #LoadModule rewrite_module modules/mod_rewrite.so LoadModule setenvif_module modules/mod_setenvif.so #LoadModule speling_module modules/mod_speling.so #LoadModule ssl_module modules/mod_ssl.so #LoadModule status_module modules/mod_status.so #LoadModule substitute_module modules/mod_substitute.so #LoadModule unique_id_module modules/mod_unique_id.so #LoadModule userdir_module modules/mod_userdir.so #LoadModule usertrack_module modules/mod_usertrack.so #LoadModule version_module modules/mod_version.so #LoadModule vhost_alias_module modules/mod_vhost_alias.so Here are the AddType lines: DefaultType text/plain <IfModule mime_module> # # TypesConfig points to the file containing the list of mappings from # filename extension to MIME-type. # TypesConfig conf/mime.types # # AddType allows you to add to or override the MIME configuration # file specified in TypesConfig for specific file types. # #AddType application/x-gzip .tgz # # AddEncoding allows you to have certain browsers uncompress # information on the fly. Note: Not all browsers support this. # #AddEncoding x-compress .Z #AddEncoding x-gzip .gz .tgz # # If the AddEncoding directives above are commented-out, then you # probably should define those extensions to indicate media types: # AddType application/x-compress .Z AddType application/x-gzip .gz .tgz # # AddHandler allows you to map certain file extensions to "handlers": # actions unrelated to filetype. These can be either built into the server # or added with the Action directive (see below) # # To use CGI scripts outside of ScriptAliased directories: # (You will also need to add "ExecCGI" to the "Options" directive.) # #AddHandler cgi-script .cgi # For type maps (negotiated resources): #AddHandler type-map var # # Filters allow you to process content before it is sent to the client. # # To parse .shtml files for server-side includes (SSI): # (You will also need to add "Includes" to the "Options" directive.) # #AddType text/html .shtml #AddOutputFilter INCLUDES .shtml </IfModule>
  15. Thank you in advance for your replies. I am sure this issue has been answered numerous times but I cannot find an answer specific to my installations. Issue: php is not being called up On Windows XP, SP3, I am running: php 5.3 MySql 5.4.1 apache 2.2.11 Programs above were installed using the installer accompanying each program. Programs above are installed in: C:\Program Files\MySQL\MySQL Server 5.4 C:\Program Files\PHP C:\Program Files\Apache Software Foundation Under system variables I have: Path C:\Program Files\PHP\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\MySQL\MySQL Server 5.4\bin PHPRC C:\Program Files\PHP\ php test file syntax is: <? echo 'PHP is working.<br>'; echo phpinfo(); ?> test file is called up as: http://localhost/test.php When the test file is called up, all the syntax is displayed in the browser as opposed to just the text inside the single quotes. No phpinfo is displayed. Apache is running without visible errors. Thank you again for any help.
  16. I am making this request on behalf of another party who is a webmaster using phpBB 2.0 The display font size on the forum is too small. How does the webmaster increase the display font size of posts in each thread? Thank you in advance.
  17. Through some research and a lot of trial and mostly error, I found google does offer an ad free option for those organizations who are non-profit.
  18. I need a site search engine other than google and sphider. Google presents ads which would be offensive to site visitors. Sphider does not seem to give users the ability to search only in certain subdirectories. Is there a google like site search engine I can install on my site? I would like a php-based search engine so I can access the index files created, if that is possible. Thank you in advance for any replies.
  19. Thank you rlindauer, it is working now. I know this has never happened to anyone here before but I uploaded the file to one directory but used another by mistake. Thank you again.
  20. Thank you. No, I think will need a loop. I have groups of verses of indeterminant length throughout the site. I want to make a way for users to click on a single link or links within each record of the db and pull up the verses in an online bible program. If you go to the concordance part of the site in the url, you will see what I mean. Can you give me any suggestions. Thank you again.
  21. Thank you rlindauer. I tried your code but came up with the same result. Improper ending on the hyperlink and two CP directories. Do you have any other suggestions? Thank you again. Here is the url generated. http://www.findthepower.net/CP/CP/BibleSuperSearch/bible_supersearch.php?submit=true&version=kjv&searchtype=All+Words&search=&wholeword=Whole+words+only.&table_display=true&lookup=exo
  22. Thank you sasa for the comment. Unfortunately, none of your suggestions put the proper ending on the generated html statement. I need the ending of the html hyperlink to be like The space in the hyperlink at the end is not an issue. I need the space but I also need for the end of the generated hyperlink to be derived from the $ref values like what I have show above. In actual practice, there can be over hundred $ref values. All of the $ref values must go at the end of the hyperlink. Your suggestions also generated an extra directory name as shown below. There is only one directory labeled CP. For some reason, your suggestions generated /CP/CP. Thank you again for the comments. Here are your suggestions and the hyperlink the suggested code created. $value = str_replace(' ', '+', implode(';',$ref)); http://www.findthepower.net/CP/CP/BibleSuperSearch/bible_supersearch.php?submit=true&version=kjv&searchtype=All+Words&search=&wholeword=Whole+words+only.&table_display=true&lookup=gen $value = str_replace(' ', '+', implode(';',$ref)); http://www.findthepower.net/CP/CP/BibleSuperSearch/bible_supersearch.php?submit=true&version=kjv&searchtype=All+Words&search=&wholeword=Whole+words+only.&table_display=true&lookup=gen $value = str_replace(' ', '+', implode(';',$ref)); http://www.findthepower.net/CP/CP/BibleSuperSearch/bible_supersearch.php?submit=true&version=kjv&searchtype=All+Words&search=&wholeword=Whole+words+only.&table_display=true&lookup=exo
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.