Help with asp jmail script

can you tell me why my script will not process? I'm new to asp and jmail. Here is my code.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@LANGUAGE = VBSCRIPT%> <html>
<body>
<%
'set Variables
Dim Subject
Dim SenderEmail
Dim Recipient
Subject = "This is my form info to you"
SenderEmail = "[email protected]"
Recipient = "[email protected]"
' Get the form data
Name       = Request.Form("Name")
Address    = Request.Form("Address")
City       = Request.Form("City")
State = Request.Form("Sate")
Zip    = Request.Form("Zip")
Email   = Request.Form("Email")
Phone        = Request.Form("Phone")
Have You Had Surgery = Request.Form("Have You Had Surgery")
'create the body case information to be emailed
Select Case ucase(Subject)
case "Newsletter"
"Name: " & Name & vbCrLf &_
"Address: " & Address & vbCrLf &_
"City: " & City & vbCrLf &_
"State: " & State & vbCrLf &_
"Zip: " & Zip & vbCrLf &_
"Email: " & Email & vbCrLf &_
"Have You Had Surgery: " & Have You Had Surgery & vbCrLf &_
end Select
' Create the JMail message Object
set msg = Server.CreateOBject( "JMail.Message" )
' Set logging to true to ease any potential debugging
' And set silent to true as we wish to handle our errors ourself
msg.Logging = true
msg.silent = true
' Enter the sender data
msg.From = SenderEmail
' Note that as addRecipient is method and not
' a property, we do not use an equals ( = ) sign
msg.AddRecipient Recipient
' The subject of the message
msg.Subject = Subject
' And the body
msg.body = Newsletter
"Name: " & Name & vbCrLf &_
"Address: " & Address & vbCrLf &_
"City: " & City & vbCrLf &_
"State: " & State & vbCrLf &_
"Zip: " & Zip & vbCrLf &_
"Email: " & Email & vbCrLf &_
"Phone: " & Phone & vbCrLf &_
"Have You Had Weight Loss Surgery: " & Have You Had Weight Loss Surgery & vbCrLf &_
' Now send the message, using the indicated mailserver
if not msg.Send("mail.trueresults.com" ) then
    Response.write "<pre>" & msg.log & "</pre>"
else
    Response.write "Message sent succesfully!"
end if
' And we're done! the message has been sent.
%>
</body>
</html>

OK, try this revised script. I have commented most of the changes and tested the script on my server to make sure it works. It wasn't clear from your code how the email body content is selected, so the following script reflects my own inference.
<%@LANGUAGE="VBSCRIPT" %>
<%
If Request("MM_Submit") <> "" Then ' If form has been submitted then process email script
    strErr = ""
    bValue = False
'set Variables   
Dim Subject, SenderEmail, Recipient, UserName, Address, City, UserState, Zip, Email, Phone, Have_You_Had_Surgery, MessageBody
Subject     = "Newsletter"
SenderEmail = "[email protected]"
Recipient     = "[email protected]"
' Get the form data
UserName    = Request.Form("UserName")
Address        = Request.Form("Address")
City           = Request.Form("City")
UserState     = Request.Form("UserState")
Zip            = Request.Form("Zip")
Email       = Request.Form("Email")
Phone       = Request.Form("Phone")
Have_You_Had_Surgery = Request.Form("Have_You_Had_Surgery")
'create the body case information to be emailed
Select Case Subject
case "Newsletter"
MessageBody = "Name: " & UserName & vbCrLf & "Address: " & Address & vbCrLf & "City: " & City & vbCrLf & "State: " & UserState & vbCrLf & "Zip: " & Zip & vbCrLf & "Email: " & Email & vbCrLf & "Have You Had Surgery: " & Have_You_Had_Surgery & vbCrLf
end Select
' Create the JMail message Object
set msg = Server.CreateOBject( "JMail.Message" )
' Set logging to true to ease any potential debugging
' And set silent to true as we wish to handle our errors ourself
msg.Logging = true
msg.silent = true
' Enter the sender data
msg.From = SenderEmail
' Enter login user name if required
msg.MailServerUserName = "[email protected]"
' Enter password if required
msg.MailServerPassword = "password"
' Note that as addRecipient is method and not
' a property, we do not use an equals ( = ) sign
msg.AddRecipient Recipient
' The subject of the message
msg.Subject = Subject
' And the body
msg.body = MessageBody
' Now send the message, using the indicated mailserver
if not msg.Send("mail.trueresults.com" ) then
    strErr= "<pre>" & msg.log & "</pre>"
else
     bValue = True
end if
' And we're done! the message has been sent.
End If ' End If Request("MM_Submit") <> ""
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html>
<head>
<style type="text/css">
<!--
label { font-weight: bold; display:block }
input[type='text'] { width: 175px}-->
</style></head>
<body>
<% If strErr <> "" Then Response.Write("<p>Error occured:" &  strErr & "</p>") End If %>
<% If bValue = True Then Response.Write("Message was sent successfully:<br> ") End If %>
<form action="" method="post">
<label>User Name: </label><input name="UserName" type="text" /><br />
<label>Address:</label><input name="Address" type="text" /><br />
<label>City:</label><input name="City" type="text" /><br />
<label>State:</label><input name="UserState" type="text" /><br />
<label>Zip:</label><input name="Zip" type="text" /><br />
<label>Email:</label><input name="Email" type="text" /><br />
<label>Phone:</label><input name="Phone" type="text" /><br />
<label>Have you had surgery?</label><input name="Have_You_Had_Surgery" type="text" /><br />
<label for="button"></label>
<input type="reset" name="MM_Reset" id="MM_Reset" value="Reset" />
<input name="MM_Submit" id="MM_Submit"type="submit" />
</form>
</body>
</html>

