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

BSP Ext - tableView - Sort - NEWBIE
Hi,
I have been trying to get the sort to work. I have defined the column definitions by fillin

Apple's revamped lineup arrives

I'm personally curious about the magic mouse.. a multi-touch concept sounds like it could be nea

mail() problem
Hi Guys,

I've set up a contact email form. It sends the information fine, but it sends it to

PHP Captcha Error help - replace the "die" command
Hi All,

I am after a bit of help with a Captcha spam protection box.

The site gave me

timezone change with date()
so i put all my times for posts in my made from scratch forum(not phpbb3 or sm)
in my mysql db u

update sql when refresh - php
hi
I have made a table (attachement)

the users can update the sql database using + or x bu

help connecting a form to php and then emailing the form
Ok. So, I made a form, and I need help to where when submitted, I get an email with the submitted de

PHP form authentication
Hi guys,

what am trying to achieve is this: Whenever a user tries to login to my website, an

making web pages for accounts
Hello, I would like to make pages for accounts on my website im making (its not a real website..im j

Removing Title From database problem
Hi again ! i am having an issue with updating database. When i update any price of a title it remove

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