Jump to content
Larry Ullman's Book Forums


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About jpokusa

  • Rank
  1. So in my current code I need to replace $keyword with $search_term. Is it an easy fix to my current code? Thank you for your help
  2. Hi HartleySan, Here is the page http://www.trueacewebdesign.com/animal-search/main.html I created the two tables as you mentioned. I am not able to get any result for the query when I type in rabbits. I put you code in my page. Do I need to change anything besides just putting in your query code? <?php /************************************************************************************** * Main Search Page - search.php * Author: Your Name <email@something.com> * This file searches the database **************************************************************
  3. Thank you for your help so far. Typing more than one word is fine. Here is my table structure above. I am still a newbie at php and I understand that this may not be the most secure and proper way of doing this basic search engine. I have one table called (table_name) I have three fields in my table. The field called hotwords is queried to display my article and content field. Really basic. Here is my query //Set the MySQL query if ($search == NULL or $search == '%'){ } else { for ($i=0; $i<count($keywords); $i++) { $query = "SELECT * FROM table_name " . "WHERE hotwords LIKE '%".$k
  4. That's exactly what I want to do. I just can't figure out how to write the code and put in my search.php
  5. No it doesn't matter if it is the first word in the article. For the rabbit article I only want that article to appear if you type in rabbits or if you type in tips or if you type in breeding. I do not want this article to pop up if you type in ra. Because I am only choosing important keywords in my database for each article. For this example ra is not a keyword I have chosen. I am looking for php code that will query for an exact match of a word typed in the search box. I hope that clears this up.
  6. Hi HartleySan Thanks but imdont think this is what I need. If you go to my search engine please see link in my first post and you type in the search box the two letters ra and hit the search button then unfortunately my article on rabbits appears. I want my rabbit article only to show up in the result only if the user types in the word rabbit. My search currently is to greedy. What I am asking help with is what type of php code to place in my current code. I believe it is just a basic line of preg match or something.
  7. I built a basic working search engine that will pull articles from my MYSQL tables. I want to make the search is stricter for getting my results. I want to add a preg_match line in my php code to make sure that the match has to be found at the start of the string. So in my search engine when the letter a is typed in the search box I dont want that to pull results. I want the search to be no less then three characters and it must match the word. So you have to type in cat exactly to retrieve my cat article. Here is link to my webpage. I thought adding this code $search = preg_match('/^ /', $sea
  8. Yes I am on a linux system as I am using Fatcow hosting. www.fatcow.com apache server. I updated the header with your instuctions but it didnt work. Randy Can you email me a link to your version of it live on your testing server. I would love to see how the launaguge drop down working on your end. Thank you JP
  9. Hello, I am on Chapter 17 Example Message Board. I went through this chapter and I am confuse and feel that I am missing something because from the screenshots in the book I do not have the following after I completed the chapter. The Language does not change when I try to switch languages from the drop down menu. The main question is what do I need to do to see that like in the book? Please note I am not receiving any error messages and I can post to a thread or create a new one. Please see the link to forum I created with the book files. http://www.trueacewebdesign.com/
  10. Solved!!!! I had to add a savepath before my session. I added the following code to the login.php and loggedin.php scripts session_save_path("/home/users/web/b2529/moo.trueace/cgi-bin/tmp"); session_start(); // Start the session. So the bottom line is make sure to check your hosting config if you have session issues. JP
  11. Hi Larry, I thought I read in your book that for sessions I may need to state the path to the folder session.save_path it looks like I have /var/phpsessions as a savepath. If you look at my php infor screenshot. Just to confirm I dont need to add anything about that to the book php files provided for session scripting?
  12. I have narrowed the issue down to the webhost. I have uploaded all the files to Godaddy Hosting and the Login form works now. So the issue has to do with Fatcow hosting. I will update this post after I find out what needs to be done on the Fatcow hosting side. In the meantime I have checked the sessions section in the php info file on fatcow. here is what i got. session
  13. Im using // Redirect: redirect_user('loggedin.php'); If you download my zip file you can see all that I am running.
  14. No error messages. I am not being redirected to loggedin.php. Check out my links above.
  • Create New...