justaleaf Posted April 6, 2007 Share Posted April 6, 2007 Was hoping someone here could help me (seems pretty dead at platon.sk). I just used phpMyEdit to generate a simple php form for one of my tables so I can browse/edit/view the entries there. I want to link someone else to it, but only link them to a specific entry. I tried "http://myurl.com/phpfolder/my_form.php?qf2=NAME" to specify the column I wanted to use for the filter, but nothing happens when I do this. I'm a beginner with both php and phpMyEdit, so I'm just looking for a simple implementation. Any help would be greatly appreciated! -Garrett Quote Link to comment https://forums.phpfreaks.com/topic/45948-phpmyedit-question-url-form-filter-from-another-page/ Share on other sites More sharing options...
AndyB Posted April 8, 2007 Share Posted April 8, 2007 Looking over some generated code, I notice this: /* Table-level filter capability. If set, it is included in the WHERE clause of any generated SELECT statement in SQL query. This gives you ability to work only with subset of data from table. $opts['filters'] = "column1 like '%11%' AND column2<17"; $opts['filters'] = "section_id = 9"; $opts['filters'] = "Table0.sessions_count > 200"; */ Without testing it, I'd say that if you added the $opts['filters'] declaration to provide the field name and value for the row you want to display AND a method of abstracting the passed variables that would achieve what you want. If that's logical, then you need to have a link url that passes two parameters ... /my_form/php?colname=animal&colvalue=wombat. The obvious downside is that a URL like that exposes your data to other uses. It might be better to create a duplicate of the original phpMyEdit file (my_form.php), hard code the $opts['filter'], and rename the file to allow a user access to only that version. Quote Link to comment https://forums.phpfreaks.com/topic/45948-phpmyedit-question-url-form-filter-from-another-page/#findComment-224097 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.