Processing multiple inputs from form into MySQL database

Hello, I’m currently working on a credit card processing app (web-based) for a school project. Issue is, I can’t seem to get it to process all the inputs and then compare them to values within a table of preset information. If I have it process the card number and match it against the database, it works. If I do the same with the CVV, it works. If I have it process them together, it pukes and dies. Am I just not formatting my SQL statements correctly? I’m not great at programming so I’ve probably got some serious spaghetti code, but if anyone could troubleshoot that’d be awesome.

The code is here: http://pastebin.com/iwSu9ZjE
I can attach the database or anything else needed, the only other file in the project is the input form.

Write your query as a variable first, then you you could do an echo to make sure your SQL is what you think it is.

[php]$SQLgetCCinfo=“SELECT * FROM ccinfo WHERE ecom_payment_card_number = $ecom_payment_card_number AND ecom_payment_card_verification =
$ecom_payment_card_verification”;[/php]

Hopefully this is just a class project and you’re not storing real credit card info in a table.

Sponsor our Newsletter | Privacy Policy | Terms of Service