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

Customizing message/behavior
Hi,I'm using the ASP.NET membership/authorization controls in my application. Some parts of my appli

mod_rewrite.c on windows ??
why it's not working on windows while it's working on other hosts???

this is the code i got

Got A Free Server :(
So I was given a free server

http://shopping.yahoo.com/p:Compaq%20ProLiant%201500%20Server:1

Images outside webroot
Im hopeing someone can help me with this because i cant figure it out.I have setup an ASP.NET websit

Needing Youtube thumb nail fix.
I have a script on a site that pulls in you-tube videos,
The problem is, that the thumb nails for

Code Help.. If txt input box empty search X instead..
I am having a problem with my search script. At current it will simply search by a selected date whi

explode() function problem maybe
Hi I'm having trouble searching my database. When I type two words in the search field it only searc

Can't get the unicode character
I'm trying to get some text from various parts of a file. I have converted the file to hex (bin2hex)

Amatuer requiring assistance
Beginner and amateur in need of assistance

My Site - (Spare Parts for Domestic Appliances)

convert static html data into dynamic
hi all

i need to convert a website which has static above 2000 articles into dynamic and add

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