Use session variable in Insert record

Help, please!
I need to add a record to a table; one of the fields in the
table is the user_id. When I try to use the insert record server
behavior, there is no way to select the user_id session variable!
How is this done?

.oO(Ted Dawson)
>>>> to select the user_id session variable! How
is this done?
>>>
>>>Use a hidden variable in the form, and assign it
the value of the session.
>>
>> And what if the user manipulates that value? Hidden
form fields _always_
>> require a validation on the server. One purpose of a
session is to avoid
>> that sensitive data is sent to the client, where it
can be manipulated.
>
>
>Exactly how is the value of a SESSION VARIABLE
manipulated by the client?
It can be manipulated if it's put into a hidden form field.
Micha

Similar Messages

  • How do I insert a session variable into a record?

    I can’t figure out how to insert the value passed by a
    session variable into a record.
    I have a form I want to use to insert a record. I pass
    session variables to this page and want to insert one of them into
    the record. The session information is:
    session_start();
    $_SESSION['usename'] = $_POST['username'];
    $idvar = $_SESSION['id'];
    $_SESSION[‘id’] is the user_id that I want to
    insert into the record.
    I know $idvar is getting to the page with the form because I
    can echo it.
    The insert code looks like this:
    if ((isset($_POST["MM_insert"])) &&
    ($_POST["MM_insert"] == "register")) {
    $insertSQL = sprintf("INSERT INTO h_genres (user_id,
    username, contrib_to, Advertising, Annual_Reports, Leader_Content,
    Member_Content, Brochures) VALUES (%s, %s, %s, %s, %s, %s, %s,
    %s)",
    GetSQLValueString($_POST['user_id'], "int"),
    GetSQLValueString($_POST['username'], "text"),
    GetSQLValueString($_POST['contrib_to'], "text"),
    GetSQLValueString(isset($_POST['Advertising']) ? "true" :
    "", "defined","'Y'","'N'"),
    GetSQLValueString(isset($_POST['Annual_Reports']) ? "true" :
    "", "defined","'Y'","'N'"),
    GetSQLValueString(isset($_POST['Leader_Content']) ? "true" :
    "", "defined","'Y'","'N'"),
    GetSQLValueString(isset($_POST['Member_Content']) ? "true" :
    "", "defined","'Y'","'N'"),
    GetSQLValueString(isset($_POST['Brochures']) ? "true" : "",
    "defined","'Y'","'N'"));
    mysql_select_db($database_hauw, $hauw);
    $Result1 = mysql_query($insertSQL, $hauw) or
    die(mysql_error());
    I have a hidden field for the user_id:
    <input name="user_id" type="hidden" id="user_id" />
    I think I need to get the value in $idvar into user_id but I
    don’t know how.
    Any help is appreciated.

    awsweb wrote:
    > I have a hidden field for the user_id:
    > <input name="user_id" type="hidden" id="user_id"
    />
    >
    > I think I need to get the value in $idvar into user_id
    but I don?t know how.
    <input name="user_id" type="hidden" id="user_id"
    value="<?php echo
    $idvar; ?>" />
    David Powers
    Adobe Community Expert
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    http://foundationphp.com/

  • Can we use session variables in BI publisher's Data Model SQL Query?

    Hi Experts,
    We need to implement Data level security in BI Publisher 11g.
    In OBIEE we do so by using session variables, so just wanted to ask if we can use the same session variables in BI Publisher as well
    ie can we include the where clause in the Data Models SQL Query like
    Where ORG_ID = @{biServer.variables['NQ_SESSION.INV_ORG']}
    Let me know your views on this.
    PS: We are implementing EBS r12 security in BI Publisher.
    Thanks

    Read this -> OBIEE 11g: Error: "[nQSError: 23006] The session variable, NQ_SESSION.LAN_INT, has no value definition." when Creating a SQL Query using the session variable NQ_SESSION.LAN_INT in BI Publisher [ID 1511676.1]
    Follow the ER - BUG:13607750 - NEED TO BE ABLE TO SET A SESSION VARIABLE IN OBIEE AND USE IT IN BI PUBLISHER
    HTH,
    SVS

  • Use Session Variable with row-wise initialization

    Hello,
    I use an initialization block in order to load some translations in my repository (version is 11.1.1.6.BP1) :
    SQL :
    SELECT CODE_KEY, STRING_VALUE FROM "TABLES" WHERE  LANGUAGE_KEY= 'VALUEOF(NQ_SESSION.USERLOCALE)'
    Values :
    CN_INCOMING, Incoming, en
    CN_OUTGOING, Outgoing, en
    CN_INCOMING, Réception, fr
    CN_OUTGOING, Emission, fr
    etc ...
    I checked the row-wise intialization.
    The query is correct and returns the right values (I check in the log file ..).
    So far, So good.
    But when I want to use session variables in a column expression (in repository) like  :
    CASE WHEN "column"="xx" THEN VALUEOF(NQ_SESSION."CN_INCOMING")  ELSE VALUEOF(NQ_SESSION."CN_OUTGOING") END
    I got the error: [nQSError: 23006] The session variable, NQ_SESSION.CN_OUTGOING, has no value definition.
    If I used the same formula directly in Answers it's working correctly.
    Do I have to necessarily do this in answers or is there a way to do this in the repository.
    Thanks in advance
    Regards
    Benjamin

    Yes I already tested this point, when I don't use a row wise initialization it's working, but I don't want to create one variable for each translations that I need to use in column formula if you know what I mean.
    I don't understand why we can't use this kind of variable in this context ..but if I have to create the column in my analysis, I will do that, but it's not really user friendly
    Anyway thanks for your time.

  • Page Specific Persistence using Session Variables

    Hi, I have read a lot about using session variables to persist the ReportDocument object across page loads.  This works fine if you have just one page open with one report.  The problem I am having is I have a web application that makes 30 or 40 different reports available to the user.  To simplify the code and make it easier to add new reports I have developed a single template aspx page that can be used to view any of the reports.
    My problem is that if the user opens 2 different reports in 2 separate tabs in the browser then the session variable persistence doesn't work because the session variable is available to both tabs.
    Is there a way to persist the ReportDocument object which is 'page' specific.
    Thanks

    Your best option is likely to have something that makes the session variable names unique.  I've done such things as putting the current datetime in the url as a querystring parameter and appending that to the variable name.  On each postback that querystring should persist.
    You might be able to use the reportclientdocument object and serialize the report and persist through view state, haven't tried this with inproc ras though.  A sample that uses the ras sdk can be found [here|http://wiki.sdn.sap.com/wiki/display/BOBJ/NETRASSDK+Samples]

  • Dates Format in Promts using Session Variables

    Hi Experts,
    I have an issue in controlling date format in prompts using session variable which I am using to set default value.
    By default date format is timestamp E.g '2010-12-19 12:00:00 AM'.
    As per requriement(s) I customized the date format in Reports as 19-Dec-2010 and I saved it as "System Wide Default for <Date Column Name> "
    So, I got desired format in Reports and Date Prompts.
    Now, I need to set a default value in Date Prompt. So, in RPD I created a Session Variable which returned me date in
    DD-MON-YYYY format. Using follwing SQL :
    SELECT REPLACE(CONVERT(VARCHAR(11), Getdate (), 106), ' ', '-') AS [DD-Mon-YYYY]
    But in reports takes this value as string and not Datetime. So i got an error message.
    A datetime value was expected (received "19-Dec-2010").
    If i do not use above SQL to CONVERT date then default date in prompt get displayed as timestamp format and give me desired results but Formatting looks very odd in prompt
    Is this a way so I can persist the [DD-Mon-YYYY] Formatting for default value which comes using variable and still run the report.
    Above problem also exist vice versa that is if i SET that session variable and pass the datetime value to server. But there i guess I can use ToDate or some Casting in RPD column expression to handle that. Tell me if i am right ?
    Thanks
    Saurabh

    That almost works. I had to adjust the syntax to the following...and then there are other issues doing this.
    select cust_no, name,'@{session.currentUser}' from customersMy write-back SQL is this:
    UPDATE customers SET NAME='@{c1}',LAST_EDITED_BY='@{c2}' WHERE CUST_NO=@{c0}But I don't want to display the cust_no column to the user. So I hide it in the UI. But if I do that I get the below error during write-back. Apparently sometimes when you hide a column on a direct query (numeric maybe?) the value doesn't transfer over to the write-back. If that's the case, this won't work for me. Hmm...
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43093] An error occurred while processing the EXECUTE PHYSICAL statement. [nQSError: 17001] Oracle Error code: 936, message: ORA-00936: missing expression at OCI call OCIStmtExecute: UPDATE customers SET NAME='Wyatt Donnely',LAST_EDITED_BY='Administrator' WHERE CUST_NO= . [nQSError: 17011] SQL statement execution failed. (HY000)
    SQL Issued: EXECUTE PHYSICAL CONNECTION POOL dev1 UPDATE customers SET NAME='Wyatt Donnely',LAST_EDITED_BY='Administrator' WHERE CUST_NO=

  • How can we use Session Variable in Answers or Analysis?

    How can we use Session Variable in Answers or Analysis?

    Again, duplicate cross-posting!
    See rukbat 's post here: Re: BI Apps 7.9.6.3(Agent Issue)

  • Sticky using session variables

    Hello
    I was wondering if it is possible to stick a session to a server using session variables (such as username) Currently I am using cookies to keep the session sticky but i also need to use the session variables.
    Thanks
    Donagh

    Donagh,
    there is absolutely no reason to use both.
    If the name is more important, than use the name.
    If the cookie is more important, than use the cookie.
    If one is not more important than the other, then keep using the cookie.
    Another way to see it is :
    if the name and the cookie refer to the same server, it does not matter which one you use.
    But if they point to different servers.
    What do you do ?
    Which information do you use to select the server ?
    The name or the cookie ?
    As I said, there is no reason to use both.
    Unless if one is missing.
    But the problem is then to make sure it is always there.
    Is there any stickyness issue currently ?
    Gilles.

  • Need session variable after inserting a record.

    I have a page where I am setting up a new user.  After they enter their username, password, address etc. I am inserting the record when they press the commit button, then moving on to the next page.
    I have a session variable setup called user_name, which is also the name of the field in my table.
    My problem is that the value in my session variable goes away after inserting the record.  How do I retrieve the value of user_name?
    At the top of my 2nd page I have:
    <?php
         session_start();
         $_SESSION['user_name'] = $_POST['user_name'];
    ?>
    This gives me an index error.
    I also have session_start(); at the top of my first page.
    What am I doing wrong?
    Thanks.

    I figured it out by moving the variable assignment right before the redirect to the next page.

  • Using Session Variables for User Login - sometimes they don't persist... what am I doing wrong?

    Hi all,
    I'm running a site that requires user login.  I approached the building of this site as almost a complete newb to CF (and dynamic coding in general), and it's been a great learing experience (with lots of help from you guys).
    However, I guess I never learned the correct way to handle a user login.  It seemed to me that I could just test the user-entered credentials against those stored in a database, then set a session variable containg that user's record number.  Then, not only would I have an easy way of knowing who this user was and therefore what info to serve him, but I could test for the existence of a valid login on every page in the protected folder, by adding this code to my application.cfc in that folder:
    <cfset This.Sessionmanagement=true>
    <cfset This.Sessiontimeout="#createtimespan(0,8,0,0)#">
       <cfif NOT isDefined ("session.username") or NOT isDefined ("session.password") or NOT isDefined ("session.storeID")>
         <cflocation url="../index.cfm" addtoken="no">
       </cfif>
    ...and it goes on to run a query and verify that the session.username and session.password match for the store defined by session.storeID.  If not, all session variables are cleared and it bounces you back to the login page.  When the user clicks Logout, all I do is delete all the session variables.
    This seemed to work great for like a year, but lately I've been getting reports that the login doesn't seem to persist for longer than approx. 20 minutes of inactivity.  You can see I specified session variables to remain active for 8 hours (I know that seems like a drastically long login, but it's what's necessary for this application).  I've only gotten this report from a few people, and I myself can't seem to duplicate it... I've tested an inactive login for 45 minutes now and it held.
    SO:  any reason you can think of why session variables would be spontaneously clearing for some people?  Would having your router reset its IP address invalidate the session or something?  Also, the problem seemed to begin appearing after my host upgraded all their servers to CF9... could there be any relation?
    And on a more general note... did I go about this completely the wrong way to begin with?  If so, what's the standard way to manage a login?
    Lots of questions, I know... thanks very much for any answers or suggestions!
    Joe

    Ian,
    Thanks very much - very helpful information.
    Sounds like passing the tokens in every request is probably the way to go for this.  I don't think it's likely that any users will be sharing links, unless they actually intend for the recipient to see their info anyway.
    Is that all I would have to do, is add the tokens to every path?  Would that guarantee that all the session variables would remain valid until timeout or being cleared?
    Again, thanks, you've been really helpful.
    Joe
    On Jun 23, 2010 4:37 PM, Ian Skinner &lt;[email protected]&gt; wrote:
    Unfortunately this is the nature of HTTP web applications.  There is NO state maintained from HTTP request to request.  This is by design in the HTTP protocol specifications.
    ColdFusion provides two methods to circumvent this limitation.  Each method has limitations and caveats.  They both rely on the passing of tokens between the client and the server with every request.  These tokens can be passed as cookies OR URL (GET) variables.  You are using the cookie method, which is the simpler and most common. You may be experiencing the limitation of this method.  If something happens to the cookies the session can be lost.
    You could pass the (CFID &amp; CFTOKEN) OR JESSIONID tokens through the URL query string with every request.  This requires one to add these values to every link, form action, cflocation or other request path in our application.  ColdFusion provides the session.urltoken variable to make this easier to do.  The tokens will be visible to the user.  Also if the links with an individual token is share with other users, via e-mail, chat, social networks, etc and one of these users utilize the link during the life of a session (8 hours apparently in your case).  Then that user will access the session of the original user.
    Cookie session management is by far the most common choice by CF developers.  If these methods do not meet your needs you would need to go beyond the HTTP limitations of web applications.  One might be able to accomplish this with a Flex|Air|Flash applications that can be configured to use a continuous connection to the server.  Thus not suffer the stateless nature of the normal HTTP request-response cycle.
    I do not know if a router resetting would cause cookies to be discarded or otherwise invalidated.  But I would not think it is beyond the relm of possibilities.

  • How to default bind variable using session variable at run time

    Hi All,
    I have a requirement where all VO queries (multiple VOs) produce only records that meet a certain value.
    For example, I have three tables with 3 VOs and each of them has a one-to-many relationship to another table (let's call it ref table and this table has a field called release). One of the 3 VOs is a parent/master table, and the other two are child tables. I created a VO for master table that linked to the ref table and created a view criteria using the release (use bind variable) field from the ref table. The other child tables have their own VO that has view criteria that also linked to ref table using the release field.
    On the UI page, I created a query component and a table from the master table VO. I also dropped the child table VOs in a tabbed panel which partial triggered by the master table. When I ran a query for a 'release' (hint: ref table value), the table for master table was filled the correct records that meet the criteria. Unfortunately, the child tables were not correct due to the query didn't use the bind variable that filter only records for the same 'release' value as the master table.
    The question is how do I 'default' or dynamically set the bind variable on the child tables based on the selection criteria from the query component. I am thinking to set a session variable from the query and use it in the bind variable in the child table, but not sure how to do it.
    Any suggestion how to do it or better solution to achieve the same effect?

    Hi,
    How about creating a custom AMImpl method, that takes parameters as required, and set the bind variables for all the desired VOs and perform executeQuery on them.
    You could expose this as client interface, and then use the method as parameter form.
    Check this thread for ex.
    Re: Setting Attribute in View Object through Managed Bean
    -Arun

  • Alternate method to writing filter for recordset using session variable

    I'm not sure if this can be done.  I have a user page which I'd like to return database info based upon a userid entered on another page. So far, the session variable (userid) is captured on the user page however it is supposed to return the user's name rather than displaying the session variable.
    My problem is this. Within dreamweaver, I am able to create recordsets however I cannot create a filter. The connection works. At this point, I am searching for a workaround where I can tie in the session variable to recordsets. I should make mention that whenever I update the sql statement using the recordset widget, my recordset disappears. ?  At any rate, heres a sample of the code sans connection strings, etc.
    <%
    Dim Recordset1
    Dim Recordset1_cmd
    Dim Recordset1_numRows
    Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
    Recordset1_cmd.ActiveConnection = MM_newuniversity1_STRING
    Recordset1_cmd.CommandText = "SELECT name FROM table WHERE userid =  '" & Session("userid_my") & "'"
    Recordset1_cmd.Prepared = true
    Set Recordset1 = Recordset1_cmd.Execute
    Recordset1_numRows = 0
    %>
    On the user page, I have a 'Welcome' and the following code
    {Request.userid_my}
    Any suggestions? I'm afraid I'm a newbie to asp within dreamweaver cs3.

    >When I insert  request.userid_my code it returns the session variable
    AFAIK, session variables are not part of the request object - so I do not understand why you are referencing them this way. I would use the standard reference method : Welcome <%Response.Write(Session("username"))%>
    >when I insert the recordset associated with 'name' I get an Adobe End of file error. ?
    Sounds like a possible problem with your installation. You may need to try reinstalling DW. How are you "inserting" this recordset and when does the error occur?
    Regarding your next post...
    >select name from table_name where userid = '" & namemy & "'"
    >The statement consistently returns a 'quoted string not properly terminated' error.....
    The select statement you quoted is obviously not complete. If you are refering to the select in your OP:
    Recordset1_cmd.CommandText = "SELECT name FROM table WHERE userid =  '" & Session("userid_my") & "'"
    I see nothing wrong with that syntax and the string appears to be terminated correctly. If there is a different statement causing the error, please post the entire line and include a line above and below.

  • Need Help With Redirect That Uses Session Variable

    I am new to dynamic sites, php, and developer toolbox, but I have been able to create a login site using the different form wizards fairly easily (in CS3 with Developers toolbox).
    <br />
    <br />I am trying to set a server behavior on a page that redirects the user to a new page if a session variable matches a recordset.
    <br />
    <br />I was using an extension (PHP Sessions - http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&amp;extid=681308 ) that worked great, but when I installed developers toolbox, it stopped working (get error message about runtime/MX environment).
    <br />
    <br />Ive been struggling for days and this is what Ive come up with so far:
    <br />------------------------------------
    <br />session_start();
    <br />if (!isset($HTTP_SESSION_VARS[$_SESSION['kt_firstname']]) || $HTTP_SESSION_VARS[$_SESSION['kt_firstname']] = $row_Recordsetfname['firstname']) {
    <br /> header ("Location: ../firstname/firstname1.php");
    <br />}
    <br />------------------------------------
    <br />
    <br />It redirects regardless of the match. Any ideas on what I can do to get this working? Here is all of the code (with block from above inserted) up until the doc type:
    <br />------------------------------------
    <br /><?php require_once('../Connections/project1.php'); ?>
    <br /><?php<br />// Load the tNG classes<br />require_once('../includes/tng/tNG.inc.php');<br /><br />// Make unified connection variable<br />$conn_project1 = new KT_connection($project1, $database_project1);<br /><br />//Start Restrict Access To Page<br />$restrict = new tNG_RestrictAccess($conn_project1, "../");<br />//Grand Levels: Any<br />$restrict->Execute();<br />//End Restrict Access To Page<br /><br />if (!function_exists("GetSQLValueString")) {<br />function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") <br />{<br />  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;<br /><br />  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);<br /><br />  switch ($theType) {<br />    case "text":<br />      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";<br />      break;    <br />    case "long":<br />    case "int":<br />      $theValue = ($theValue != "") ? intval($theValue) : "NULL";<br />      break;<br />    case "double":<br />      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";<br />      break;<br />    case "date":<br />      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";<br />      break;<br />    case "defined":<br />      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;<br />      break;<br />  }<br />  return $theValue;<br />}<br />}<br /><br />// FELIXONE - 2002   SB by Felice Di Stefano - www.felixone.it<br />session_start();<br />if (!isset($HTTP_SESSION_VARS[$_SESSION['kt_firstname']]) || $HTTP_SESSION_VARS[$_SESSION['kt_firstname']] = $row_Recordsetfname['firstname']) {<br />  header ("Location: ../firstname/firstname1.php");<br />}<br /><br />$colname_Recordsetfname = "-1";<br />if (isset($_SESSION['kt_user_name'])) {<br />  $colname_Recordsetfname = $_SESSION['kt_user_name'];<br />}<br />mysql_select_db($database_project1, $project1);<br />$query_Recordsetfname = sprintf("SELECT firstname FROM registration WHERE user_name = %s", GetSQLValueString($colname_Recordsetfname, "text"));<br />$Recordsetfname = mysql_query($query_Recordsetfname, $project1) or die(mysql_error());<br />$row_Recordsetfname = mysql_fetch_assoc($Recordsetfname);<br />$totalRows_Recordsetfname = mysql_num_rows($Recordsetfname);<br /><br />$colname_Recordset1 = "-1";<br />if (isset($_SESSION['kt_user_name'])) {<br />  $colname_Recordset1 = $_SESSION['kt_user_name'];<br />}<br />mysql_select_db($database_project1, $project1);<br />$query_Recordset1 = sprintf("SELECT `Date` FROM registration WHERE user_name = %s", GetSQLValueString($colname_Recordset1, "text"));<br />$Recordset1 = mysql_query($query_Recordset1, $project1) or die(mysql_error());<br />$row_Recordset1 = mysql_fetch_assoc($Recordset1);<br />$totalRows_Recordset1 = mysql_num_rows($Recordset1);<br />?>
    <br />
    <br />------------------------------

    I am new to adobe toolbox... I ve created a ligin page but not sure how to pass the session variable. I am trying to direct successful login to a page like... index.php?id=filter
    <br />
    <br />been struggling all day with this. Please help!!!
    <br />
    <br /><?php require_once('Connections/comm.php'); ?>
    <br /><?php<br />// Load the common classes<br />require_once('includes/common/KT_common.php');<br /><br />// Load the tNG classes<br />require_once('includes/tng/tNG.inc.php');<br /><br />// Make a transaction dispatcher instance<br />$tNGs = new tNG_dispatcher("");<br /><br />// Make unified connection variable<br />$conn_comm = new KT_connection($comm, $database_comm);<br /><br />// Start trigger<br />$formValidation = new tNG_FormValidation();<br />$formValidation->addField("kt_login_user", true, "text", "", "", "", "");<br />$formValidation->addField("kt_login_password", true, "text", "", "", "", "");<br />$tNGs->prepareValidation($formValidation);<br />// End trigger<br /><br />// Make a login transaction instance<br />$loginTransaction = new tNG_login($conn_comm);<br />$tNGs->addTransaction($loginTransaction);<br />// Register triggers<br />$loginTransaction->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "kt_login1");<br />$loginTransaction->registerTrigger("BEFORE", "Trigger_Default_FormValidation", 10, $formValidation);<br />$loginTransaction->registerTrigger("END", "Trigger_Default_Redirect", 99, "{kt_login_redirect}");<br />// Add columns<br />$loginTransaction->addColumn("kt_login_user", "STRING_TYPE", "POST", "kt_login_user");<br />$loginTransaction->addColumn("kt_login_password", "STRING_TYPE", "POST", "kt_login_password");<br />$loginTransaction->addColumn("kt_login_rememberme", "CHECKBOX_1_0_TYPE", "POST", "kt_login_rememberme", "0");<br />// End of login transaction instance<br /><br />// Execute all the registered transactions<br />$tNGs->executeTransactions();<br /><br />// Get the transaction recordset<br />$rscustom = $tNGs->getRecordset("custom");<br />$row_rscustom = mysql_fetch_assoc($rscustom);<br />$totalRows_rscustom = mysql_num_rows($rscustom);<br /><br />?>
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <script src="includes/common/js/base.js" type="text/javascript"></script>
    <br />
    <script src="includes/common/js/utility.js" type="text/javascript"></script>
    <br />
    <script src="includes/skins/style.js" type="text/javascript"></script>
    <br /><?php echo $tNGs->displayValidationRules();?>
    <br />
    <br />
    <br />
    <br /><?php<br /> echo $tNGs->getLoginMsg();<br />?>
    <br /><?php<br /> echo $tNGs->getErrorMsg();<br />?>
    <br />
    <form method="post" id="form1" class="KT_tngformerror" action="%3C?php%20echo%20KT_escapeAttribute(KT_getFullUri());%20?%3E">
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <table cellpadding="2" cellspacing="0" class="KT_tngtable">
    <tr>
    <td class="KT_th">
    <label for="kt_login_user">Username:</label>
    </td>
    <td>
    <input type="text" name="kt_login_user" id="kt_login_user" value="<?php echo KT_escapeAttribute($row_rscustom['kt_login_user']); ?>" size="32" />
    <br /> <?php echo $tNGs->displayFieldHint("kt_login_user");?> <?php echo $tNGs->displayFieldError("custom", "kt_login_user"); ?></td>
    </tr>
    <tr>
    <td class="KT_th">
    <label for="kt_login_password">Password:</label>
    </td>
    <td>
    <input type="password" name="kt_login_password" id="kt_login_password" value="" size="32" />
    <br /> <?php echo $tNGs->displayFieldHint("kt_login_password");?> <?php echo $tNGs->displayFieldError("custom", "kt_login_password"); ?></td>
    </tr>
    <tr>
    <td class="KT_th">
    <label for="kt_login_rememberme">Remember me:</label>
    </td>
    <td>
    <input <?php if (!(strcmp(KT_escapeAttribute($row_rscustom['kt_login_rememberme']),"1"))) {echo "checked";} ?> type="checkbox" name="kt_login_rememberme" id="kt_login_rememberme" value="1" />
    <br /> <?php echo $tNGs->displayFieldError("custom", "kt_login_rememberme"); ?></td>
    </tr>
    <tr class="KT_buttons">
    <td colspan="2">
    <input type="submit" name="kt_login1" id="kt_login1" value="Login" />
    <br /></td>
    </tr>
    </table>
    <br />
    <a href="forgot_password.php">Forgot your password?</a>
    <br /></form>
    <br />
    <p>&#160;</p>
    <br />
    <br />

  • PHP URL Variable from Insert Record Issue

    I have a very simplistic forum style website I have put together. Everything is functionally properly except for one aspect. The basic structure is a page that lists the existing threads (ie: ThreadA, ThreadB, and ThreadC). I have the name of these threads stored in a MySQL database table that is used to generate a repeating dynamic table to grow as the number of threads increases. If the user clicks on one of these links they are taken to a page that displays all of the comments pertaining to that thread. All of the comments are stored in another MySQL database table. I perform a query on this comments page to filter the information in the comments database by the thread name which is passed over from the first page via a URL variable. The link attached to the name of the thread in the repeating table that generates the URL variable is "comments.php?thread=<?php echo $row_threads['threadName']; ?>" This works perfectly, If the user clicks on ThreadB they are taken to the comments page where only the comments pertaining to ThreadB have been filtered and displayed. After the user inserts a comment form ThreadB the comments page reloads displaying the newly created comment.
    Also, on the first page, the user has the option to create a new thread; call it ThreadD. The name of this new thread has to be inserted into two tables; one in the master threads table and one in the comments page any time someone adds a comment. (I'm sure there is a better way to structure this, but this was all I could figure out and for my purposes at hand it is sufficient). When the user is taken to this new comment page I have a query set up to pull the last entry in the threads table from the logged in user, ie the newly created thread topic. I have dragged this query to the page to make sure it is pulling the correct thread heading, and it works just fine. What I'm wanting to have happen is after the user enters the first comment I'm wanting them to be redirected to the main comments page with their new comment listed; giving the illusion that the new comment and existing comments page are the same. I'm trying to pass the newly created thread name, ThreadD, in the URL to the main comments page just like I do if they select it from the existing threads page. Under the insert record wizard I click the 'browse' button to select the comments.php page. I then select 'parameters' to add the thread name query as the URL parameter. The generated code is "comments.php?thread=" . $row_threadName['threadName'] . "". The user does go to the main comments page but the URL variable is not coming with it. What I'm left with in the address bar is ..."/comments.php?thread=&" , but it should be ..."comments.php?thread=ThreadD". I tried copying and pasting the URL link from the existing threads page since that works perfectly, and when I do that the main comments page shows up blank after being redirected from the new comments page. If I hard code this, for testing purposes, into the redirect after insertion section (ie: "comments.php?thread=ThreadD") everything works perfectly and the URL in the address bar of the main comments page is "...comments.php?thread=ThreadD&" I noticed the extra "&", but didn't give it much thought since the site is giving me the behavior I'm looking for. My question is, how do I get this new comment page to pass the variable of the newly created thread name to the main comments page to behave like it does when the thread is selected from the list of existing threads? I know it has to do with how the URL variable is either being generated or built from my query, or how I have it listed in the redirect section of the insert wizard, but I can't figure out where I am going wrong. Please let me know if there are any questions or if I need to clarify any aspect. Any and all help is always appreciated. Thank you.

    Ok, so just to summarize so I am understanding this correctly.  You have an ordering page for tires/wheels.  A customer places an order for tires/wheels and the data is submitted successfully and this includes a symbol for measurement (in.).  But on another summary page the symbol is returning a blank value.
    If this is correct we need to see:
    - First, the code that is inserting the symbol to the database table in question
    - Second, the query and code where you are printing the data to the screen.

  • Can i use session variable VALUEOF(NQ_SESSION.USER) in write back report?

    Hi All,
    I have created a write back report and successfully inserted records into a table.
    Now i want to capture the user who has inserted in to the table.
    Till now i have given edit option to the users on USERNAME column.
    But now i want to capture the user automatically.
    when i user VALUEOF(NQ_SESSION.USER), i can capture the Logged in user in USERNAME col and the moment i execute the report it is throwing an error.
    What i observed is....
    In the advanced tab USERNAME col is changed to VALUEOF(NQ_SESSION.USER).
    is there any workaround for this?
    Thanks

    >>I have a session variable assigned to the ID#(auto
    number in access db) of messages posted.
    I not sure if I follow your in the description. I would
    assign the Record ID to the session variable.
    Place the Record id in the repeat region.
    Then you could assign that record id to a session variable
    when the button is click, capture the button click event. Then
    redirect to the EMPLOYEEMessageDELETE1.asp page, which will read in
    the session variable (record id) to be deleted.
    David Pearson

Maybe you are looking for

  • Compaq Presario V6000 in System Disabled

    Hi!I have a problem with my laptop since 3weeks ago....And i tried to logged in for 3 attempts it says "system disabled"but i knew my password....Have any solutions to fix this?thanks....

  • Don't use the Software Update in Preferences - download the Combo Updater !

    Software Update failed and I had to archive/install back to 10.5 - just download the Combo Updater and you should be ok.

  • Cannon't create datasource

    I go to add a datasource into Coldfusion Administrator and I get a weird error. which is this error. com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Gi

  • Account accessed by someone that is not authorised

    Hi all, I am just wondering if there is anything I can do to stop people accessing my account now that I have been hacked. Last night my password and phone number were changed by someone other than myself. Even my language preference was changed. I h

  • Help with PHP syntax

    Hope someone can help out again with a bit of syntax. I have a bit of code that acts a little loop displaying records from a table : PHP Code: <?php       $groups = array();  while ($row = mysql_fetch_assoc($rs2011nominees)) {      $groups[$row['Alph