I wrote an ASP prgram to insert a row into a MySQL database using data from a form. It works just fine, however is there a way to check a return code and trap any error that may occur (duplicate row error for example) so I can format and display a message in the browser instead of having the error just show up?
I've been looking in my ASP & MySQL books and searching on the web but can't find anything that sounds like what I want to do.
I have a form that collects the date and time of an event. I create a string to hold all of the data in the correct format for MySQL and it (the string) looks like this...
2007-03-03 17:30:00
I am then using CDate to convert the string to a DateTime type.
and since I am in the US it gets converted like this...
3/3/2007 5:30:00 PM
per my regional system settings...
I grabbed this code from the forums here which I have used before... Code:
1 to insert a record a record into a mysql database-table. 1 that reads the database-table and displays the records.
When I call them in seperate browser-windows, everything works fine. The problem rises when I use a menu-page and call the pages in an IFrame in the same browserwindow.
The newly added records from the form-frame, do not show up when I call the display frame.
I have to close my browser and reopen it to see the new records. There are no error-messages given. Code:
I am storing dates in a mySql database in the format yyyy-mm-dd. Now, I have set up so that this field is insert by a form.
It isn't very user friendly to have to type yyyy-mm-dd, how can I set up so that the user can enter format dd/mm/yyyy and it will automatically insert into the database as yyyy-mm-dd? I am using Dreamweaver MX 2004 and ASP.
I have a page called Closer.asp where the closer fills the details and hits submit.After he hits submit an email goes to him with all the details he has filled. Also it takes him to the next page where i want to display his all details properly . How should i get all his details and display on the next page.I tried Request.Querystring but all the date is getting displayed in one line and i want it to be in more formatted look.
Is this right? I'm trying to email the username and password fields to the user once he/she has signed up. this doesn't seem to work- it seems to take issue with the first line for some reason. Is there another way to return email?
Set Mail=Server.CreateObject("CDONTS.NewMail") Mail.To=Response.Write(Email) Mail.From="testing-my@SP-Script.com" Mail.Subject="Welcome to MEDIADDICT!" Mail.Body="Welcome to MEDIADDICT. Your Username is: " + Response.Write(UserID) + " and your Password is: " + Response.Write(Password) + "."
I'm trying to pull information entered from a form that uses a standard formmail.asp script to generate an email to a specified recipient. That part of the form works just fine and all the fields show up properly in the email.
I'm trying to figure out how to place the form fields into a confirmation/thank you page. I've inserted <% Request.Form("name") %> into the Confirmation Page hoping that it would display: "Thank you <name> for completing the form," but of course it doesn't display the <name>. I think it is because my confirmation page has no way of calling to the actual form field entries but I'm so new to asp that I do not know how or if this is the issue.
does anyone know how to confirm verisign csc (security number) ? currently i have a site that sends this information to verisign but I dont know how to confirm it so if someone puts a wrong number, after the JS validation, it is still going to take that number.
When the customer orders the item and completes the transaction I would like to send them and the retailer an email confirmation. Here is my problem, I would like to send the confirmation mainly in HTML format.
However, I also realize that some email programs do notaccept HTML format and in that case I would like to send it in TEXT format, how do I let the ordering system make the automated choice without the user selecting it?
I see that when I order things online, some of those stores will send a HTML cofirmation without me selection the format (newegg, amazon etc...), how is that done?
I have a small shop on my web site and you order the products via a simple form. As an owner of the site, I want the order confirmations to be emailed to three email addresses, two adresses of mine plus one email to the person whoplaced the order. I donīt know how to fix this in the code though and that is my problem.
I can easily arrange for two of the addresses to get emails via the objMail.To command, so itīs when I try to add the buyers email that it gets weird.
That email address, Iīm getting through the form and the name tag "Emailaddress".
I tried to use the commands objMail.Cc and objMail.Bcc, but nothing happend and then I still only got emails sent to the addresses that I put in at the line objMail.To. Below is as far as I have gotten. If I put the three addresses like that and separate with a "&", I got all three email addresses right, but no space between them. So do you have any ideas on what character to use, to split these three addresses so that an email can be sent to all of them? Code:
Does anybody knows is there any kind of asp mail script (CDO prefered) that will, when i send newsletter, send back to me confirmation from server that email has arrive?
Next objEmail.SendMail If Err.Number <> 0 Then Response.Write "The following error occurred: " & Err.Description Else Response.Write "A quotation request has successfully been sent, thank you." End If
The thing is that the confirmation page looks so dull with just a line of text at the top. I want to add my logo and other things.
Can I just start using html or can I direct to another confirmation page?
I need to know how i can set up a form submitted, that will link to a confirmation page on my website, rather than showing results of what the user filled out... this is bugging me so much....
Most sites just don't complete the registration process until the email sent has been clicked, sending confirmation of the email. how to Add auto email confirmation after people have registered, so when people have registrated, an email should be sent to their email account while another email be sent to xyz@xyzcompany.com
And in the email sent to people who just registrated, i need to provide a link for them to click to activate their account.
I have a Frontpage-ASP form that allows users to add their names to a database and indicate their interests for a newsletter that I do. I want to send a confirmation email from my system account when they submit the form. I don't want to use their SMTP because I also want to see what bounces from the address submitted. Frontpage does not allow sending to email and to a database at the same time.
I have made a booking system, but need to somehow generate a unique confirmation code to be sent to the bookee to confirm the booking. I hve done a basic Google search, and a search through the archives of the forum, but to no avail.
I'm using CDO mail in my asp scripts, and I need to find a script that whereas a user signs up for your website.
when he hits submit,an email goes to his email box with a confirmation link for him to click so to ensure he has a valid email address. Does anyone know of a package or series of scripts that works with this?
tell me in a ZIP or upload the code to a simple system that:
uses an access database and: Allows someone to signup. Get a confirmation email Login And for them to be able to change their password from a page.If it is possible could you please make it so that it says "you are logged in as" and gets something form the access database like their email address or username.
This is just so that I can see how to link all of the code and learn some of the language so I can help people in the future. This code that hopefully will be provided wont be sold given away or used commercially.
I am passing variables around from page to page using the following:
../new.asp?Info=stuff&name=Fred
then re-capturing it with:
<% 'Get the users info passed from the previous page strUserInfo = Request.QueryString("info") %> strUserName = Request.QueryString("name") %>
I use that info to personalize pages:
Hello <% strUserName %>, glad you are back to work on your <% info %>.
This works great for pages/forms that only update a record or display the strings, but the problem I'm having is with a form that creates a brand new record using the passed data.
I use hidden inputs into the new record so that the user does not have to re-enter it but when they hit submit Front Page posts a confirmation page with a link to return to the same form. I need to change that link but cannot figure out where the confirmation page is generated.
I have a form where the visitor should enter the e-mail adress, a password and some additional info. When the form is submitted I want to automatically send a confirmation e-mail to the visitor, containing the information from the form (like the procedure when joining this forum :-)). Is it possible to achieve that with ASP? Would be very grateful if anybody can finish the code below... because I don't know how to handle the variables after I have retrieved the form info..
I have a form where a visitor can enter som information, in this case the e-mail adress, password and some additional info. As soon as the form is submitted I want to send an automatically generated e-mail confirmation to that user's e-mailadress (like the procedure when joining this forum for the first time). When I have retrieved the info from the form in the "confirm.asp" I don't know what to do....
Our website is currently developed in ASP/Mysql 4. The dedicated servers on which it is currently hosted arrive at saturation. Here is their configuration: - 1 server PIV 2,8Ghz 1GB RAM with IIS 5 on Windows 2000 - 1 server Bi-xeon 3Ghz, 512 MB with MySQL 4 on Windows 2003 The website makes approximately 10.000.000 of pages seen and 310.000 visits each month (given by an external statistics tool), increasing by 10% each month. The database is approximately 60 MB. I made, I think, most of the optimizations on the database (cache, indexes...). According to our current web hoster, this saturation is due to a bad management of connections between ASP and MySQL and recommends to us: 1/ to put the site on Windows 2003/IIS 6. 2/ to change our database from MySQL to SQL Server. 3/ to change our PIV to a second Bi-xeon.
er...i dont know if this belongs in here, so apologies if it shouldnt...
Im working on a programme in VB6 that allows people to add news to my site. I was just wondering how can you connect to MySQL with VB and how can you add records
i need to compare against the database if the user input the correct username and password otherwise to send the user to another page.. but still lets sign in even if the username and password does not match.. here's an example of my code:
I was having trouble with access because it was far too slow and the site kept crashing as too many people were accessing the database at the same time (servers errors because of the lock file kept cropping up).
So, I converted the Access Database to mySQL, used the connection string:
I am trying to create a website in ASP with a database back-end.
I am ok when using MS Access, but I have recently read articles saying that Access is no good for dealing with multiple users accessing it at the same time, so I am worried that it will not be able to cope.
As an alternative, I am looking at MySQL.
I am completely new to MySQL, and even installing it seemed complex. I have installed it to the directory C:mysql, and using 'mysql front' I have managed to create a database with a few tables.The database is in the 'data' subdirectory along with the mysql database. Code: