473,396 Members | 2,098 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

echoing mysql result

Hey everyone. I have a simple form with three fields, when the user
submits, I want the php to echo under the form the results in my sql
table that match the three fields in the form. I'm tried to use
variables similar to:

$typeinform="document.myform.mytype.value";
$typeinals="document.myform.myals.value";
$typeinfdoi="document.myform.myfdoi.value";

$myQuantity = mysql_query("SELECT * FROM totals WHERE type =
'$typeinform'
AND als = '$typeinals'
AND fdoi = '$typeinfdoi'

I'm basically trying to figure out how to get the php to echo that
result in my page after the user submits. I've tried this...
<<<FORM>>>>
<?php
echo $myQuantity;
?>

It doesn't return anything though, any ideas?
Jun 2 '08 #1
3 1118
Brian Spotts escribió:
Hey everyone. I have a simple form with three fields, when the user
submits, I want the php to echo under the form the results in my sql
table that match the three fields in the form. I'm tried to use
variables similar to:
[...]
<<<FORM>>>>
<?php
echo $myQuantity;
?>

It doesn't return anything though, any ideas?
The tutorial in the PHP manual can give a general idea of how form
handling works:

http://es2.php.net/manual/en/tutorial.forms.php

Hint: $_GET and $_POST

Also, document.myform.mytype.value is client-side JavaScript. PHP is a
server-side language.
--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://bits.demogracia.com
-- Mi web de humor al baño María: http://www.demogracia.com
--
Jun 2 '08 #2
On May 12, 12:06 pm, "Álvaro G. Vicario"
<alvaroNOSPAMTHA...@demogracia.comwrote:
Brian Spotts escribió:
Hey everyone. I have a simple form with three fields, when the user
submits, I want the php to echo under the form the results in my sql
table that match the three fields in the form. I'm tried to use
variables similar to:
[...]
<<<FORM>>>>
<?php
echo $myQuantity;
?>
It doesn't return anything though, any ideas?

The tutorial in the PHP manual can give a general idea of how form
handling works:

http://es2.php.net/manual/en/tutorial.forms.php

Hint: $_GET and $_POST

Also, document.myform.mytype.value is client-side JavaScript. PHP is a
server-side language.

--
--http://alvaro.es- Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web:http://bits.demogracia.com
-- Mi web de humor al baño María:http://www.demogracia.com
--
ok thanks very much! I knew I got turned around somewhere! Learning
Javascript, php, and mysql all withing about 2 months of each other
probably wasn't the best idea!
Jun 2 '08 #3
Brian Spotts wrote:
On May 12, 12:06 pm, "Álvaro G. Vicario"
<alvaroNOSPAMTHA...@demogracia.comwrote:
>Brian Spotts escribió:
>>Hey everyone. I have a simple form with three fields, when the user
submits, I want the php to echo under the form the results in my sql
table that match the three fields in the form. I'm tried to use
variables similar to:
[...]
>><<<FORM>>>>
<?php
echo $myQuantity;
?>
It doesn't return anything though, any ideas?
The tutorial in the PHP manual can give a general idea of how form
handling works:

http://es2.php.net/manual/en/tutorial.forms.php

Hint: $_GET and $_POST

Also, document.myform.mytype.value is client-side JavaScript. PHP is a
server-side language.

--
--http://alvaro.es- Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web:http://bits.demogracia.com
-- Mi web de humor al baño María:http://www.demogracia.com
--

ok thanks very much! I knew I got turned around somewhere! Learning
Javascript, php, and mysql all withing about 2 months of each other
probably wasn't the best idea!
Welcome to the grey hair club ;-)
Jun 2 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: TheKeith | last post by:
I'm just learning php and set up a sample mysql db to practice with. I have the following script and cannot for the life of me figure out why it is printing each field of the row twice? I checked...
8
by: William Drew | last post by:
REQUEST FOR DISCUSSION (RFD) unmoderated group comp.databases.mysql This is an invitation to discuss the following proposal to create newsgroup comp.databases.mysql. Please note that YOU...
4
by: Ben | last post by:
Hi I am new to C++ and I want to know if C++ is suitable for making a GUI application with a MySQL database. I also want to know what keywords in books I should look for. Is DATA STRUCTURES a...
4
by: Ka | last post by:
I install a mysql server in default installation with latin charset, but I want to use GBK(a chinese charset), so that I can store and search chinese words directly. so, I download, unpack and...
4
by: James E Koehler | last post by:
I can't get the WHILE statement to work in MySQL. The version of MySQL that I am using is: Ver 12.16 Distrib 4.0.6-gamma, for Win95/Win98 (i32) running on Windows MX. Here is the relevant...
0
by: IamtheEvster | last post by:
Hi All, I am currently using PHP 5 and MySQL 5, both on Fedora Core 5. I am unable to call a MySQL stored procedure that returns output parameters using mysql, mysqli, or PDO. I'm having a...
1
by: paulq182 | last post by:
PLEASE HELP ME WITH MY CODE?? import java.sql.*; import java.io.*; class min_filmdb_rel_mysql { public static void main (String args ) throws SQLException, IOException {
221
Atli
by: Atli | last post by:
You may be wondering why you would want to put your files “into” the database, rather than just onto the file-system. Well, most of the time, you wouldn’t. In situations where your PHP application...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.