Register
Login
Contribute
Subscribe
RSS
News
FAQForge
ISPConfig
Subscribe
Contribute
Forums
Howtos
Navigation
Howtos
Linux
Android
CentOS
Debian
Fedora
Kernel
Mandriva
PCLinuxOS
SuSE
Ubuntu
Web Server
Apache
Cherokee
Lighttpd
nginx
Backup
Control Panels
ISPConfig
DNS
BIND
MyDNS
PowerDNS
djbdns
Desktop
Email
Anti-Spam/Virus
Postfix
FTP
High-Availability
Lighttpd
Monitoring
MySQL
Programming
C/C++
PHP
Samba
Security
Anti-Spam/Virus
Storage
Virtualization
KVM
OpenVZ
VMware
VirtualBox
Xen
Other
FreeBSD
Commercial
Mini-Howtos
Linux
Apache
Backup
DNS
Errors
FTP
MySQL
Networking
PHP
Postfix
Security
Sendmail
Shell
Other
ISPConfig
Forums
Contribute
Create Content
Subscription
Login
Site Map/RSS Feeds
Facebook
News
Installation tutorial of XenApp 6.5(Citrix Server) Step by Step
Linpus Lite 1.9 review
Rise of the Ravager released, Interview and Free Keys!
Amazon expands Appstore reach, gives devs more user data
Latest Tizen sightings: Samsung phone, Intel laptop demo
Microsoft Snoops In Skype, Dissed By HP & More
It Seems I Won't Be Writing For Linux Advocates After All
Going All the Way: GPL’ing Our Theme
Zend Framework 2 Tool (ZFTool) Introduction
Hands On Embedded Linux Development Training course.
more
Recent comments
How to restart icecast
20 hours 23 min ago
Dovecot mysql missing
1 day 1 hour ago
Re: Typo in your sources.list
1 day 5 hours ago
how to configure?
1 day 7 hours ago
Re: Installation successful, but I can't receive any mail...
1 day 21 hours ago
ssl
1 day 21 hours ago
No Mails could be send.... Connection refused
2 days 2 hours ago
array param function
2 days 9 hours ago
Thank you so much. 2 thumbs
2 days 10 hours ago
Great post... But...
2 days 11 hours ago
Newsletter
Subscribe to HowtoForge Newsletter
and stay informed about our latest HOWTOs and projects.
(To unsubscribe from our newsletter, visit this
link
.)
English
|
Deutsch
|
Site Map/RSS Feeds
|
Advertise
HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials
>
Linux Forums
>
Programming/Scripts
MySQL: Getting data via a form
User Name
Remember Me?
Password
Register
FAQ
Members List
Social Groups
Calendar
Search
Today's Posts
Mark Forums Read
Do you like HowtoForge? Please consider supporting us by
becoming a subscriber
.
Thread Tools
Display Modes
#
1
12th September 2009, 10:26
flameproof
Member
Join Date: Dec 2008
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
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
flameproof
View Public Profile
Send a private message to flameproof
Find all posts by flameproof
Sponsored Links
#
2
13th September 2009, 16:50
falko
Super Moderator
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,595 Times in 2,446 Posts
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:
falko
View Public Profile
Send a private message to falko
Visit falko's homepage!
Find all posts by falko
#
3
14th September 2009, 03:44
flameproof
Member
Join Date: Dec 2008
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by
falko
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
.
flameproof
View Public Profile
Send a private message to flameproof
Find all posts by flameproof
Bookmarks
Digg
del.icio.us
StumbleUpon
Google
«
Previous Thread
|
Next Thread
»
Thread Tools
Show Printable Version
Email this Page
Display Modes
Linear Mode
Switch to Hybrid Mode
Switch to Threaded Mode
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 Rules
Forum Jump
User Control Panel
Private Messages
Subscriptions
Who's Online
Search Forums
Forums Home
Linux Forums
HOWTO-Related Questions
Installation/Configuration
Server Operation
Desktop Operation
Kernel Questions
Programming/Scripts
Technical
Suggest HOWTO
ISPConfig 3
General
Installation/Configuration
ISPConfig 3 Priority Support
Plugins/Modules/Addons
Tips/Tricks/Mods
Feature Requests
Developers' Forum
ISPConfig 2
General
Installation/Configuration
Tips/Tricks/Mods
Feature Requests
Developers' Forum
MyDNSConfig
General
Other Forums
Smalltalk
Forum Suggestions
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
21:45
.
Contact Us
-
HowtoForge - Linux Howtos and Tutorials
-
Archive
-
Top
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Recent comments
20 hours 23 min ago
1 day 1 hour ago
1 day 5 hours ago
1 day 7 hours ago
1 day 21 hours ago
1 day 21 hours ago
2 days 2 hours ago
2 days 9 hours ago
2 days 10 hours ago
2 days 11 hours ago