Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Programming/Scripts

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 12th September 2009, 10:26
flameproof flameproof is offline
Member
 
Join Date: Dec 2008
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Default MySQL: Getting data via a form

I have a simple static mysql DB and I like to display filtered data, so that a user can filter for certain data.

When I write the php like that I get the desired result:

Code:
$query="SELECT * FROM ccl WHERE thick >= 1 AND thick <= 2 ORDER BY thick, width ASC";

However, I like the use to input min/max numbers via a form. How can I do that?

Any link to a page that explains simple php form handling is appreciated too.
__________________
CentOS 5.2 - Apache 2.2.3 - MySQL 5.0.45 - php 5.1.6 - Postfix 2.3.3
Reply With Quote
Sponsored Links
  #2  
Old 13th September 2009, 16:50
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

If the form uses action="GET", then the values of the form are in the $_GET array; if you use action="POST", the values are in the $_POST array.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 14th September 2009, 03:44
flameproof flameproof is offline
Member
 
Join Date: Dec 2008
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Quote:
Originally Posted by falko View Post
If the form uses action="GET", then the values of the form are in the $_GET array; if you use action="POST", the values are in the $_POST array.
Thanks for the hint.

In the meantime I played a lot around the script. I found 2 nice freeware tools which I like to share, at least for those with limited php knowledge:

phpFormGenerator
http://phpformgen.sourceforge.net/

This one creates php forms online. But that's only for input forms, or to create forms, not to search or browse them.

PHP Generator for MySQL
http://www.sqlmaestro.com/products/mysql/phpgenerator/ (not free, but 30 days full function trial)

This finally can do everything. I guess this output I can change to what I actually want.
__________________
CentOS 5.2 - Apache 2.2.3 - MySQL 5.0.45 - php 5.1.6 - Postfix 2.3.3

Last edited by flameproof; 16th September 2009 at 04:12.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Management/system config/settings & /server/settings not working!! dactor Installation/Configuration 9 6th February 2008 09:11
Help with Bluetooth PAND josto HOWTO-Related Questions 1 7th August 2007 20:53
mysql clustering problem : cannot create table in database prince.fer Server Operation 2 16th April 2007 17:03
Messed up ISPConfig-2.2.8 Upgrade Morons Installation/Configuration 4 29th November 2006 12:17
Mandriva 10.2 Perfect Setup Install Problems... ctroyp Installation/Configuration 12 30th December 2005 16:04


All times are GMT +2. The time now is 20:14.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.