tundefajem's Profile User Rating: -----

Reputation: 0 Apprentice
New Members
Active Posts:
8 (0.01 per day)
26-June 12
Profile Views:
Last Active:
User is offline Jun 29 2012 12:30 AM

Previous Fields

Dream Kudos:
Icon   tundefajem has not set their status

Posts I've Made

  1. In Topic: linkage ofcgi.script_name to index.cfm

    Posted 29 Jun 2012

    Mr. Craig, Good morning,
    Please, help me check this codes, it is not performing any validation, I don't know what is wrong. these are the codes:

    For Application.cfm
     <cfcomponent output="false">
      <cfset THIS.name = "Myapp">
      <cfset THIS.sessionmanagement="yes">
     <CFparam name="application.datasource" default="blog">
      <cffunction name="onApplicationstart" returntype="void" output="false">
      <cfset APPLICATION.datasource="blog">
      <cffunction name="onRequeststart" returntype="void" output="false">
      <cfif not isdefined("session.auth.isloggedin")>
      <cfif isdefined("form.username")>
      <cfinclude template="login_process.cfm">
      <cfinclude template="login.cfm">

    For the login_process.cfm
    <cfquery name="getusers" datasource="#APPLICATION.datasource#">
    SELECT userid,username,userpass
    FROM users
    WHERE username=<cfqueryparam value="#form.username#" cfsqltype="cf_sql_varchar"> and 
    	userpass=<cfqueryparam value="#form.userpass#" cfsqltype="cf_sql_varchar">
     <cfif getusers.recordcount eq 1>
     <cfset session.auth=structnew()>
     <cfset session.auth.isloggedin="yes">
     <cfset session.auth.userid=getusers.userid>
     <cfset session.auth.username=getusers.username>
     <cflocation url="index.cfm">

    For the login.cfm:
    <cfif isdefined("form.username")>
    <cfinclude template="login_process.cfm">
    <body onload="document.login.username.focus();">
    <cfform action="index.cfm" method="post">
    <input type="hidden" name="username_required" />
    <input type="hidden" name="userpass_required" />
    <table align="center" bgcolor="##999999">
     <th colspan="2">
      <font size="+3">LOG IN </font><br />
      If you have a log in account before, log in here:
    <td align="left">User Name :</td>
    <cfinput type="text" 
     <td align="left">Password :</td>
    <cfinput type="password" name="userpass" size="30" maxlength="30">
     <td colspan="2" align="center">
     <cfinput name="loginuser" type="submit" value="Log in" align="middle">
     <td colspan="2">
        If you are a New User <a href="newaccount.cfm">create an account here</a>.

    Now the index.cfm:
    <table align="center" height="60px" width="880px" bgcolor="##CC6633">
      <td align="right"><a href="http://tundefajem.blogspot.com/feeds/posts/default"><h3> Subscribe to Rss</h3></a></td>
      <td><img src="images/rss.png" /></td>
      <br />
      <table align="center" height="90px" width="880px" bgcolor="##cc6633">
      <td><font size="+3" face="Trebuchet MS, Arial, Helvetica, sans-serif"><b>Inspirez:</b> Borne out of The Desire to Change this generation through positive thinkin'</font></td>
      <td align="right">
     <form method="get" action="http://www.google.com/search">
    <input type="text"   name="q" size="31"
     maxlength="255" value="" />
    <input type="submit" value="Go" />
      <br />
      <table align="center" width="880px" height="600px">
      <td width="550px" height="650px" bgcolor="##FFFFFF"></td>
      <td align="right" width="330px" height="650px" bgcolor="##cc6633"></td>
       <table align="center" height="30px" width="880px" bgcolor="##CC6633">
        <td><i>&copy; All rights reserved. &nbsp;&nbsp;<b>Inspirez</b></i></td>

    Then can I use URLEncodedformat for securing my URL?

    Thank you.
  2. In Topic: linkage ofcgi.script_name to index.cfm

    Posted 27 Jun 2012

    I am most grateful for your tutelage,I am not regretting it for joining this forum, you are a mentor.
    Please,I know I can not have more than enough security to protect my application, can you help give an example with how i can combine a URL security with what you just taught me? Then are there other security measures i can be using in protecting my applications. Please, help me discuss with examples as i will understand better through this.
    Then, in the area of cfif,can you help in giving areas i can really tighten my security, like

    <cfif (form.username) and (form.password) gt 1>
    You already have an account

    please, is this code snippet right? what other validations can i use the if statement for?
    I am really grateful.
    Thank you.
  3. In Topic: linkage ofcgi.script_name to index.cfm

    Posted 27 Jun 2012

    Thank you so much,i thought the cgi scope will make a more secured application as I am looking for better ways to make a secured application.I am using my phone to reply u and it makes typing cumbersome,that was why I didn't include the query.
    Here is the query:
    <Cfquery name="getuser" datasource="validate">
    SELECT userid,username
    FROM user
    WHERE username='form.username'

    You made mention of cfqueryparam, how is it used?
  4. In Topic: linkage ofcgi.script_name to index.cfm

    Posted 27 Jun 2012

    Those are the codes, please, can you explain how this CGI

    View Posttundefajem, on 27 June 2012 - 01:41 AM, said:

    Those are the codes, please, can you explain how this CGI works especially pertaining the area of scripting and validation. I have been checking some tutorials but don't seem to be getting it properly. Thanks
  5. In Topic: linkage ofcgi.script_name to index.cfm

    Posted 26 Jun 2012

    View Posttundefajem, on 26 June 2012 - 09:46 AM, said:

    View PostCraig328, on 26 June 2012 - 09:24 AM, said:

    Why don't you go ahead and post your login and login_process page code here and we'll see what's going on.

    Please remember to use the CODE tags when posting your code.

    I made an application.cfm
    For my login:
    <Cfif isdefined("form.username")>
    <Cfinclude template="login_process.cfm">
    <Cfform action="#cgi.script_name#?#cgi.query_string#" name="login" method="post">
    <Cfinput type="text name="username">
    <Cfinput type="password" name="password">
    <Cfinput type="submit" value="submit">
    <Cfif isdefined("form.username") and isdefined("form.password")>
    <Cflocation url="index.cfm">

    <Cfparam name="username" type="string">
    <Cfparam name="password" type="string">
    <Cfif query.recordcount is 1>
    <Cfset session.auth.isloggedin="yes">
    <Cfset session.auth.userid=query.userid>
    <Cflocation url="#cgi.script_name#?#cgi.query_string#">

My Information

Member Title:
New D.I.C Head
Age Unknown
Birthday Unknown

Contact Information

Click here to e-mail me


tundefajem hasn't added any friends yet.


tundefajem has no profile comments yet. Why not say hello?