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
Did you know?Explore Trending and Topic pages for more stories like this.
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

Add weeks in a query?
I have a SQL that summarizes the quantity per week. The weeks that has no value does not exist in th

cPanel API
Hi Guys,

Need a little guidance. I'm trying to get my script to communicate with cPanel (or W

Generate multilayered array from string.
ok so i have a string that looks like this:
Code: blog:edit_all,delete_all|users:edit_all,delete_

[function.file]: failed to open stream: No such file or directory
Okay I wrote this little script to upload a csv file that is located on my webhosts server to a mysq

Remove letter from numeric textbox
I have a textbox that will search the employee database by entering in the employee ID and it will r

Multiple upload and Resize
I would like some help on my script I have the for my index.php

////

<html&

Array to string conversion
Can anyone help me with this?

Notice: Array to string conversion in /home/..../index.php on l

Best way to cross matching large datasets
Hi,

Im running a script where am I cross matching about 200 000 data sets with each other. Ea

Does design fit in FPGA ?
Hi all,

I've made a large HCC-Design. Because of the program-size the compile process with th

Calling a Procedure with IN & OUT Parameters
Hello,

I usually call my procedures using the following way

declare variable e

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