|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Sessions and numbers
Hi there,
I am relatively new at this so bear with me. Without providing all the code... I have an enquiries form which connects to an ASP page. The form data is inserted into my database (works fine). I have stored the data from the form in sessions and then want to write the data to the page to show the user what they have entered (I know I could just use response.write(Session=("EnqFirstname") etc, but it is for an assignmnent and I want to show that the data has gone into the data base and is being drawn out again. OK so my only problem is the phone number won't work because it is designated as a number... Everything else works wonderfully! I have tried many methods of single and double quote marks but can't get it right (code below). This is the error I am getting: Error Type: Microsoft VBScript compilation (0x800A0401) Expected end of statement /assignment2/enqresult.asp, line 56, column 33 "EnqPhone = "&Session("enqPhone")" AND "&_ --------------------------------^ Any ideas? SQLdata = "SELECT * from Enquiries WHERE "&_ "EnqFirstname = '"&Session("enqFirstname")&"' AND "&_ "EnqSurname = '"&Session("enqSurname")&"' AND "&_ "EnqEmail = '"&Session("enqEmail")&"' AND "&_ "EnqPhone = "&Session("enqPhone")" AND "&_ "EnqCountry = '"&Session("enqCountry")&"' AND "&_ "EnqMethod = '"&Session("enqMethod")&"' AND "&_ "Enquiry = '"&Session("Enquiry")&"'" |
|
#2
|
|||
|
|||
|
Don't worry, I think I found my problem!! Always the way.
|
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > Sessions and numbers |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|