currently we query our MySQL database for a cellphone #
(stored in users/cellphone) and set the value of a variable (phone)
dim phone
dim toUser
dim fromUser
fromUser = getRecordset(“select firstName from Users where idUser=” & session(“idUser”))(“firstName”)
toUser = getRecordset(“select firstName from Users where idUser=” & idUser)(“firstName”) phone = getRecordset(“select cellphone from Users where idUser=” & idUser)(“cellphone”)
I would like the dim phone
to be set to TWO numbers from the DB in the format [“cellphone”,“phone”]
I can’t seem to get the query select to return the two fields (and then separate them with a comma).
ugh…
realized I was working with an ASP page that does the MySQL query and then passes the results to an external PHP script. Here’s how I solved it.
[INDENT]dim cellphone
dim homephone
cellphone = getRecordset(“select cellphone from Users where idUser=” & idUser)(“cellphone”)
homephone = getRecordset(“select homephone from Users where idUser=” & idUser)(“homephone”)
Response.Redirect(“SendSMS.php?no=”&cellphone&“,”&homephone [/INDENT]Not as elegant as a concatenation, but it works.
The website and most of its functions were written in ASP. This part of what we are doing is an add-on to a [classic] asp form submit page that calls an exisitng classic asp function which saves some data to the DB and then runs a query on the DB and sends an email…
With this PHP script we are adding the ability to also send an SMS txt msg.
Long term, we’ll convert the entire site and all of it’s functions to PHP… but for now, all we want to do is add the SMS functionality.
(All of this would have been unnecessary if people under 30 would have stuck with email instead of using FB messaging and texting!! hehe)