Link to home
Start Free TrialLog in
Avatar of RickyGtz
RickyGtz

asked on

How Do I add a FirstName and Last name together ?

Hello, I am trying to add  firstname + lastname into my database in a table field called playername. I am stuck on this since I dont exactly find where to do this.
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="../../Connections/sqlConn1.asp" -->
<!--#include file="../../includes/common/KT_common.asp" -->
<!--#include file="../../includes/nxt/KT_back.asp" -->
<!--#include file="../../includes/tNG/tNG.inc.asp" -->
<%
P_League = request.QueryString("League")
'session ("P_LeagueID") =request.QueryString("LeagueID")
 
'Make a transaction dispatcher instance
Dim tNGs: Set tNGs = new tNG_dispatcher
tNGs.Init "../../"
%>
 
<%
' Start trigger
Dim formValidation: Set formValidation = new tNG_FormValidation
formValidation.Init
formValidation.addField "FirstName", true, "text", "", "", "", ""
formValidation.addField "UserName", true, "text", "", "", "", ""
formValidation.addField "Password", true, "text", "", "", "", ""
formValidation.addField "LastName", true, "text", "", "", "", ""
formValidation.addField "State", true, "text", "", "", "", ""
formValidation.addField "Email", true, "text", "email", "", "", ""
formValidation.addField "HomePhone", false, "text", "phone", "", "", ""
tNGs.prepareValidation formValidation
' End trigger
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
 
Repeat1__numRows = -1
Repeat1__index = 0
rsLeagueGolfers_numRows = rsLeagueGolfers_numRows + Repeat1__numRows
%>
<%
' Make an insert transaction instance 
Dim ins_LeagueGolfers: Set ins_LeagueGolfers = new tNG_multipleInsert
ins_LeagueGolfers.init MM_sqlConn1_STRING
tNGs.addTransaction ins_LeagueGolfers
' Register triggers
ins_LeagueGolfers.registerTrigger Array("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Insert1")
ins_LeagueGolfers.registerTrigger Array("BEFORE", "Trigger_Default_FormValidation", 10, formValidation)
ins_LeagueGolfers.registerTrigger Array("END", "Trigger_Default_Redirect", 99, "loggedmain.asp")
' Add columns
ins_LeagueGolfers.setTable "LeagueGolfers"
ins_LeagueGolfers.addColumn "FirstName", "STRING_TYPE", "POST", "FirstName", ""
ins_LeagueGolfers.addColumn "UserName", "STRING_TYPE", "POST", "txtUsername", ""
ins_LeagueGolfers.addColumn "Password", "STRING_TYPE", "POST", "txtPassword", ""
ins_LeagueGolfers.addColumn "LastName", "STRING_TYPE", "POST", "LastName", ""
ins_LeagueGolfers.addColumn "LeagueID", "STRING_TYPE", "GET", "League", ""
ins_LeagueGolfers.addColumn "Gender", "STRING_TYPE", "POST", "Gender", ""
ins_LeagueGolfers.addColumn "Title", "STRING_TYPE", "POST", "Title", ""
ins_LeagueGolfers.addColumn "City", "STRING_TYPE", "POST", "txtCity", ""
ins_LeagueGolfers.addColumn "State", "STRING_TYPE", "POST", "State", ""
ins_LeagueGolfers.addColumn "ZipCode", "STRING_TYPE", "POST", "ZipCode", ""
ins_LeagueGolfers.addColumn "Email", "STRING_TYPE", "POST", "Email", ""
ins_LeagueGolfers.addColumn "HomePhone", "STRING_TYPE", "POST", "HomePhone", ""
ins_LeagueGolfers.addColumn "WorkPhone", "STRING_TYPE", "POST", "WorkPhone", ""
ins_LeagueGolfers.setPrimaryKey "LeagueID", "NUMERIC_TYPE", "", ""
%>
<%
' Make an update transaction instance
Dim upd_League: Set upd_League = new tNG_multipleUpdate
upd_League.init MM_sqlConn1_STRING
tNGs.addTransaction upd_League
' Register triggers
upd_League.registerTrigger Array("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Update1")
upd_League.registerTrigger Array("BEFORE", "Trigger_Default_FormValidation", 10, formValidation)
upd_League.registerTrigger Array("END", "Trigger_Default_Redirect", 99, "loggedmain.asp")
' Add columns
upd_League.setTable "League"
upd_League.addColumn "LeagueName", "STRING_TYPE", "POST", "LeagueName"
upd_League.addColumn "SSN", "STRING_TYPE", "POST", "txtUsername"
upd_League.addColumn "Password", "STRING_TYPE", "POST", "txtPassword"
upd_League.addColumn "HostingClub", "STRING_TYPE", "POST", "HostingClub"
upd_League.addColumn "CourseId", "STRING_TYPE", "POST", "MemberCourseID"
upd_League.addColumn "PlayerName", "STRING_TYPE", "POST", "PlayerName"
upd_League.addColumn "LeagueAdmin", "NUMERIC_TYPE", "POST", "LeagueAdmin"
upd_League.addColumn "Email", "STRING_TYPE", "POST", "Email"
upd_League.setPrimaryKey "LeagueID", "STRING_TYPE", "GET", "League"
%>
<%
' Make a delete transaction instance
Dim del_LeagueGolfers: Set del_LeagueGolfers = new tNG_multipleDelete
del_LeagueGolfers.init MM_sqlConn1_STRING
tNGs.addTransaction del_LeagueGolfers
' Register triggers
del_LeagueGolfers.registerTrigger Array("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Delete1")
del_LeagueGolfers.registerTrigger Array("END", "Trigger_Default_Redirect", 99, "../../includes/nxt/back.asp")
' Add columns
del_LeagueGolfers.setTable "LeagueGolfers"
del_LeagueGolfers.setPrimaryKey "LeagueID", "NUMERIC_TYPE", "GET", "LeagueID"
%>
<%
'Execute all the registered transactions
tNGs.executeTransactions
%><%
'Execute all the registered transactions
tNGs.executeTransactions
%><%
'Execute all the registered transactions
tNGs.executeTransactions
%>
<%
'Get the transaction recordset
Dim rsLeagueGolfers
Dim rsLeagueGolfers_numRows
 
