Passing vars to the DB


Posted on 16th Feb 2014 07:03 pm by admin

I have 3 small testing tables:

ID TYPE
1 pepperoni
2 C. bacon
3 taco

ID TYPE
1 small
2 med
3 large

ID TYPE
1 bud
2 hef
3 mil best
4 7up
5 orange
6 coke

Each one is a select menu. How would I pass these as variables
to the MySql database with one submit button?

I could order a small pepperoni and a coke, or a large pepperoni and a coke or a bud.

How do I handle all these possibilities 1) on the php end and 2) in the sql statement?
This is part of something I have done before from just one table:
Code: $UserArr = chk_lgn($_POST['logname'],$_POST['passwd']);

$sql = "SELECT UserId ,logname FROM tblPass WHERE logname = '$lname' AND passwd = '$pass' ";

These are just general questions of concept/how to proceed. I have tried to make my question
as clear as I can, I hope I succeeded.
Thanks AL123

No comments posted yet

Your Answer:

Login to answer
141 Like 17 Dislike
Previous forums Next forums
Other forums

Regarding accessing SQL query issued by any user in Oracle 10g
Hi all,
i want to know the queries issued by various users accessing a database...

Why will this program not run if the variables are not global?
Hey guys I have a kind of perplexing situation that is probably simple, but I can't seem to understa

Login Script Issues
I am using a script I got from http://phpsense.com/php/php-login-script.html in order to allow peopl

News script
Hi ...

I am not sure if this is the rite place to post this but if its not sorry

i am

Trying to add functions to table
I have this list of characters and I'm trying to figure out what I have to do to put the results of

for loop without same $i digits?
Hi,

Can some guru please advise how can I accomplish this with a simple for loop ?

I

server trace logs
could any one tell me from where do i get error logs in xMII??I want to check the reason for dtabase

Converting from one format to another
"I have got a date in DD/MM/YYYY but I need it in MM-DD-YYYY. Help!"

PHP url branch??
Functionally, using PHP, I'm doing a test of login input submitted by a user via an html form in a f

simplexml and xpath - Need some help
Hello,

I am trying to parse an xml which comes back from Amazon and I am trying to know how m

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash