Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Having issues with my website when I click submit on form...?

Status
Not open for further replies.

NiNjA243

Programmer
Mar 6, 2001
6
US
If you were on the mini app part of the site and clicked on the submit to send the info you would go through the script..it saves the info into the SQL 6.5 database and then when it is suppose to email Apply@cool.com with the formated info it gives the error and when you click on the script it after the error result it gives you a mail connection error written in the error trapping which is in the code below....? Can someone help me on this...Could it be my SMTP setup or something else...because it does save the info in the database and it just messes up on the mail send...Thank you ~NiNjA~



dbConnect("yes"); theMess = ""; if (isThere(request.jobName)) { theMess = "\nJob Title: " + request.jobName; } database.beginTransaction(); sql = "insert into applications(lastname,firstname,addr1,addr2,city,state,zipcode," + "phone,email,comments,workType,username,password) Values ('" + jobFix(request.lastName)+ "', '" +jobFix(request.firstName)+ "', '" + jobFix(request.addr1)+ "', '" +jobFix(request.addr2)+ "', '" + jobFix(request.city)+ "', '" +jobFix(request.state)+ "', '" + jobFix(request.zipCode)+ "', '" +jobFix(request.phone)+ "', '" + request.email+ "', '" +jobFix(request.comments)+ "', " + request.workType+ ", '', '') " dbError = database.execute(sql); if(isThere(request.jobChoice)) { sql = "select appID from applications where lastname='" +jobFix(request.lastName)+ "' " + "and firstname='" +jobFix(request.firstName)+ "' order by appID desc"; curs = database.cursor(sql); if (curs.next()) { sql = "insert into applications_jobs(appNum,jobNum,workFair) Values (" + curs.appID+ ", '" +request.jobChoice; if (request.source=="Work Fair") { sql += "', 'Yes')"; } else { sql += "', 'No')"; } curs.close(); dbError += database.execute(sql); } else { curs.close(); } theMess += "\nJob Number: " + request.jobChoice; } if (dbError) { database.rollbackTransaction(); } else { database.commitTransaction(); } theMess += "\nLast Name: " + request.lastName + "\nFirst Name: " + request.firstName + "\nAddress: " + request.addr1 +" "+ request.addr2 + "\nCity: " + request.city + "\nState: " + request.state + "\nZip Code: " + request.zipCode + "\nPhone: " + request.phone + "\nEmail: " + request.email + "\nComments: " + request.comments; msg = new SendMail(); msg.To = "apply@cool.com"; msg.From = request.email; msg.Subject = request.source + " Submission"; msg.Body = theMess; if (!msg.send()) { write('ERROR
'); write('\n
The data could not be submitted due to an unforeseen error.'); write('\n
Please check everything and try again.'); write('\n '); } else { write('\n
Thank you for submitting your information.
A representative will contact you soon.'); } dbDisconnect();
 
Boy, I tell ya -- if I wanted someone to answer a question for me, then I would format my code better. Looks like you are trying to make it difficult for us...

Just a thought. But I'm surprised I'm even responding to this one. ;-)

 
Sorry about that just that it has landed in my lap and it is a real mess just wanted to show the whole script, so it shows all of the steps...and I also posted it in the HTML/CSS forum...Must be a Wednesday...;-)
 
All set it was not the code at all the problem resides in the exchange server...Thank you all that look into the issue...~NiNjA~
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top