I need data from a MySQL database. But not display it.
I am trying to store some information before it is displayed.
I know how to display variables (ie. do a MySQL query and then echo the variables).
But how do I store the value on the page? Some I do not want to display (it is for a basket and I do not not want to display the customer email address but I do need to pass it to the card processing company).
So how do I just get, store or save the variable on the page rather than echo it?
If it’s on the page, you’re echoing it… the only way to send information to the page is as content in the html… if it’s not something that should be sent client side, you shouldn’t be passing it in the page.
Well, there are cookies and sessions – I’d not use the former for something like a credit card number as that’s passed in the clear – session data isn’t passed client side, just the hash to tell the server what session it is… so that’s better.
Really though, it sounds like you’re either overthinking things or sending information client side that has no business client-side.
well - if a customer has just entered their email address when they get to the next page it will store it in the MySQL table, I DO NOT want to display it. But I do need to pass it to the card processing company. So I need to save/request it but not echo it. I need to request it from the MySQL Database. But I do not want to display it.
I have a silly question, how does the credit card company in question say they want to receive it? I’d assume either as getData, postData, or as content in the request…
Well a page on our server asks for the customers name, email, address, telephone number, etc.
Then on the next page (again on our server) it will save the data to a MySQL table!
Then on the next page it will GO TO THE PAYMENT COMPANY’S SERVER and they want all the info from us (name, email, address, telephone number, etc.) I do not want to display this information BUT I NEED TO SEND IT TO THEM - I plan to request the info but not display it - then i can send it to the processing company!
How do THEY want to receive that information remains the question! You’re still not saying that… There’s only three ways of passing data – one of which stuffs it in the URL, one involves faking a form request and the third being to send them output… which means echo and/or it’s equivalents – that markup would NOT be sent to the client and SHOULD be sent via HTTPS.