REGEXP and PHP Forms
Hi listfellows! Okay, I'm trying to make a form talk to a SELECT query using PHP. How do I make input from a form become a PHP variable? This is how far I've gotten: ?php function search_records() { ? form name=form1 method=post action=?php echo $PHP_SELF?action=list_recordstitle=$formtitle; ? input type=text name=$formtitleinput type=submit name=Submit value=GO /form ? } ? Now underneath this I have a function list_records() with a page that is supposed to list the records. $query = SELECT title FROM $user_tablename WHERE title REGEXP '$formtitle' $order_by_str $sort_order_str $limit_str; This will work if I tell it to select all the records and display them, but if told to use the $formtitle information it says empty (sub) expression from REGEXP. Any help is appreciated! Thanks! Nate - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Fwd: Re: FULLTEXT exact match queries?
Hi! I built my database and then used the command: ALTER TABLE disc ADD FULLTEXT (title,recentdata,specialsound,uniqueid) But if I try to search with this command: SELECT title, recentdata, specialsound,uniqueid FROM disc WHERE MATCH (title) AGAINST ('Superman') ORDER BY ID; I get the following error: Error 1191: Can't find FULLTEXT index matching the column list. What am I doing wrong? I think I'm missing something in my ALTER TABLE statement but I'm not sure. I haven't found any examples on the web for what I need. TIA! Nate - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php