Similar Messages

  • [solved]Need help with a bash script for MOC conky artwork.

    I need some help with a bash script for displaying artwork from MOC.
    Music folders have a file called 'front.jpg' in them, so I need to pull the current directory from MOCP and then display the 'front.jpg' file in conky.
    mocp -Q %file
    gives me the current file playing, but I need the directory (perhaps some way to use only everything after the last  '/'?)
    A point in the right direction would be appreciated.
    thanks, d
    Last edited by dgz (2013-08-29 21:24:28)

    Xyne wrote:
    You should also quote the variables and output in double quotes to make the code robust, e.g.
    filename="$(mocp -Q %file)"
    dirname="${filename%/*}"
    cp "$dirname"/front.jpg ~/backup/art.jpg
    Without the quotes, whitespace will break the code. Even if you don't expect whitespace in any of the paths, it's still good coding practice to include the quotes imo.
    thanks for the tip.
    here it is, anyhow:
    #!/bin/bash
    filename=$(mocp -Q %file)
    dirname=${filename%/*}
    cp ${dirname}/front.jpg ~/backup/art.jpg
    then in conky:
    $alignr${execi 30 ~/bin/artc}${image ~/backup/art.jpg -s 100x100 -p -3,60}
    thanks for the help.
    Last edited by dgz (2013-08-29 21:26:32)

  • Help with Custom calculation script in Acrobat 8

    Hi all, I am using acrobat 8 on OS 10.5
    I am trying to add certain fields (numbers) and then subtract another field value to give an end result.
    I don't know anything about Javascript, would anyone be able to help with any info on how I achieve this result? I can only see Add, x and average etc... nothing there for subtraction
    Thanks for any help in advance
    Swen

    This should get you started:
    >if (event) {
    // get values from two text fields
    var a = Number(this.getField('Text1').value);
    var b = Number(this.getField('Text2').value);
    // subtract the values and show it
    this.event.target.value = a - b;
    Place this in a 3d text field, as a Custom Calculation Script.

  • Help with first Adobe Script for AE?

    Hey,
    I'm trying to create a script that will allow me to set a certain number of layer markers at an even interval to mark out a song. Could someone help me troubleshoot this script? I've been working on it for ages now, and I'm about to snap. I've basically gone from HTML and CSS, to javascript and Adobe scripting in the past few hours, and I cannot figure this out for the life of me.
    I want to create a dialog with two fields, the number of markers to place, and the tempo of the song. Tempo is pretty simple, its just the number of beats per minute. The script is meant to start at a marker that I have already placed, and set a new marker at incrementing times. Its mainly to help me see what I'm trying to animate too, even if the beat is a little hard to pick up every once in a while.
    Also, is there a better way to do this? This script will help me in the long run because I will need to do this pretty often, but I'm wondering if there was something that I could not find online that would have saved me these hours of brain-jumbling?
    Thank you very much for any help you can offer.
        // Neo_Add_MultiMarkers.jsx
        //jasondrey13
        //2009-10-26
        //Adds multiple markers to the selected layer.
        // This script prompts for a certain number of layer markers to add to the selected audio layer,
        //and an optional "frames between" to set the number of frames that should be skipped before placing the next marker
        // It presents a UI with two text entry areas: a Markers box for the
        // number of markers to add and a Frames Between box for the number of frames to space between added markers.
        // When the user clicks the Add Markers button,
        // A button labeled "?" provides a brief explanation.
        function Neo_Add_MultiMarkers(thisObj)
            // set vars
            var scriptName = "Neoarx: Add Multiple Markers";
            var numberOfMarkers = "0";
            var tempo = "0";
            // This function is called when the Find All button is clicked.
            // It changes which layers are selected by deselecting layers that are not text layers
            // or do not contain the Find Text string. Only text layers containing the Find Text string
            // will remain selected.
            function onAddMarkers()
                // Start an undo group.  By using this with an endUndoGroup(), you
                // allow users to undo the whole script with one undo operation.
                app.beginUndoGroup("Add Multiple Markers");
                // Get the active composition.
                var activeItem = app.project.activeItem;
                if (activeItem != null && (activeItem instanceof CompItem)){
                    // Check each selected layer in the active composition.
                    var activeComp = activeItem;
                    var layers = activeComp.selectedLayers;
                    var markers = layers.property("marker");
                    //parse ints
                    numberOfMarkers = parseInt (numberOfMarkers);
                    tempo = parseInt (tempo);
                    // Show a message and return if there is no value specified in the Markers box.
                    if (numberOfMarkers < 1 || tempo < 1) {
                    alert("Each box can take only positive values over 1. The selection was not changed.", scriptName);
                    return;
                    if (markers.numKeys < 1)
                    alert('Please set a marker where you would like me to begin.');
                    return;
                    var beginTime = markers.keyTime( 1 );
                    var count = 1;
                    var currentTime = beginTime;
                    var addPer = tempo/60;
                    while(numberOfMarkers < count)
                    markers.setValueAtTime(currentTime, MarkerValue(count));
                    currentTime = currentTime + addPer;
                    if (count==numberOfMarkers) {
                        alert('finished!');
                        return;
                    else{
                        count++;
                app.endUndoGroup();
        // Called when the Markers Text string is edited
            function onMarkersStringChanged()
                numberOfMarkers = this.text;
            // Called when the Frames Text string is edited
            function onFramesStringChanged()
                tempo = this.text;
            // Called when the "?" button is clicked
            function onShowHelp()
                alert(scriptName + ":\n" +
                "This script displays a palette with controls for adding a given number of markers starting at a pre-placed marker, each separated by an amount of time determined from the inputted Beats Per Minute (Tempo).\n" +
                "It is designed to mark out the even beat of a song for easier editing.\n" +
                "\n" +
                "Type the number of Markers you would like to add to the currently selected layer. Type the tempo of your song (beats per minute).\n" +           
                "\n" +
                "Note: This version of the script requires After Effects CS3 or later. It can be used as a dockable panel by placing the script in a ScriptUI Panels subfolder of the Scripts folder, and then choosing this script from the Window menu.\n", scriptName);
            // main:
            if (parseFloat(app.version) < 8)
                alert("This script requires After Effects CS3 or later.", scriptName);
                return;
            else
                // Create and show a floating palette
                var my_palette = (thisObj instanceof Panel) ? thisObj : new Window("palette", scriptName, undefined, {resizeable:true});
                if (my_palette != null)
                    var res =
                    "group { \
                        orientation:'column', alignment:['fill','fill'], alignChildren:['left','top'], spacing:5, margins:[0,0,0,0], \
                        markersRow: Group { \
                            alignment:['fill','top'], \
                            markersStr: StaticText { text:'Markers:', alignment:['left','center'] }, \
                            markersEditText: EditText { text:'0', characters:10, alignment:['fill','center'] }, \
                        FramesRow: Group { \
                            alignment:['fill','top'], \
                            FramesStr: StaticText { text:'Tempo:', alignment:['left','center'] }, \
                            FramesEditText: EditText { text:'140', characters:10, alignment:['fill','center'] }, \
                        cmds: Group { \
                            alignment:['fill','top'], \
                            addMarkersButton: Button { text:'Add Markers', alignment:['fill','center'] }, \
                            helpButton: Button { text:'?', alignment:['right','center'], preferredSize:[25,20] }, \
                    my_palette.margins = [10,10,10,10];
                    my_palette.grp = my_palette.add(res);
                    // Workaround to ensure the editext text color is black, even at darker UI brightness levels
                    var winGfx = my_palette.graphics;
                    var darkColorBrush = winGfx.newPen(winGfx.BrushType.SOLID_COLOR, [0,0,0], 1);
                    my_palette.grp.markersRow.markersEditText.graphics.foregroundColor = darkColorBrush;
                    my_palette.grp.FramesRow.FramesEditText.graphics.foregroundColor = darkColorBrush;
                    my_palette.grp.markersRow.markersStr.preferredSize.width = my_palette.grp.FramesRow.FramesStr.preferredSize.width;
                    my_palette.grp.markersRow.markersEditText.onChange = my_palette.grp.markersRow.markersEditText.onChanging = onMarkersStringChanged;
                    my_palette.grp.FramesRow.FramesEditText.onChange = my_palette.grp.FramesRow.FramesEditText.onChanging = onFramesStringChanged;
                    my_palette.grp.cmds.addMarkersButton.onClick    = onAddMarkers;
                    my_palette.grp.cmds.helpButton.onClick    = onShowHelp;
                    my_palette.layout.layout(true);
                    my_palette.layout.resize();
                    my_palette.onResizing = my_palette.onResize = function () {this.layout.resize();}
                    if (my_palette instanceof Window) {
                        my_palette.center();
                        my_palette.show();
                    } else {
                        my_palette.layout.layout(true);
                else {
                    alert("Could not open the user interface.", scriptName);
        Neo_Add_MultiMarkers(this);

    You should ask such questions over at AEnhancers. I had a quick look at your code but could not find anything obvious, so it may relate to where and when you execute certain functions and how they are nested, I just don't have the time to do a deeper study.
    Mylenium

  • Help with ASP Connections - New User

    I just set up a hosting account with 1 and 1 for a simple
    website to catalog a series of yo-yo contest that we coordinate. I
    have a simple MS Access database for organizing contest information
    that we are trying to get online.
    I am new to the application side of this and know very little
    about connection strings, DSN, etc. I am experiencing problems with
    connecting to the MS Access database that I have uploaded to the
    1and 1 servers. If I hardcode the Javascript into the page, I can
    connect and pull information but I definitely want to take
    advantage of the design interface that Dreamweaver MX 2004 offers.
    This is the code from the page that I can get working based
    on the FAQ Sheet that 1and 1 offers for database connections:
    <html>
    <title>Database query using ASP</title>
    <body bgcolor="FFFFFF">
    <h2>Query table <b>Products</b> with
    ASP</h2>
    <%
    Set dbaseConn = Server.CreateObject("ADODB.Connection")
    dbaseConn.Open "DRIVER={Microsoft Access Driver
    (*.mdb)};DBQ=" & Server.Mappath("\db\League.mdb") & ";"
    SQLQuery = "SELECT * FROM Contest_Information"
    Set RS = dbaseConn.Execute(SQLQuery)
    %>
    <%
    Do While Not RS.EOF
    %>
    <%=RS("cStartDate")%>, <%=RS("cName")%>,
    <%=RS("cWebsite")%> List
    <p>
    <%
    RS.MoveNext
    Loop
    RS.Close
    Set RS = Nothing
    dbaseConn.Close
    Set dbaseConn = Nothing
    %>
    </body>
    </html>
    If I put in a "Custom Connection String" using the previous
    code:
    "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" &
    Server.Mappath("\db\League.mdb") & ";"
    Dreamweaver can connect to the database when the connection
    is 'tested' but cannot pull any tables and therefore cannot create
    bindings.
    Guidance...help...I'm stuck...
    Thanks in advance.

    Hello Lucky.da.boss,
    And welcome to Apple Discussions!
    is asking can I or is there anyway i can transfer my music off that iPod to my touch?
    See this article for tips on how to copy music from your 5th generation iPod to your iTunes library. Once you have successfully done that, you can sync them over to your iPod Touch. There is no way to do it directly.
    http://macs.about.com/od/backupsarchives/ss/ipodcopy.htm
    Also, I have two applications that aren't downloading I want to know how to delete them.
    Tap your finger on one of them and hold it there until you see all your Apps start to wiggle. You will also see a small x in the upper right hand corner of the Apps you can delete. Go ahead and tap this to delete the App. When you are finished, hit the Home button to make the Apps stop wiggling. It might also help to have a look at your iPod's *User Guide.
    http://manuals.info.apple.com/enUS/iPod_touch_iOS4.1_UserGuide.pdf
    Can you have constant internet service or do they run solely off wi-fi?
    Only Wi-fi.
    B-rock

  • Help with web form script. PHP, CGI, Perl???

    anyone willing to help with a web form script? I have a form built, but cant seem to figure out the scripting! Should I be using Perl, CGI, PHP... What do I need to enable? I am a complete novice when it comes to scripts. Looking for a little friendly help.

    Here is a simple bit of PHP to stick in the page your form posts to. You would need to edit the first three variables to your liking, and add the html you want to serve afterwards:
    <pre>
    <?php
    $emailFrom = '[email protected]';
    $emailTo = '[email protected]';
    $emailSubject = 'Subject';
    $date = date('l, \t\h\e dS \o\f F, Y \a\t g:i A');
    $browser = $HTTPSERVER_VARS['HTTP_USERAGENT'];
    $hostname = $HTTPSERVER_VARS['REMOTEADDR'];
    $message = "$date\n\nAddress: $hostname\nBrowser: $browser\n\n";
    foreach ($_POST as $key => $value) {
    $message .= $key . ": " . $value . "\n";
    $mailResult = mail($emailTo,$emailSubject,$message,"From: $emailFrom");
    ?>
    </pre>
    This script will grab the server's date and the submitter's address and browser type. It will then list the name and value of each form field you have put on your form.
    Also, this script expects your form method="post".
    Lastly, you can offer alternate text later on in your html page based on the success of the above script with a snippet like this:
    <pre><?php
    if ($mailResult) {
    echo "Your comments have been received thank you.";
    } else {
    echo "There was an error. Please try again or contact us using an alternate method.";
    ?></pre>

  • Help with a startup script for monitorix

    How can I deal with a perl script that doesn't acknowledge a query for pidof?
    $ ps aux | grep monitorix
    root 1089 0.0 1.2 16280 6556 ? Ss 09:54 0:00 /usr/bin/monitorix -c /etc/monitorix.conf
    So it's running... but I can't find it with pidof:
    $ pidof /usr/bin/monitorix
    Here is the /etc/rc.d/monitorix I've been using but that doesn't stop the program (since it has no PID).
    #!/bin/bash
    . /etc/rc.conf
    . /etc/rc.d/functions
    PID=`pidof -o %PPID /usr/bin/monitorix`
    MARGS="-c /etc/monitorix.conf"
    case "$1" in
    start)
    stat_busy "Starting Monitorix"
    if [ -z "$PID" ]; then
    /usr/bin/monitorix $MARGS
    fi
    if [ ! -z "$PID" -o $? -gt 0 ]; then
    stat_fail
    else
    PID=`pidof -o %PPID /usr/bin/monitorix`
    echo $PID > /var/run/monitorix.pid
    add_daemon monitorix
    stat_done
    fi
    stop)
    stat_busy "Stopping Monitorix"
    [ ! -z "$PID" ] && kill $PID &> /dev/null
    if [ $? -gt 0 ]; then
    stat_fail
    else
    rm_daemon monitorix
    else
    rm_daemon monitorix
    stat_done
    fi
    restart)
    $0 stop
    sleep 1
    $0 start
    echo "usage: $0 {start|stop|restart}"
    esac

    According to the man page, the -p flag will let you generate a PID file.
    You have a few logical errors in your rc.d script and a syntax error (double else in stop). I've been using a template similar to the below in cleaning up a few of the packages I maintain...
    #!/bin/bash
    . /etc/rc.conf
    . /etc/rc.d/functions
    pidfile=/run/monitorix.pid
    if [[ -r $pidfile ]]; then
    read -r PID < "$pidfile"
    if [[ ! -d /proc/$PID ]]; then
    # stale pidfile
    unset PID
    rm -f "$pidfile"
    fi
    fi
    args=(-c /etc/monitorix.conf -p "$pidfile")
    case "$1" in
    start)
    stat_busy "Starting Monitorix"
    if [[ -z $PID ]] && /usr/bin/monitorix "${args[@]}"; then
    add_daemon monitorix
    stat_done
    else
    stat_fail
    exit 1
    fi
    stop)
    stat_busy "Stopping Monitorix"
    if [[ $PID ]] && kill $PID &> /dev/null; then
    rm_daemon monitorix
    stat_done
    else
    stat_fail
    exit 1
    fi
    restart)
    $0 stop
    sleep 1
    $0 start
    echo "usage: $0 {start|stop|restart}"
    esac
    please also fix the PKGBUILD:
    install=('readme.install')
    This is not valid, and pacman 4 will not let you declare install as an array.
    Last edited by falconindy (2011-09-25 15:05:02)

  • Urgeant help with a java script

    I really nead some help with an essay that i have for tommorow. Ok it goes like this: I have to build in java and with help of the awt library a proper interface that whill allow people to make reservation for tickets in a cinema. With the proper graphics the interface must allow the users to chose time , movie , date , and a spot in the cinema! the spot should be selected from a "picture" (like a diagramm or something) of the cinema which will be displayed on the screen...
    thanx in advance!!!

    What do you need "help" with? No one is going to do your homework for you here. If you have a specific question or problem, feel free to ask. You have to get started yourself though.. Thought college was going to be easy?

  • Need help with PHP mail script [was: Can someone please help me?]

    I'm trying to collect data from a form and email it.  I'm using form2mail.php and the problem is that the email is not collecting the form info and it has the same email address in the From: and To: lines. I'm really stuck and would appreciate any help.
    Here is the HTML code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Contact Us</title>
    <style type="text/css">
    <!--
    .style1 {font-family: Verdana, Arial, Helvetica, sans-serif}
    .style2 {
    font-size: 14px;
    color: #000000;
    body {
    background-color: #FFFFFF;
    body,td,th {
    color: #CC3300;
    .style3 {font-size: 14px; font-weight: bold; }
    .style6 {font-size: 18px}
    .style7 {font-size: 16px}
    .style8 {font-size: 16px; font-family: Verdana, Arial, Helvetica, sans-serif; }
    .style9 {font-size: 16px; font-weight: bold; font-family: Verdana, Arial, Helvetica, sans-serif; }
    .style10 {color: #000000}
    -->
    </style>
    </head>
    <body>
    <div align="center"><img src="nav2.jpg" alt="nav bar" width="698" height="91" border="0" usemap="#Map2" />
      <map name="Map2" id="Map2">
      <area shape="rect" coords="560,9,684,38" href="accessories.html" />
    <area shape="rect" coords="456,8,548,38" href="contact.html" />
    <area shape="rect" coords="305,8,435,40" href="photog.html" />
    <area shape="rect" coords="187,9,283,39" href="services.html" />
    <area shape="rect" coords="81,10,167,39" href="aboutus.html" />
    <area shape="rect" coords="5,10,68,39" href="index.html" />
    </map>
      <map name="Map" id="Map">
        <area shape="rect" coords="9,9,69,39" href="index.html" />
        <area shape="rect" coords="83,11,165,39" href="aboutus.html" />
        <area shape="rect" coords="182,9,285,38" href="services.html" />
        <area shape="rect" coords="436,14,560,37" href="contact.html" />
        <area shape="rect" coords="563,14,682,38" href="accessories.html" />
      </map>
    </div>
    <p> </p>
    <form id="TheForm" name="TheForm" action="form2mail.php" method="post">
      <p align="center" class="style2">P<span class="style1">lease fill out form below for a &quot;free no obligation quote&quot; then click submit.</span></p>
      <p align="center" class="style3">(*Required Information)</p>
      <div align="center">
        <pre><strong><span class="style8">*Contact Name</span> </strong><input name="name" type="text" id="name" />
    <span class="style8"><strong>
    Business Name </strong></span><input name="bn" type="text" id="bn" />
    <span class="style8"><strong>*Phone Number <input type="text" name="first" size="3" onFocus="this.value='';"
        onKeyup="checkNumber(this.value); autoTab(this, document.TheForm.second);" maxlength="3" value="###" /> - <input type="text" name="second" size="3" onFocus="this.value='';" onKeyup="checkNumber(this.value); autoTab(this, document.TheForm.third);" maxlength="3" value="###" /> - <input type="text" name="third" size="4" onFocus="this.value='';" onKeyup="checkNumber(this.value); autoTab(this, document.TheForm.fourth);" maxlength="4" value="####"/> </strong></span>
    <strong><span class="style1">*</span><span class="style8">Email Address</span> <input name="email" type="text" id="email" />     </strong> </pre>
        <label><span class="style9">*Re-enter to confirm</span>
        <input name="emx" type="text" id="emx" /></label><br /><br /><span class="style9">
    <label></label>
        </span>
        <p><span class="style9">*Best time to call </span>
          <select name="name1[]" multiple size="1" >
            <option>8am-9am</option>
            <option>9am-10am</option>
            <option>10am-11am</option>
            <option>11am-12pm</option>
            <option>12pm-1pm</option>
            <option>1pm-2pm</option>
            <option>2pm-3pm</option>
            <option>3pm-4pm</option>
            <option>4pm-5pm</option>
            <option>5pm-6pm</option>
            <option>6pm-7pm</option>
            <option>7pm-8pm</option>
          </select>
          <br />
          <br />
          <span class="style9">Type of Location</span>
          <select name="name2[]" multiple size="1" >
            <option>Residential</option>
            <option>Commercial</option>
          </select>
          <br />
          <br />
            <span class="style1"><br />
            <strong><br />
              <span class="style6">*Type of Services Requested:</span></strong><br />
            </span><strong><span class="style10">(check all that apply)</span><br />
                </strong><br />
                <span class="style7"><span class="style1"><strong>Janitorial cleaning</strong></span>
                <input type="checkbox" name="checkbox[]" value="checkbox" multiple/>
                <br />
                </span><strong><br />
                  <span class="style8">Mobile Auto Detailing</span>
                <input type="checkbox" name="checkbox2[]" value="checkbox" multiple/>
                <br />
                <br />
                  </strong><span class="style9">Moving/Hauling</span>
          <input type="checkbox" name="checkbox3[]" value="checkbox" multiple/>
          <br />
          <br />
                  <span class="style9">Pressure washing</span>
          <input type="checkbox" name="checkbox4[]" value="checkbox" multiple/>
          <br />
          <br />
                  <span class="style9">Window washing</span>
          <input type="checkbox" name="checkbox5[]" value="checkbox" multiple/>
          <br />
          <br />
                  <span class="style9">Window Tinting</span>
          <input type="checkbox" name="checkbox6[]" value="checkbox" multiple/>
          <br />
          <br />
                  <span class="style9">Boat cleaning</span>
          <input type="checkbox" name="checkbox7[]" value="checkbox" multiple/>
          <br />
          <br />
                  <span class="style9">RV cleaning</span>
          <input type="checkbox" name="checkbox8[]" value="checkbox" multiple/>
          <br />
          <br />
                  <span class="style9">Motorcycle cleaning</span>
          <input type="checkbox" name="checkbox9[]" value="checkbox" multiple/>
          <br />
          <br />
          <br />
          <br />
          <input name="SB"  type="button" class="style9" value="Submit" onClick="sendOff();">
        </p>
      </div></label>
      <script language="JavaScript1.2">
    // (C) 2000 www.CodeLifter.com
    // http://www.codelifter.com
    // Free for all users, but leave in this  header
    var good;
    function checkEmailAddress(field) {
    // Note: The next expression must be all on one line...
    //       allow no spaces, linefeeds, or carriage returns!
    var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org) |(\..{2,2}))$)\b/gi);
    if (goodEmail){
       good = true
    } else {
       alert('Please enter a valid e-mail address.')
       field.focus()
       field.select()
       good = false
    function autoTab(startPoint,endPoint){
    if (startPoint.getAttribute&&startPoint.value.length==startPoint.getAttribute("max length"))
    endPoint.focus();
    function checkNumber(phoneNumber){
    var x=phoneNumber;
    var phoneNumber=/(^\d+$)|(^\d+\.\d+$)/
    if (phoneNumber.test(x))
    testResult=true
    else{
    alert("Please enter a valid number.")
    phoneNumber.focus();
    phoneNumber.value="";
    testResult=false
    return (testResult)
    function sendOff(){
       namecheck = document.TheForm.name.value   
       if (namecheck.length <1) {
          alert('Please enter your name.')
          return
       good = false
       checkEmailAddress(document.TheForm.email)
       if ((document.TheForm.email.value ==
            document.TheForm.emx.value)&&(good)){
          // This is where you put your action
          // if name and email addresses are good.
          // We show an alert box, here; but you can
          // use a window.location= 'http://address'
          // to call a subsequent html page,
          // or a Perl script, etc.
          window.location= 'form2mail.php';
       if ((document.TheForm.email.value !=
              document.TheForm.emx.value)&&(good)){
              alert('Both e-mail address entries must match.')
    </script>
    </form>
    <p> </p>
    </body>
    </html>
    and here is the form2mail.php:
    <?php
    # You can use this script to submit your forms or to receive orders by email.
    $MailToAddress = "[email protected]"; // your email address
    $redirectURL = "http://www.chucksmobile.com/thankyou.html"; // the URL of the thank you page.
    $MailSubject = "[Customer Contact Info]"; // the subject of the email
    $sendHTML = FALSE; //set to "false" to receive Plain TEXT e-mail
    $serverCheck = FALSE; // if, for some reason you can't send e-mails, set this to "false"
    # copyright 2006 Web4Future.com =================== READ THIS ===================================================
    # If you are asking for a name and an email address in your form, you can name the input fields "name" and "email".
    # If you do this, the message will apear to come from that email address and you can simply click the reply button to answer it.
    # To block an IP, simply add it to the blockip.txt text file.
    # CHMOD 777 the blockip.txt file (run "CHMOD 777 blockip.txt", without the double quotes)
    # This is needed because the script tries to block the IP that tried to hack it
    # If you have a multiple selection box or multiple checkboxes, you MUST name the multiple list box or checkbox as "name[]" instead of just "name"
    # you must also add "multiple" at the end of the tag like this: <select name="myselectname[]" multiple>
    # you have to do the same with checkboxes
    Web4Future Easiest Form2Mail (GPL).
    Copyright (C) 1998-2006 Web4Future.com All Rights Reserved.
    http://www.Web4Future.com/
    This script was written by George L. & Calin S. from Web4Future.com
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    # DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING ===================================================
    $w4fver =  "2.2";
    $ip = ($_SERVER['HTTP_X_FORWARDED_FOR'] == "" ? $_SERVER['REMOTE_ADDR'] : $_SERVER['HTTP_X_FORWARDED_FOR']);
    //function blockIP
    function blockip($ip) {
    $handle = @fopen("blockip.txt", 'a');
    @fwrite($handle, $ip."\n");
    @fclose($handle);
    $w4fx = stristr(file_get_contents('blockip.txt'),getenv('REMOTE_ADDR'));
    if ($serverCheck) {
    if (preg_match ("/".str_replace("www.", "", $_SERVER["SERVER_NAME"])."/i", $_SERVER["HTTP_REFERER"])) { $w4fy = TRUE; } else { $w4fy = FALSE; }
    } else { $w4fy = TRUE; }
    if (($w4fy === TRUE) && ($w4fx === FALSE)) {
    $w4fMessage = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\"><html>\n<head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"></head><body><font face=3Dverdana size=3D2>";
    if (count($_GET) >0) {
    reset($_GET);
    while(list($key, $val) = each($_GET)) {
      $GLOBALS[$key] = $val;
      if (is_array($val)) {
       $w4fMessage .= "<b>$key:</b> ";
       foreach ($val as $vala) {
        $vala =stripslashes($vala);
        $vala = htmlspecialchars($vala);
        if (trim($vala)) { if (stristr($vala,"Content-Type:") || stristr($vala,"MIME-Version") || stristr($vala,"Content-Transfer-Encoding") || stristr($vala,"bcc:")) { blockip($ip); die("ILLEGAL EXECUTION DETECTED!"); } }
        $w4fMessage .= "$vala, ";
       $w4fMessage .= "<br>\n";
      else {
       $val = stripslashes($val);
       if (trim($val)) { if (stristr($val,"Content-Type:") || stristr($val,"MIME-Version") || stristr($val,"Content-Transfer-Encoding") || stristr($val,"bcc:")) { blockip($ip); die("ILLEGAL EXECUTION DETECTED!"); } }
       if (($key == "Submit") || ($key == "submit")) { } 
       else {  if ($val == "") { $w4fMessage .= "$key: - <br>\n"; }
         else { $w4fMessage .= "<b>$key:</b> $val<br>\n"; }
    } // end while
    }//end if
    else {
    reset($_POST);
    while(list($key, $val) = each($_POST)) {
      $GLOBALS[$key] = $val;
      if (is_array($val)) {
       $w4fMessage .= "<b>$key:</b> ";
       foreach ($val as $vala) {
        $vala =stripslashes($vala);
        $vala = htmlspecialchars($vala);
        if (trim($vala)) { if (stristr($vala,"Content-Type:") || stristr($vala,"MIME-Version") || stristr($vala,"Content-Transfer-Encoding") || stristr($vala,"bcc:")) {blockip($ip); die("ILLEGAL EXECUTION DETECTED!"); } }   
        $w4fMessage .= "$vala, ";
       $w4fMessage .= "<br>\n";
      else {
       $val = stripslashes($val);
       if (trim($val)) { if (stristr($val,"Content-Type:") || stristr($val,"MIME-Version") || stristr($val,"Content-Transfer-Encoding") || stristr($val,"bcc:")) {blockip($ip); die("ILLEGAL EXECUTION DETECTED!"); } }
       if (($key == "Submit") || ($key == "submit")) { } 
       else {  if ($val == "") { $w4fMessage .= "$key: - <br>\n"; }
         else { $w4fMessage .= "<b>$key:</b> $val<br>\n"; }
    } // end while
    }//end else
    $w4fMessage .= "<font size=3D1><br><br>\n Sender IP: ".$ip."</font></font></body></html>";
        $w4f_what = array("/To:/i", "/Cc:/i", "/Bcc:/i","/Content-Type:/i","/\n/");
    $name = preg_replace($w4f_what, "", $name);
    $email = preg_replace($w4f_what, "", $email);
    if (!$email) {$email = $MailToAddress;}
    $mailHeader = "From: $name <$email>\r\n";
    $mailHeader .= "Reply-To: $name <$email>\r\n";
    $mailHeader .= "Message-ID: <". md5(rand()."".time()) ."@". ereg_replace("www.","",$_SERVER["SERVER_NAME"]) .">\r\n";
    $mailHeader .= "MIME-Version: 1.0\r\n";
    if ($sendHTML) {
      $mailHeader .= "Content-Type: multipart/alternative;";  
      $mailHeader .= "  boundary=\"----=_NextPart_000_000E_01C5256B.0AEFE730\"\r\n";    
    $mailHeader .= "X-Priority: 3\r\n";
    $mailHeader .= "X-Mailer: PHP/" . phpversion()."\r\n";
    $mailHeader .= "X-MimeOLE: Produced By Web4Future Easiest Form2Mail $w4fver\r\n";
    if ($sendHTML) {
      $mailMessage = "This is a multi-part message in MIME format.\r\n\r\n";
      $mailMessage .= "------=_NextPart_000_000E_01C5256B.0AEFE730\r\n";
      $mailMessage .= "Content-Type: text/plain;   charset=\"ISO-8859-1\"\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\n";  
      $mailMessage .= trim(strip_tags($w4fMessage))."\r\n\r\n";  
      $mailMessage .= "------=_NextPart_000_000E_01C5256B.0AEFE730\r\n";  
      $mailMessage .= "Content-Type: text/html;   charset=\"ISO-8859-1\"\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\n";  
      $mailMessage .= "$w4fMessage\r\n\r\n";  
      $mailMessage .= "------=_NextPart_000_000E_01C5256B.0AEFE730--\r\n";  
    if ($sendHTML === FALSE) {
      $mailHeader .= "Content-Type: text/plain;   charset=\"ISO-8859-1\"\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\n";  
      $mailMessage .= trim(strip_tags($w4fMessage))."\r\n\r\n";  
    if (!mail($MailToAddress, $MailSubject, $mailMessage,$mailHeader)) { echo "Error sending e-mail!";}
    else { header("Location: ".$redirectURL); }
    } else { echo "<center><font face=verdana size=3 color=red><b>ILLEGAL EXECUTION DETECTED!</b></font></center>";}
    ?>
    Thanks in advance,
    Glenn
    [Subject line edited by moderator to indicate nature of request]

    Using PHP to process an online form and send the input by email is very simple. The mail() function takes a minimum of three arguments, namely: the address the mail is being sent to, the subject line, and the body of the email as a single string. The reason some people use scripts like form2mail.php is because they don't have the knowledge or patience to validate the user input to make sure it's safe to send.
    Rather than attempt to trawl through your complex form looking for the problems, I would suggest starting with a couple of simple tests.
    First of all, create a PHP page called mailtest.php containing the following script:
    <?php
    $to = '[email protected]'; // use your own email address
    $subject = 'PHP mail test';
    $message = 'This is a test of the mail() function.';
    $sent = mail($to, $subject, $message);
    if ($sent) {
      echo 'Mail was sent';
    } else {
      echo 'Problem sending mail';
    ?>
    Save the script, upload it to your server, and load it into a browser. If you see "Mail is sent", you're in business. If not, it probably means that the hosting company insists on the fifth argument being supplied to mail(). This is your email address preceded by -f. Change the line of code that sends the mail to this:
    $sent = mail($to, $subject, $message, null, '[email protected]');
    Obviously, replace "[email protected]" with your own email address.
    If this results in the mail being sent successfully, you will need to adapt the code in form2mail.php to accept the fifth parameter. You need to change the following line, which is a few lines from the end of the script:
    if (!mail($MailToAddress, $MailSubject, $mailMessage,$mailHeader))
    Change it to this:
    if (!mail($MailToAddress, $MailSubject, $mailMessage,$mailHeader, '[email protected]'))
    Again, use your own email address instead of "[email protected]".
    Once you have determined whether you need the fifth argument, test form2mail.php with a very simple form like this:
    <form id="form1" name="form1" method="post" action="form2mail.php">
      <p>
        <label for="name">Name:</label>
        <input type="text" name="name" id="name" />
      </p>
      <p>
        <label for="email">Email:</label>
        <input type="text" name="email" id="email" />
      </p>
      <p>
        <label>
          <input type="checkbox" name="options[]" value="boat cleaning" id="options_0" />
          Boat cleaning</label>
        <br />
        <label>
          <input type="checkbox" name="options[]" value="RV cleaning" id="options_1" />
          RV cleaning</label>
        <br />
        <label>
          <input type="checkbox" name="options[]" value="motorcycle cleaning" id="options_2" />
          Motorcycle cleaning</label>
      </p>
      <p>
        <input type="submit" name="send" id="send" value="Submit" />
      </p>
    </form>
    If that works, you can start to make the form more complex and add back your JavaScript validation.

  • Help with asp ... security levels

    I made a change to the security level for the end user. i add
    a security feature by adding 12345 to their security level.
    <%@LANGUAGE="VBSCRIPT"%>
    <%Option Explicit%>
    <%
    'check to see if the page is submitted
    Dim validLogin
    Dim strErrorMessage
    Dim intLevel
    Dim sLevel
    If (Request.Form("uname")<>"") Then
    'user has submitted the form
    'get the entered values and hit the database
    Dim strUserName
    Dim strPassword
    'going to use an implicit connection, no connection object
    needed
    Dim objRS
    strUserName = UCase(Request.Form("uname"))
    strPassword = UCase(Request.Form("pwd"))
    response.write("strUserName")
    'prepare the RS
    Set objRS = Server.CreateObject("ADODB.Recordset")
    'set the sql statement
    objRS.Source = "SELECT * FROM tblEmployee WHERE
    strEmpUserName = '" & strUserName & "' AND strEmpPassword =
    '" & strPassword & "'"
    ' heres the implicit connection
    objRS.ActiveConnection =
    "Provider=Microsoft.Jet.OLEDB.4.0;Data
    Source=c:\Inetpub\db\IMPCustomers.mdb"
    objRS.CursorType = 0
    objRS.CursorLocation = 3
    objRS.Open
    'check for EOF
    If(objRS.EOF) Then
    'no records matched, invalid login
    Response.Redirect("invalidLogin.asp")
    'strErrorMessage = "Invalid Login. Try Again."
    validLogin = false
    Else
    'added intLevel to add more security on 3/29/07
    intLevel = Cint(objRS("intEmpSecurityLevel"))
    intLevel = intLevel + 12345
    sLevel = intLevel
    'valid login, set session variables
    Session("username") = UCase(strUserName)
    Session("userpass") = UCase(strPassword)
    Session("sLevel") = sLevel
    'Session("sLevel") = objRS("intEmpSecurityLevel") - changed
    to add more security on 3/29/07
    Session("fn") = objRS("strEmpFN")
    'release the RS
    Set objRS.ActiveConnection = Nothing
    Set objRS = nothing
    'redirect off this page
    Response.Redirect("custSearch.asp")
    End If
    End If
    %>
    I'm now having trouble removing the 12345 from their security
    level in the custSearch.asp.
    <%@LANGUAGE="VBSCRIPT"%>
    <%Option Explicit%>
    <%
    Dim strUserName
    Dim strPassword
    Dim intSLevel
    Dim isum
    Dim intS
    Dim intNewSLevel
    Dim sLevel
    Dim strFN
    Dim strErrorMessage
    Dim strError
    'get pass parameters
    strUserName = Session("username")
    strPassword = Session("userpass")
    intSLevel = Session("sLevel")
    'add on 3/29/07 for security
    'get the security level
    isum = sLevel
    'take isum which contains sLevel and subtract 12345 from it
    isum = isum - 12345
    'now intS equals security level in the db
    intS = isum
    'put into a session
    Session("intS") = intS
    strFN = Session("fn")
    strErrorMessage = ("strError")
    'If strErrorMessage = "" Then
    'strError = "There is no customer with that last name."
    'End If
    %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <title>Employee Intranet - Customer Database, Search
    for a particular customer.</title>
    <meta http-equiv="content-type" content="text/html;
    charset=utf-8" />
    <link rel="stylesheet" type="text/css"
    href="../css/pop_style.css" />
    <link rel="stylesheet" type="text/css"
    href="../css/forms.css" />
    <style type="text/css">
    /* HMTL selectors start here */
    h2 {
    margin-bottom:15px;
    p {
    margin-bottom:20px;
    hr {
    border:thin;
    border-color:#CCCCCC;
    border-style:dotted;
    width:100%;
    text-align:center;
    table {
    width:300;
    align:center;
    cellpadding:2px;
    cellspacing:2px;
    margin-left:30%;
    td {
    font-size:14px;
    font-style:normal;
    font-weight:normal;
    border:0;
    padding:0;
    /* HMTL selectors start here */
    /* ID selectors start */
    #mainText {
    height:400px;
    font-family:Arial, Helvetica, sans-serif;
    font-size:14px;
    text-align:left;
    margin-left:1%;
    margin-right:1%;
    padding: 10px 5px;
    word-spacing:1px;
    letter-spacing:1px;
    /* id ends here */
    </style>
    <script language="JavaScript" type="text/JavaScript">
    <!-- function MM_reloadPage(init) { //reloads the window
    if Nav4 resized if (init==true) with (navigator) {if
    ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight;
    onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW ||
    innerHeight!=document.MM_pgH) location.reload(); }
    MM_reloadPage(true); //-->
    </script>
    </head>
    <body>
    <!-- CASCADING POPUP MENUS v5.2 by Angus Turnbill
    http://www.twinhelix.com -->
    <script language="javascript" type="text/javascript"
    src="../js/pop_core.js"></script>
    <script language="javascript" type="text/javascript"
    src="../js/pop_data.js"></script>
    <!-- border begins here -->
    <div id="border">
    <!-- second nav start here -->
    <div id="secNavBar"><a
    href="../index.htm">Home</a>  |  <a
    href="../htm/quality.htm">Quality</a> 
    |  <a href="../htm/contactUs.htm">Contact
    Us</a>  | <a
    href="../htm/siteMap.htm"> Site
    Map</a></div>
    <!-- logo starts here -->
    <div id="logo">
    <img src="../art/NewLogo.jpg" alt="Logo of IMPulse NC,
    INC." usemap="#Map" />
    <map name="Map" id="Map">
    <area shape="rect" coords="5,3,280,74"
    href="../index.htm" alt="Return to home page" />
    </map>
    </div>
    <!-- primary navigation div tags starts here -->
    <div id="priNav">
    <a id="home" name="home"
    style="visibility:hidden;">Home</a>
    <!-- primary navigation div tags ends here -->
    </div>
    <!-- main text starts here -->
    <div id="mainText">
    <h2>Customer Database </h2>
    <p
    style="font-size:14px;font-style:normal;font-weight:normal;">Welcome
    <%=strFN%></p>
    <p
    style="font-size:14px;font-style:normal;font-weight:normal;">Please
    search for a customer by using the fields below. You can use one
    field or multiple fields for your search.</p>
    <!-- signIn form starts here -->
    <div id="signIn">
    <div id="CSearch">
    <table>
    <form action="results.asp" method="post" name="search"
    id="search">
    <tr>
    <td width="98" height="29">Last Name:</td>
    <td width="150" tabindex="1"><input type="text"
    name="clname" size="25" maxlength="25" /></td>
    </tr>
    <tr>
    <td height="30">First Name:</td>
    <td tabindex="2"><input type="text" size="25"
    maxlength="25" name="cfname" /></td>
    </tr>
    <tr>
    <td height="30">Company:</td>
    <td tabindex="3"><input type="text" size="25"
    maxlength="25" name="ccomp" /></td>
    </tr>
    <tr>
    <td height="48" colspan="2" tabindex="4">
    <input type="submit" name="login" value="Submit" />
    <input type="reset" name="Reset" value="Reset" />
    <a href="logOut.asp">
    <input type="button" name="logOut" value="Log Out" />
    </a> </td>
    </tr>
    </form>
    </table>
    <!-- customer search form ends here -->
    </div>
    <blockquote> </blockquote>
    <!-- signIn form ends here -->
    </div>
    <!-- main text ends here -->
    </div>
    <div id="btm_Bar">
    100 IMPulse Way • Mount Olive, North Carolina 28365
    • Main (919) 658-2200 • Fax (919) 658-2268<br />
    &copy;2006 IMPulse NC, Inc. All Rights Reserved. </div>
    </div>
    <script language="javascript" type="text/javascript"
    src="../js/pop_events.js"></script>
    <!-- Places text blinker in the uname text box thru
    javascript -->
    <script language="javascript" type="text/javascript">
    document.search.clname.focus();
    </script>
    <!-- javascript ends here -->
    <%
    Response.Write(Session("username")) & "<br />"
    Response.Write(Session("userpass")) & "<br />"
    Response.Write(Session("sLevel")) & "<br />"
    Response.Write(Session("intS")) & "<br />"
    %>
    </body>
    </html>
    What am I doing wrong?

    "pqer" <[email protected]> wrote in message
    news:eugsik$kt5$[email protected]..
    > What am I doing wrong?
    1. You're allowing unfiltered user input into your SQL query.
    I could do
    some horrible damage to your system.
    2. You have SELECT * in your query.
    3. You're doing something that doesn't make any sense. Why
    add a constant
    to the security level just to subtract it again when you
    actually want to
    use it? You're just making more work for yourself. There is
    no benefit
    there.

  • Button help with asp database in dreamweaver

    Hey i have a page that has an iframe inside it with 2 menu's
    side by side with buttons in between to move items from one menu to
    another and i have them set with javascript to move back and forth
    works great only problem is its also supposed to update to the
    database as well and i used the update command feature in
    dreamwaver and i set it up but its still not working if i post my
    code can someone help me?

    If you're good with Flash and Action Script you could build a custom player.  Otherwise, pick-one from the links below. Some are free, some are not.
    Coffee Cup Video Player -- (supports playlists)
    http://www.coffeecup.com/video-player/
    Video LightBox --
    http://videolightbox.com/
    WWD Player -- supports playlists
    http://www.woosterwebdesign.com/flvplayer/
    Wimpy Rave -- supports playlists
    http://www.wimpyplayer.com/index.html
    JW Player --
    http://www.longtailvideo.com/
    FlowPlayer --
    http://flowplayer.org/
    YouTube --
    http://code.google.com/apis/youtube/getting_started.html
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

  • Need help with .asp Virtual Includes

    Hi,
    I am using;
    Dreamweaver 8
    Win XP Pro
    IIS6
    Virtual Directory Information in IIS:
    Local Path: C:\Inetpub\wwwroot\hseih
    Application Name: hseih
    Execute Permissions: Scripts Only
    Configurations>Options>Enable Parent Paths: Checked
    Read, Write, Browsing, Script Secure access, log visits,
    index this source: All Checked
    Dreamweaver Site Setup Information:
    Local Root: C:\Inetpub\wwwroot\hseih\
    Links Relative to: Site Root
    Server Model: ASP/VBScript
    Access: Local/Nework
    Testing Server Folder: C:\Inetpub\wwwroot\hseih\
    URL Prefix:
    http://localhost/hseih/
    Heres the code Im using in my index.asp file, where the
    footer.asp file is in the same directory.
    <!--#include virtual="/header.asp"--> or
    <!--#include virtual="header.asp"-->
    very simple, I believe I have everything setup correctly, and
    it should work. But I receive:
    Error Type:
    Active Server Pages, ASP 0126 (0x80004005)
    The include file 'header.asp' was not found.
    /hseih/index.asp, line 10
    However, it DOES work whenI add the root directory name into
    the include path as follows:
    <!--#include virtual="/hseih/header.asp"-->
    its like there's a setup issue somewhere, where IIS is
    misinterpreting the root of my site. When Im specifying to use the
    Site Root, and also the use of the "/" in the include path - doesnt
    that specify the root directory?
    Any insight would be greatly appreciate.
    Thanks!

    You web server configuration is what ultimately drives how
    your site is set
    up and how you navigate to all of your resources, whether
    they be include
    files, images, or what have you.
    Right now, the *root* of your web site, according to your IIS
    configuration,
    is c:\inetpub\wwwroot. This translates into
    http://localhost/. If you have
    your "hseih" folder within wwwroot, then it's a virtual
    directory, or
    subfolder, of the root. In other words,
    http://localhost/hseih/. So if
    you
    had a file in the "hseih" directory called "myfile.asp", then
    the path to it
    would be:
    http://localhost/hseih/myfile.asp.
    If, on the other hand, you reconfigure the web site in IIS to
    use
    c:\inetpub\wwwroot\hseih as the root of your web site as
    described in the
    configuration information I referred to earlier, the path to
    that same file
    would be
    http://localhost/myfile.asp.
    It's all a matter of telling IIS
    where the start of your web site is.
    The Local Root Folder config in the Local Info section of
    your site
    definition tells Dreamweaver where the files reside that
    you'll be editing.
    *Typically*, this lines up with the HTTP Address config in
    the Local Info
    section of your site definition. Not always, but most of the
    time.
    *Typically*, this also lines up with the URL Prefix in the
    Testing Server
    section of your site definition. Because you've got
    http://localhost/hseih/
    set up in the URL prefix *and* "c:\inetpub\wwwroot\hseih" set
    up in the
    local root folder everything is resolving correctly, because
    technically
    they're the same location. But, the thing to remember is
    "hseih" is a
    virtual directory within the site, it's not the root of the
    site (which is
    one level up from there).
    Any configuration URL that you set in your Dreamweaver site
    definition is
    pretty much there to tell Dreamweaver where to find things
    when it creates
    your preview pages, and other similar tasks. It's mostly
    there to make sure
    it builds links and references correctly for those functions.
    Once you have
    a grasp on those two items and know where the separate of web
    server and
    design tools occur, it makes a lot more sense.
    When you're working locally, which it sounds like you are,
    things are
    generally easier to configure because the local and remote
    info are the
    same. But when you begin working with outside web servers, it
    can get more
    complicated.
    Best regards,
    Chris
    "fmeenz" <[email protected]> wrote in
    message
    news:[email protected]...
    > chris -
    >
    > just reading your 2nd post about making the IIS root
    directory 'hseih'
    >
    > currently, my IIS local path for my virtual directory is
    set to
    >
    > Local Root: C:\Inetpub\wwwroot\hseih\
    >
    > is that not correct?
    >
    > when i browse
    http://localhost/hseih/ i do in
    fact see my index.asp page.
    > Its
    > the include files that arent working correctly. I am
    under the assumption
    > that, by adding a "/" to any reference -- link, image,
    include -- it
    > should
    > first start from the root of the site and pull from
    there. From what I
    > understand, I have set the root of my site to the hseih
    directory. please
    > correct me if im wrong.
    >
    > thanks
    > eric
    >
    >

  • Need help with a basic script to resize image then resize the canvas

    I am new to photoshop scripting, and have come across a need to force an image to be 8"x10" at 300dpi (whether it is vertical or horizontal)
    I need to maintain the correct orientation in the file, so an Action will not work, I believe I have to implement a script to accomplish this.
    I have the below script so far, but I am not certain of how to input the variables / paramters
    doc = app.activeDocument;
    if (doc.height > doc.width) doc.resizeImage("2400 pixels","3600 pixels", "300", "BICUBIC");
    if (doc.height > doc.width) doc.resizeCanvas("2400 pixels","3000 pixels", "MIDDLECENTER");
    if (doc.height < doc.width) doc.resizeImage("3600 pixels","2400 pixels",300,"BICUBIC");
    if (doc.height < doc.width) doc.resizeCanvas(3000,2400,"MIDDLECENTER");
    When I run this script, I get the following error:
    Error 1245: Illegal argument - argument 4
    - Enumerated value expected
    Line: 5
    if (doc.height < doc.width) doc.resizeImage("3600 pixels","2400 pixels",300,"BICUBIC");
    The fact that its failing on lien 5 lets nme know that I have the "If" portions of my script correct, I just dont know how to accomplish the functions correctly.
    Any help would be appreciated!
    Thanks,
    Brian

    I know I'm late here but it seems to me your trying to automate a 8"x10 or 10"x8 300DPI  print.
    To do that you must first crop your image to a 4:5 aspect ratio to prevent distortion unless your shooting with a 4" by 5" camera.   I wrote a Plugin script a couple years ago that could help you do a centered crop.  You could do the whole process by recording a simple Photoshop action that uses two  Plugin Scripts only four steps would be needed.
    Step 1 Menu File>Automate>AspectRatioSelection  (My script based of Adobe Fit Image Plugin script) Set 4:5 Aspect ratio, center,  Rectangle, Replace, no feather. Llike Fit Image this script woks on both Landscape and Portrait images. The Selection will be correct for the images orientation.
    Step 2 Menu Image>Crop
    Step 3 Menu File>Automate>Fit Image set 3000 PX height and 3000 PX width the Image will be Resample so its longest side will be 3000 pixels.  Adobe Fit Image Plugin Script always uses BICUBIC resampling.  I have a modified version of Fit Image  that uses Bicubic Sharper whebndownsizing and BicubicSmoother when up sizing.
    Step 4 Menu Image>Size un check resample set resolution to 300 DPI.
    When you play the actions the Script Dialogs will not be displayed and the setting use when you recorded the action will ne used.
    The Plugin Script are included in my crafting actions package:
    http://www.mouseprints.net/old/dpr/JJMacksCraftingActions.zip
    Contains:
    Action Actions Palette Tips.txt
    Action Creation Guidelines.txt
    Action Dealing with Image Size.txt
    Action Enhanced via Scripted Photoshop Functions.txt
    CraftedActions.atn Sample Action set includes an example Watermarking action
    Sample Actions.txt Photoshop CraftedActions set saved as a text file. This file has some additional comments I inserted describing how the actions work.
    12 Scripts for actions
    My other free Photoshop downloads cam be found here: http://www.mouseprints.net/Photoshop.html

  • Please help with an ICM script editor syntax question.

    I need to modify a set variable node.  What I have now is Call.PeripheralVariable8+".wav" and this works.  What I need it to say is Call.PeripheralVariable8+anything+".wav" but when I insert an * for the anything it's seen as a multiplier.  What's the syntax to do this?  The anything I need to add is _9xxx where xxx are other numbers, but the _9 will be in all, if that helps any.  Thanks in advance !!

    You can use the concatenate() function to build up your string, as you no doubt know.
    As far as the wildcard goes ... your intention must be to try to SET the call variable and later on test the call variable with an IF node. Is that right?
    You would be able to test parts of the string using the substr() function - which is based on character position. If that is a fixed value that you know, it's easy. If it's not, you can first use the find() function to locate something (like the "_9"), returning the position, and then use the substr() function to pull it off.
    Can you write some pseudo-code here to define exactly your intention? You can set up a dummy script and send a dummy call through using Call Tracer and watch the output to see how your code is working.
    Regards,
    Geoff

  • Help with FDM / vb script

    Hi,
    We are using Hyperion 11.1.1.3 suite. We want to load data to data warehouse from FDM (using pull adapter). We wrote trial vb script for SQL server as below and its working :
    /* need help in converting the below script for Oracle server from SQL server */
    'Create query string
    strSQL = "bulk INSERT tdestino "
    strSQL = strSQL & " FROM 'D:\FDQM.csv' "
    strSQL = strSQL & "WITH(FIELDTERMINATOR = ',',ROWTERMINATOR = '\n') "
    strSQL2 = strSQL2 & "select Amount, account,system, Source, Comment1,substring(Comment2,1,75) as comments "
    'strSQL2 = strSQL2 & "substring(Comment2,21,40) as commentss1 "
    strSQL2 = strSQL2 & "from tdestino "\
    Can anyone please advice how to convert it for oracle server ?
    Any suggestions/help will be appreciated.
    Thanks and regards,
    Nishit Shah

    Hi user1180842 ,
    Thanks a lot for your help. Appreciate it. I saw the .dat file is generated now we will write a script to load the data to warehouse.
    Thanks
    Nishit Shah

Maybe you are looking for

  • Supplier Open Interface Import is not working

    Hi, I am trying to load Suppliers through AP_SUPPLIERS_INT table using Supplier Open Interface Import but it is error. I applied the patch 11821347 which have made the version of the files as below /* $Header: appvapib.pls 115.110 2011/02/18 06:15:15

  • Keyboard and trackpad unresponsive after sleep

    I've had this problem a few times since I got a refurbished MBA a few weeks ago. In preferences, I have it set to require a password when waking up. Most of the time, this goes fine, but sometimes I get the login screen with my username and the curso

  • Cj20n  all levels of WBS wrt PR by relate NETWORK , ACTIVITY  No

    Dear SDN Team, 1. Is there any PS table to find out WBS Element levels for individual Purchase Requisition? 2.In our orz all PR is maintained by Network activity No. in EBKN table, where i have already got details of Network for respective PR. But ho

  • Column hiding based on Dashboard Prompt value in OBIEE 10g

    Hi, Can you please let me know, whether there is any possibility of "hiding the column based on the value selected in the Dashboard Prompt". Your suggestions are highly appreciated. Thanks & Regards Siva

  • Help with .mkv files

    Hi Can someone please help me understand a .mkv file and what I need (e.g. Quicktime Codec?) in the way of a player to play this particular kind of file? thanks Mac OS 10.4.11