Jump to content

jodunno

Members
  • Content Count

    124
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by jodunno

  1. Good morning kicken, my filter is for use with login attempts. I am actually working on my own character map. so Smythe-Jones will be Smythe[hyphen]Jones in my database. Thus, all non alphabetic characters submitted via post will be converted/mapped before application. 12.25 will become 12[point]25. permissible is indicative of your disposition. Interesting mindmap. I'm not really ranting. For one thing, i like Barand and generally everyone in this forum. However, people need to stop making excuses for the wild west approach to internet and programming. It is time to impleme
  2. if i only accept letters from the English alphabet, then yes. My post concerns login attempts not registration. During registration: if (!ctype_alpha($untrustedData)) { //log error for display, such as usernames may only contain characters from the English alphabet } on my website, i permit hyphen, apostophre but we are talking about sanitizing code and how to accomplish it. If someone wants to add an array of acceptable characters, then they can do so. Simply add !in_array() check to the loop. However, i hope that you are not one of these lawless internet folks that actually think
  3. I agree with mac_gyver. pdo is simple and better. Meantime, you should always program in a definitive manner whenever possible. So know what you want and enforce it. Thus, if you only want usernames to contain alphabetic letters, then enforce it. Only deal with what is allowed and throw everything else in the programmatic trash can. like so: $untrustedData = $_POST['username']; //trim will not remove spaces between letters, which can sometimes happen as a typo/typing error $untrustedData = str_replace(' ', '', $untrustedData); if (!ctype_alpha($untrustedData)) { $splitkey = (array)
  4. look closer at your code, please: <span class="login100-form-title p-b-43" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>" method="post"> it seems as though you may be new to html as well. action and method attributes belong with the form element not the span element. also, just use action="#" or leave it blank action="" versus the awful idea of PHP_SELF. you should recode your form correctly. you should also read about get and post methods. your php script should be separated into post and get content: if server request method = post
  5. terminate the script after a header redirect: // Redirect user to welcome page perhaps header('location: dashboard.php'); exit;
  6. look closer at the last line in the code that you have posted: ?>php } try this instead: <?php } ?>
  7. Hello Skorpio, I just want to add a method to accomplish the task of separating single and double quotes: use single quotes to echo html with double quotes then concatenate variables, arrays and constants. Using your original code and the code suggested by Barand as a basis: echo '<li><a href="' . $row['url'] . '" title="' . $row['title'] . '"><i class="fas fa-user site-nav--icon"></i> Help</a></li>'; it is probably what you were looking to accomplish. Barand is a superb coder! I don't know gw1500se but gw1500se is also a pro, so i am not tr
  8. hmm, i think that preg_match_all should have three parameters: preg_match_all ($pattern, $subject, $matches) the posted code only contains $pattern and $subject (2/3). preg_match_all( "/$needle/im", $haystack ) php manual entry for preg match all most helpful text from the php manual: "Searches subject for all matches to the regular expression given in pattern and puts them in matches in the order specified by flags." maybe i am wrong but i think that a proper parameter count will solve the problem.
  9. you really are a fantastic programmer. You work very quickly, so it is obvious that coding is second nature to you. I have alot to learn before i could reach such a level. I cannot thank you enough for spending time on this subject. I was pulling my hair out trying to get it to work. Your code makes much more sense. I will add my species list to your table design and try it out tomorrow. I'm going to bed soon. I've sent a zip file to you with some of my routing code that uses my taxonomical arrays. The router just explodes the path to check for a rank. I then use a rank and name array so
  10. i only maintain a latin (scientific) name with a German translation (if one exists in vernacular form). Alot of insects do not have a common name. I live in Berlin, so German is the default language of the system. I wanted to add English since it is my native language but it does not exist in my flat files at this time. So English is being added to search table. I try to add both American and British English whenever possible. I suppose that it might be easier to use my flat files for this data? I will zip some of my code for you to look at, so you can see how my site is working. Code wil
  11. I am trying to build the table of birds for search keywords and it is brutal. I've spent two hours now and i only have 15 species entered of 79. While building this list i wondered if it would be faster to make a large array in cpp and use that instead. Then i got an idea for a cache system. Instead of building a database, how about i build a cache folder with every possible keyword as a file with pre determined results? wouldn't that be fast and easy? so cache folder has meise.php meisen.php and soundexmeise.php and soundexmeisen.php since i am manually building this list i think it would be
  12. I made a video of my site but it is 163mb and too large to attach to email from Google. I'll try to add two screen captures, nay, resized screen captures. I hope that they are small enough to attach here. I've spent alot of time on the front end trying to avoid the cookie cutter designs. anytime i mention photos and trying to protect my hard work, people automatically think that my photo driven site is porn or something. LOL I had some things/designs in mind when i began the site: photo backgrounds that can be disabled, background tint that can be changed and strength can be changed,
  13. yes, i'm making a nature porn website. I'm hoping to have a million bird subscribers. 😄 I think that i'll call my site "feather fantasy". LOL Birds are easy to id in most cases. Flies, spiders and beetles pose a big problem most of the time. If you ever start photographing nature you will learn that many insects cannot be identified by photo, which sucks. You may have an award winning photo but no id for the subject. Experts will often tell you species sp. I started studying this subject and i managed to teach myself how to dissect and identify my own subjects. Sometimes i need exper
  14. I have one thousand one hundred species documented (photos, genitalia, confirmation from experts, data and measurements). Building my site prevents me from working on nature. Anyway, i don't use a database for retrieving species. I use alphabetic functions which return arrays to load each rank. I don't have actual php files per species. I use one file to load all species based upon the flat file functions. I avoid using a database for every little aspect of the site to avoid locking and overruse. My alphabetic/targeted approach is working faster than a db. I use the db to verify that you
  15. Hi Barand, I don't think it is exaggeration since we are talking about internet usage. People/website users think a second too long is a second too long. I was just confused because my queries were working fast on xampp. Anyway, i've removed this code and started over. the taxonomy table is very small for search testing. I now only have Cyanistes caeruleus in the table. I've started over. I will build a bigger table for experimentation and send it to you. Meantime, my website started out as static html/css. I decided to take it to the server side using php. I started studying php two
  16. Hi Barand, your opinion is trusted, naturally, i just wonder what you mean by finish by breakfast since my results are instantaneous on xampp. I assume that you mean lots of users? anyway, i heed your advice and remove the current code. I have started over with full text and match against, like so: CREATE TABLE taxonomy (id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, title VARCHAR(128), link VARCHAR(128), keywords TEXT, FULLTEXT (keywords)) ENGINE=InnoDB; INSERT INTO taxonomy SET title = 'Cyanistes caeruleus', link = 'path/to/sp', keywords = CONCAT ('Cyanistes caeruleus bl
  17. Hello again, I've had an exhausting, stressful week but i managed to tinker with my simple name search feature. For some reason, MATCH AGAINST full-text searches failed me. So i redesigned my table with id, title, link, keywords. keywords is varchar(255), which contains a small list of names for a species in plural form as one word (no spaces). I also discovered the soundex() method of searching for misspelled word matches. I combined like and soundex to get the results that i was seeking. so as an example of my current test code: $title = (string) '%' . $_POST['search'
  18. Hi requinix, I'm actually happy that I can offer a basic search for taxonomy using a database. I am not an advanced programmer yet so building an indexer is not my goal. I simply desire a list of all of the species that i have photographed and identified via genitalia. I currently have over 1,100 species. Thus, i think that a simple keyword list with a link is good. I don't understand why you object to using a database for such a simple search other than because of memory consumption(?). I use Latin (scientific nomenclature), English and German languages. My reason for posting is because
  19. Hello everyone, I am wondering if anyone can offer tips for dealing with plural forms of words in searches? l was wondering if boolean mode is simply the answer or if i should implement a keywords column which contains a list of keywords including plurals to be searched with like? I simply wish to find the database entry (which is in singular form) when a user searches for a plural form (user searches for meisen but title column houses meise). Best wishes
  20. Dear Barand, Brilliant! Thank you for the design model and the user id tip to avoid display name issues. I will work on a test mail system and see how it goes as a rough draft. I think that maybe i should call this messaging system notes instead of mail to avoid confusion with real email systems. Private Notes with individual/self, friends or group settings. File upload is easy enough (although security is complicate and delicate.) I will also implement soft deletions and copyright infringement blocks. File uploading will have to deal with all of the legal issues that accompany the proces
  21. Hello to all, I have an idea for my website but i am hoping to have some design tips from experienced members. I am not a programmer or a database designer. I am not asking for code as i am capable of coding with pseudocode guides. I am not sure how to properly implement my ideas. here is my idea and necessary site data: i have a member application for taxonomy (nature, meaning that i identify animals by keys or dissection and i am providing my own biological research material for all of the ranks that i have documented to date.) I ask for application login name and password, th
  22. Hi gizmola, I typically do not understand certain mysqli code and i usually ignore it. I am happy with pdo and pdo is usually suggested by experts, like you, anyway. Meantime, i should also explain my code and repost it. You may notice a break(2) and wonder why it exists, for example. My code acually contains a switch based upon a form post. I keep all of my bookmark db code in one file (bookmarksdb). I have a page to display all bookmarks (case 'select'), a page method to add a bookmark on bookmarkable pages (case 'insert') and a page to delete bookmarks from your bookmarks list (ca
  23. Hello gizmola and benanamen, Thank you for the informative replies. I did not know that one can "enforce uniqueness on a user/link basis". I am nescient about sql. I will have to drop my table and rebuild it now. I don't mind an extra query if there is no other way but clearly you know of a better way. I will drop the table and add the new unique constraint. Thank you for this valuable info!!! I should've expressed my desires clearly. My apologies for any vagueness in this thread. Your assumptions are correct about unique links per user. I just want to allow bookmarks but not duplicate en
  24. Hello again, I've finally added my bookmarking system and it is working! However, the unique key constraint had to be removed because it is applied to the single table. The unique constraint could only work with a table for each user. I had to add a pre-insert query to check for a duplicate entry (a loop with if column = attempted link). Other than the unique constraint error, al is good. Thanks again! edit: what i mean by unique constraint is that my site crashed with a duplicate entry error (1062) when i added the same link from a different account. I failed to realize too t
  25. advice allready given. read entire thread b4 trolling.
×
×
  • 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.