Set rsLeagueGolfers = tNGs.getRecordset("LeagueGolfers")
rsLeagueGolfers_numRows = 0
%>
<%
'Get the transaction recordset
Dim rsLeague
Dim rsLeague_numRows
 
Set rsLeague = tNGs.getRecordset("League")
rsLeague_numRows = 0
%>
<%
Dim rsLeagueGolfers_total
rsLeagueGolfers_total = KT_getNumberOfRows(rsLeagueGolfers)
%>
<!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=utf-8" />
<title>Documento sin t&iacute;tulo</title>
<link href="mxkollection3.css" rel="stylesheet" type="text/css" media="all" />
<script src="base.js" type="text/javascript"></script>
<script src="utility.js" type="text/javascript"></script>
<script src="style.js" type="text/javascript"></script>
<% Response.Write tNGs.displayValidationRules()%>
<script src="form.js" type="text/javascript"></script>
<script src="form.js.asp" type="text/javascript"></script>
<script type="text/javascript">
$NXT_FORM_SETTINGS = {
  duplicate_buttons: false,
  show_as_grid: false,
  merge_down_value: false
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
 
function YY_checkform() { //v4.66
//copyright (c)1998,2002 Yaromat.com
  var args = YY_checkform.arguments; var myDot=true; var myV=''; var myErr='';var addErr=false;var myReq;
  for (var i=1; i<args.length;i=i+4){
    if (args[i+1].charAt(0)=='#'){myReq=true; args[i+1]=args[i+1].substring(1);}else{myReq=false}
    var myObj = MM_findObj(args[i].replace(/\[\d+\]/ig,""));
    myV=myObj.value;
    if (myObj.type=='text'||myObj.type=='password'||myObj.type=='hidden'){
      if (myReq&&myObj.value.length==0){addErr=true}
      if ((myV.length>0)&&(args[i+2]==1)){ //fromto
        var myMa=args[i+1].split('_');if(isNaN(myV)||myV<myMa[0]/1||myV > myMa[1]/1){addErr=true}
      } else if ((myV.length>0)&&(args[i+2]==2)){
          var rx=new RegExp("^[\\w\.=-]+@[\\w\\.-]+\\.[a-z]{2,4}$");if(!rx.test(myV))addErr=true;
      } else if ((myV.length>0)&&(args[i+2]==3)){ // date
        var myMa=args[i+1].split("#"); var myAt=myV.match(myMa[0]);
        if(myAt){
          var myD=(myAt[myMa[1]])?myAt[myMa[1]]:1; var myM=myAt[myMa[2]]-1; var myY=myAt[myMa[3]];
          var myDate=new Date(myY,myM,myD);
          if(myDate.getFullYear()!=myY||myDate.getDate()!=myD||myDate.getMonth()!=myM){addErr=true};
        }else{addErr=true}
      } else if ((myV.length>0)&&(args[i+2]==4)){ // time
        var myMa=args[i+1].split("#"); var myAt=myV.match(myMa[0]);if(!myAt){addErr=true}
      } else if (myV.length>0&&args[i+2]==5){ // check this 2
            var myObj1 = MM_findObj(args[i+1].replace(/\[\d+\]/ig,""));
            if(myObj1.length)myObj1=myObj1[args[i+1].replace(/(.*\[)|(\].*)/ig,"")];
            if(!myObj1.checked){addErr=true}
      } else if (myV.length>0&&args[i+2]==6){ // the same
            var myObj1 = MM_findObj(args[i+1]);
            if(myV!=myObj1.value){addErr=true}
      }
    } else
    if (!myObj.type&&myObj.length>0&&myObj[0].type=='radio'){
          var myTest = args[i].match(/(.*)\[(\d+)\].*/i);
          var myObj1=(myObj.length>1)?myObj[myTest[2]]:myObj;
      if (args[i+2]==1&&myObj1&&myObj1.checked&&MM_findObj(args[i+1]).value.length/1==0){addErr=true}
      if (args[i+2]==2){
        var myDot=false;
        for(var j=0;j<myObj.length;j++){myDot=myDot||myObj[j].checked}
        if(!myDot){myErr+='* ' +args[i+3]+'\n'}
      }
    } else if (myObj.type=='checkbox'){
      if(args[i+2]==1&&myObj.checked==false){addErr=true}
      if(args[i+2]==2&&myObj.checked&&MM_findObj(args[i+1]).value.length/1==0){addErr=true}
    } else if (myObj.type=='select-one'||myObj.type=='select-multiple'){
      if(args[i+2]==1&&myObj.selectedIndex/1==0){addErr=true}
    }else if (myObj.type=='textarea'){
      if(myV.length<args[i+1]){addErr=true}
    }
    if (addErr){myErr+='* '+args[i+3]+'\n'; addErr=false}
  }
  if (myErr!=''){alert('The required information is incomplete or contains errors:\t\t\t\t\t\n\n'+myErr)}
  document.MM_returnValue = (myErr=='');
}
</script>
<link href="../Template/style.css" rel="stylesheet" type="text/css">
<link href="mxkollection3.css" rel="stylesheet" type="text/css" media="all" />
<script src="base.js" type="text/javascript"></script>
<script src="utility.js" type="text/javascript"></script>
<script src="style.js" type="text/javascript"></script>
<% Response.Write tNGs.displayValidationRules()%>
<style type="text/css">
<!--
.Estilo1 {font-size: 14px}
-->
</style>
<link href="mxkollection3.css" rel="stylesheet" type="text/css" media="all" />
<script src="base.js" type="text/javascript"></script>
<script src="utility.js" type="text/javascript"></script>
<script src="style.js" type="text/javascript"></script>
<% Response.Write tNGs.displayValidationRules()%>
</head>
 
<body>
<p>&nbsp;</p>
<div onKeyPress="javascript:return WebForm_FireDefaultButton(event, 'ctl00_CPH1_P_PatQuickAdd_btnAdd')" id="ctl00_CPH1_P_PatQuickAdd_pnlPatLookup">
  <%
	Response.Write tNGs.getErrorMsg()
%>
  <div class="KT_tng">
    <h1 class="Estilo1">Add a Golfer </h1>
    <table width="827" border="0" cellpadding="0" cellspacing="0" class="KT_tngtable">
      <tr>
        <td width="827"><span class="Estilo1">In this section you can add golfers into your league. This golfers are not members and have not access to entire functions.</span></td>
      </tr>
    </table>
    <p>&nbsp;</p>
    <div class="KT_tngform">
      <form method="post" id="form1" action="<%= KT_escapeAttribute(KT_getFullUri()) %>">
        <% cnt1 = 0 %>
        <% 
While ((Repeat1__numRows <> 0) AND (NOT rsLeagueGolfers.EOF)) 
%>
          <% cnt1 = cnt1 + 1 %>
          <% tNGs.SetCounter cnt1 %>
          <%
' Show IF Conditional region1 
  If rsLeagueGolfers_total > 1 Then
%>
            <h2><%=NXT_getResource("Record_FH")%> <%=cnt1%></h2>
            <%
  End If
' End Conditional region1
%>
          <table width="273" cellpadding="2" cellspacing="0" class="KT_tngtable">
            <tr>
              <td class="KT_th"><label for="FirstName_<%= cnt1 %>">First Name:</label></td>
              <td><input type="text" name="FirstName_<%= cnt1 %>" id="FirstName_<%= cnt1 %>" value="<%=(KT_escapeAttribute(rsLeagueGolfers.Fields.Item("FirstName").Value))%>" size="10" maxlength="20" />
                  <%=(tNGs.displayFieldHint("FirstName"))%> <%=(tNGs.displayFieldError("LeagueGolfers", "FirstName"))%> </td>
            </tr>
            <tr>
              <td class="KT_th"><label for="LastName_<%= cnt1 %>">Last Name:</label></td>
              <td><input type="text" name="LastName_<%= cnt1 %>" id="LastName_<%= cnt1 %>" value="<%=(KT_escapeAttribute(rsLeagueGolfers.Fields.Item("LastName").Value))%>" size="10" maxlength="20" />
                  <%=(tNGs.displayFieldHint("LastName"))%> <%=(tNGs.displayFieldError("LeagueGolfers", "LastName"))%> </td>
            </tr>
            <tr>
              <td class="KT_th"><label for="Gender_<%= cnt1 %>">Gender:</label></td>
              <td><select name="Gender_<%= cnt1 %>" id="Gender_<%= cnt1 %>">
                  <option value="Male" <%If (Not isNull((KT_escapeAttribute(rsLeagueGolfers.Fields.Item("Gender").Value)))) Then If ("Male" = CStr((KT_escapeAttribute(rsLeagueGolfers.Fields.Item("Gender").Value)))) Then Response.Write("SELECTED") : Response.Write("")%>>Male</option>
                  <option value="Female" <%If (Not isNull((KT_escapeAttribute(rsLeagueGolfers.Fields.Item("Gender").Value)))) Then If ("Female" = CStr((KT_escapeAttribute(rsLeagueGolfers.Fields.Item("Gender").Value)))) Then Response.Write("SELECTED") : Response.Write("")%>>Female</option>
                </select>
                  <%=(tNGs.displayFieldError("LeagueGolfers", "Gender"))%> </td>
            </tr>
            <tr>
              <td class="KT_th"><label for="Title_<%= cnt1 %>">Title:</label></td>
              <td><select name="Title_<%= cnt1 %>" id="Title_<%= cnt1 %>">
                  <option value="Dr." <%If (Not isNull((KT_escapeAttribute(rsLeagueGolfers.Fields.Item("Title").Value)))) Then If ("Dr." = CStr((KT_escapeAttribute(rsLeagueGolfers.Fields.Item("Title").Value)))) Then Response.Write("SELECTED") : Response.Write("")%>>Mr.</option>
                  <option value="Mr." <%If (Not isNull((KT_escapeAttribute(rsLeagueGolfers.Fields.Item("Title").Value)))) Then If ("Mr." = CStr((KT_escapeAttribute(rsLeagueGolfers.Fields.Item("Title").Value)))) Then Response.Write("SELECTED") : Response.Write("")%>>Dr.</option>
                  <option value="Mrs." <%If (Not isNull((KT_escapeAttribute(rsLeagueGolfers.Fields.Item("Title").Value)))) Then If ("Mrs." = CStr((KT_escapeAttribute(rsLeagueGolfers.Fields.Item("Title").Value)))) Then Response.Write("SELECTED") : Response.Write("")%>>Mrs.</option>
                  <option value="Miss" <%If (Not isNull((KT_escapeAttribute(rsLeagueGolfers.Fields.Item("Title").Value)))) Then If ("Miss" = CStr((KT_escapeAttribute(rsLeagueGolfers.Fields.Item("Title").Value)))) Then Response.Write("SELECTED") : Response.Write("")%>>Miss</option>
                  <option value="" >Ms</option>
                </select>
                  <%=(tNGs.displayFieldError("LeagueGolfers", "Title"))%> </td>
            </tr>
            <%
' Show IF Conditional show_City_on_insert_only 
  If Request.QueryString("LeagueID") = "" Then
%>
              <tr>
                <td class="KT_th"><label for="City_<%= cnt1 %>">City:</label></td>
                <td><label>
                <input type="text" name="txtCity" id="txtCity" />
                </label>
                <%=(tNGs.displayFieldError("LeagueGolfers", "City"))%> </td>
              </tr>
              <%
  End If
' End Conditional show_City_on_insert_only
%>
            <tr>
              <td class="KT_th"><label for="State_<%= cnt1 %>">State:</label></td>
              <td><font face="Tahoma">
                <select name="State_<%= cnt1 %>" class="txtbox1" id="State_<%= cnt1 %>">
                    <option>Select State</option>
                  <option value="AL">Alabama</option>
                  <option value="AK">Alaska</option>
                  <option value="AZ">Arizona</option>
                  <option value="AR">Arkansas</option>
                  <option value="CA">California</option>
                  <option value="CO">Colorado</option>
                  <option value="CT">Connecticut</option>
                  <option value="DE">Delaware</option>
                  <option value="FL">Florida</option>
                  <option value="GA">Georgia</option>
                  <option value="HI">Hawaii</option>
                  <option value="ID">Idaho</option>
                  <option value="IL">Illinois</option>
                  <option value="IN">Indiana</option>
                  <option value="IA">Iowa</option>
                  <option value="KS">Kansas</option>
                  <option value="KY">Kentucky</option>
                  <option value="LA">Louisiana</option>
                  <option value="ME">Maine</option>
                  <option value="MD">Maryland</option>
                  <option value="MA">Massachusetts</option>
                  <option value="MI">Michigan</option>
                  <option value="MN">Minnesota</option>
                  <option value="MS">Mississippi</option>
                  <option value="MO">Missouri</option>
                  <option value="MT">Montana</option>
                  <option value="NE">Nebraska</option>
                  <option value="NV">Nevada</option>
                  <option value="NH">New Hampshire</option>
                  <option value="NJ">New Jersey</option>
                  <option value="NM">New Mexico</option>
                  <option value="NY">New York</option>
                  <option value="NF">Newfoundland</option>
                  <option value="NC">North Carolina</option>
                  <option value="ND">North Dakota</option>
                  <option value="OH">Ohio</option>
                  <option value="OK">Oklahoma</option>
                  <option value="OR">Oregon</option>
                  <option value="PA">Pennsylvania</option>
                  <option value="RI">Rhode Island</option>
                  <option value="SC">South Carolina</option>
                  <option value="SD">South Dakota</option>
                  <option value="TN">Tennessee</option>
                  <option value="TX">Texas</option>
                  <option value="UT">Utah</option>
                  <option value="VT">Vermont</option>
                  <option value="VA">Virginia</option>
                  <option value="WA">Washington</option>
                  <option value="DC">Washington, D.C.</option>
                  <option value="WV">West Virginia</option>
                  <option value="WI">Wisconsin</option>
                  <option value="WY">Wyoming</option>
                </select>
                  </font><%=(tNGs.displayFieldHint("State"))%> <%=(tNGs.displayFieldError("LeagueGolfers", "State"))%> </td>
            </tr>
            <tr>
              <td class="KT_th"><label for="ZipCode_<%= cnt1 %>">Zip Code:</label></td>
              <td><input type="text" name="ZipCode_<%= cnt1 %>" id="ZipCode_<%= cnt1 %>" value="<%=(KT_escapeAttribute(rsLeagueGolfers.Fields.Item("ZipCode").Value))%>" size="8" maxlength="5" />
                  <%=(tNGs.displayFieldHint("ZipCode"))%> <%=(tNGs.displayFieldError("LeagueGolfers", "ZipCode"))%> </td>
            </tr>
            <tr>
              <td class="KT_th"><label for="Email_<%= cnt1 %>">Email:</label></td>
              <td><input type="text" name="Email_<%= cnt1 %>" id="Email_<%= cnt1 %>" value="<%=(KT_escapeAttribute(rsLeagueGolfers.Fields.Item("Email").Value))%>" size="15" maxlength="25" />
                  <%=(tNGs.displayFieldHint("Email"))%> <%=(tNGs.displayFieldError("LeagueGolfers", "Email"))%> </td>
            </tr>
            <tr>
              <td class="KT_th"><label for="HomePhone_<%= cnt1 %>">Home Phone:</label></td>
              <td><input type="text" name="HomePhone_<%= cnt1 %>" id="HomePhone_<%= cnt1 %>" value="<%=(KT_escapeAttribute(rsLeagueGolfers.Fields.Item("HomePhone").Value))%>" size="10" maxlength="15" />
                  <%=(tNGs.displayFieldHint("HomePhone"))%> <%=(tNGs.displayFieldError("LeagueGolfers", "HomePhone"))%> </td>
            </tr>
            <tr>
              <td class="KT_th">Work Phone:</td>
              <td><input type="text" name="WorkPhone_<%= cnt1 %>" id="WorkPhone_<%= cnt1 %>" value="<%=(KT_escapeAttribute(rsLeagueGolfers.Fields.Item("WorkPhone").Value))%>" size="10" maxlength="15" />
                <%=(tNGs.displayFieldHint("WorkPhone"))%> <%=(tNGs.displayFieldError("LeagueGolfers", "WorkPhone"))%></td>
            </tr>
            <tr>
              <td class="KT_th">Username:</td>
              <td><label>
                <input type="text" name="txtUsername" id="txtUsername" />
              </label></td>
            </tr>
            <tr>
              <td class="KT_th">Password:</td>
              <td><input type="password" name="txtPassword" id="txtPassword" /></td>
            </tr>
            <tr>
              <td class="KT_th"><label for="WorkPhone_<%= cnt1 %>">Confirm Password:</label></td>
              <td><label>
                <input type="password" name="txtpassconfirm" id="txtpassconfirm" />
              </label></td>
            </tr>
          </table>
          <input type="hidden" name="kt_pk_LeagueGolfers_<%=cnt1%>" class="id_field" value="<%=(KT_escapeAttribute(rsLeagueGolfers.Fields.Item("kt_pk_LeagueGolfers").Value))%>" />
          <input type="hidden" name="LeagueID_<%= cnt1 %>" id="LeagueID_<%= cnt1 %>" value="<%=(KT_escapeAttribute(rsLeagueGolfers.Fields.Item("LeagueID").Value))%>" />
          <input type="hidden" name="fullName" id="fullName" />
          <%
		  Repeat1__index=Repeat1__index+1
		  Repeat1__numRows=Repeat1__numRows-1
		  rsLeagueGolfers.MoveNext()
		Wend
		%>
        <div class="KT_bottombuttons">
          <div>
            <%
		' Show IF Conditional region1 
		  If Request.QueryString("LeagueID") = "" Then
		%>
              <input name="KT_Insert1" type="submit" id="KT_Insert1" onClick="YY_checkform('form1','txtPassword','txtpassconfirm','6','Confirmed Password does not Match');return document.MM_returnValue" value="<%=NXT_getResource("Insert_FB")%>" />
              <%
		' else Conditional region1
		  Else %>
              <input type="submit" name="KT_Update1" value="<%=NXT_getResource("Update_FB")%>" />
              <input type="submit" name="KT_Delete1" value="<%=NXT_getResource("Delete_FB")%>" onClick="return confirm('<%=NXT_getResource("Are you sure?")%>');" />
              <%
			  End If
			' End Conditional region1
			%>
            <input type="button" name="KT_Cancel1" value="<%=NXT_getResource("Cancel_FB")%>" onClick="return UNI_navigateCancel(event, '../../includes/nxt/back.asp')" />
          </div>
        </div>
      </form>
    </div>
    <br class="clearfixplain" />
  </div>
  <p>&nbsp;</p>
</div>
</body>
</html>

Open in new window

Avatar of Hecatonchires
Hecatonchires

Line 79 has a PlayerName column being updated with the value of a html form field called PlayerName.  Problem is there is no corresponding form field.

line 75: SSN db field is taken from txtUsername form field (found on line 383)

Line 399 has a hidden form field called fullName.  This is not referenced anywhere else on the page.  It has no default value set.  I'm inclined to believe it's updated by javascript specified in an include, but there are so many includes, both .asp and .js on this page, its very difficult to trace.  You also seem to be using some database abstraction layer that probably makes things much easier if you use the correct tool/ide to edit this page.

Avatar of Wayne Barron
Ricky, is this what you are wanting? (This is a cut down version of what you can do with INSERT Statements)
http://www.pcitdad.com/Test/EE/Q_24170463/Q_24170463.asp
Source
http://www.pcitdad.com/Test/EE/Q_24170463/Q_24170463.zip

Let me know?
Have a good one.

(Please consider getting away from Dreamweaver doing your ASP coding for you, it
Will save you a lot in the long run to do it all on your own.)
Avatar of RickyGtz

ASKER

Hi thanks for your example. I want actually create either a hidden field or a var and be able to get the value for firstname and lastname and insert it on playername together

like

var = rs("firstname") + rs(lastname)
insert into table   (playername)  values (var)
Try this, it worked for what I just did.
Put this in your page.asp
<input name="LName" type="hidden" id="FLName" value="<%=objRS("FirstName")%>">
<input name="LName" type="hidden" id="FLName" value="<%=objRS("LastName")%>">

page2.asp
<%=request.form("LName")%>

Both fields use the same name="LName"
But they have different ID's (ID cannot contact the same name)

Then, just use my code that I suppied above, to add it to the Table.
It will add a comma between the First, Last
You can change the order of the 2 Hidden fields around, to have
Last, First

Hope this helps.
Carrzkiss
Put the hidden fields in the Q_24170463.asp
And the
<%=request.form("LName")%>
In the insert.asp
is this issue resolved Ricky?
As it seems that you are implementing a little of it in the other question?
No not yet. I am struggling with dreamweaver codee..
what is it that you are having problems with?
Inserting this into the DB?
You really, really need to do your coding yourself.
Relying on DW to do all your coding for you is going to have you stuck in reverse instead
Of full speed ahead.

I do not have any of them DW extentions installed, so I am unable to assist in what you are trying to do.
I can only provide good working solid ASP/Access driven code that is reliable and functions well.
I cannot assist on the DW Code insertion, as I am still cleaning up some of my old pages
That originally had the DW code in it, and it is proving to be a nitemare come true.

Let me know if you need any further assistance.
Carrzkiss
Ricky.
I figured you already had this one taken care of?
Come in and let me know right quick what you are needing, and I will try to help
Before I head off to bed.
Going there in about 15 minutes....
ASKER CERTIFIED SOLUTION
Avatar of Wayne Barron
Wayne Barron
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
going to bed now.
See you in a few hours.