FORUMS


The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error Message
#1
Hi,

Can anyone tell me what this error message means?

ft_get_form, failed query: Unknown column 'cf.user_id' in 'where clause'

Thanks

Devern
Reply
#2
Hi Devern,

It means the syntax of the SQL query to retrieve the form information is invalid. When does this occur - where do you see it happening? In the core script or in your own custom SQL?

- Ben
Reply
#3
(Jul 20th, 2010, 3:22 PM)Ben Wrote: Hi Devern,

It means the syntax of the SQL query to retrieve the form information is invalid. When does this occur - where do you see it happening? In the core script or in your own custom SQL?

- Ben

Thanks again Ben,

OK, one last thing.

First, I put everything back the way it was previously. If you remember I mentioned that this site was up before and running fine. I am trying to get it back up without the luxury of the previous webmaster.

Anyway, the forms work fine and do all the things they're supposed to (i.e. verify email address, verify all required boxes are filled in, etc.)

My problem is when I go to the admin (the form tools folder was renamed admin), The page is blank. What would cause this? The url is http://www.lmpassports.com/admin. I changed the config.php to the correct info. It looks like this :

Code:
<?php

// main program paths - no trailing slashes
$g_root_url = "http://www.lmpassports.com/admin";
$g_root_dir = "*******";

// database settings
$g_db_hostname = "*******";
$g_db_name     = "*******";
$g_db_username = "*******";
$g_db_password = "******";
$g_table_prefix = "ft_";
$g_db_ssl = true

?>

I am assuming there is some sort of error in the index.php in the admin folder. It looks like this:

Code:
<?php



session_start();

header("Cache-control: private");



// pull in relevant libraries

require("_index.php");



?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title><?php echo $g_title; ?> - Administration</title>
<?php



if (!empty($g_user_id))

  echo "<style type='text/css'>$g_css</style>";

else

  echo '<link type="text/css" rel="stylesheet" href="global/admin_styles.css">';



?>



</head>

<body onLoad="document.login.username.focus();">



<table width='100%' height="100%" border='0' cellpadding='0' cellspacing='0'>

<tr>

  <td width='200' height="60" valign='center' align='center'><img src="images/logos/<?php echo $g_logo; ?>" /></td>

  <td class="top_banner"></td>

</tr>

<tr>

  <td class="top_row_left" height='18'>&nbsp;</td>

  <td class="top_row_right">&nbsp;</td>

</tr>

<tr>

  <td class="left_column">&nbsp;</td>

  <td bgcolor="white" valign="top" style="padding: 20px;">



  <table>

  <tr>

    <td>



    <p class="title"><?php echo strtoupper($g_title)?> ADMINISTRATION</p>



    <p class="common_width">

      Please log in below to access the <?php echo $g_title?> Administration Panel. If you have

      forgotten your password, just <a href="forget_password.php<?php echo $g_query_params; ?>">click here</a>.

    </p>



    <form name="login" action='<?php echo "{$_SERVER['PHP_SELF']}{$g_query_params}"?>' method="post">

    

    <?php if ($is_upgraded) { ?>

    <div class="notify">

      Your installation of has been upgraded to <?php echo $settings['program_version']; ?>.

    </div>

    <br />



    <?php } ?>

  

    <table width="300" cellpadding="1" class="login_outer_table">

    <tr>

      <td colspan="1">



      <table width="100%" cellpadding="0" cellspacing="1" class="login_inner_table">

      <tr>

        <td colspan="2">&nbsp;</td>

      </tr>

      <tr>

      <td>



      <table width="200" cellpadding="0" cellspacing="1">

      <tr>

        <td class="login_table_text">Username</td>

        <td><input type="textbox" size="25" name="username" value="<?php echo stripslashes($username)?>"></td>

      </tr>

      <tr>  

        <td class="login_table_text">Password</td>

        <td><input type="password" size="25" name="password" value="<?php echo $password?>"></td>

      </tr>

      </table>



      </td>

      <td align='center'>

        <script type="text/javascript">

        <!--

        document.write('<input type="submit" value="LOG IN">&nbsp;');

        -->

        </script>

      </td>

      </tr>

      <tr>

      <td colspan="2">&nbsp;</td>

      </tr>

      </table>

    

      </td>

    </tr>



<?php

if (!empty($error))

{

  echo "<tr>\n"

     . "<td colspan='3' class='login_error'>$error</td>\n"

     . "</tr>\n";

}

?>    

      

    </table>

    

    </form>



  </td></tr>

  </table>



  <noscript>



    <br />

    <div class="error" style="margin:3px;">

      In order to login and use Form Tools, you must have javascript enabled

      in your browser. Please enable it now, and click refresh in your browser.

    </div>



  </noscript>

</td>

</tr>

<tr>

  <td colspan='4' class="footer">

    <?php echo $g_footer?>

  </td>

</tr>

</table>



</body>

</html>

What am I doing wrong? Again this worked perfectly, but ever since I changed hosts, I've been having problems.

I don't know what else to do.

HELP!!
Reply
#4
Heya,

Ah! In your config file, the last line needs a semicolon at the end of the line:

PHP Code:
$g_db_ssl true

That may well fix it...

- Ben
Reply
#5
(Jul 21st, 2010, 12:54 PM)Ben Wrote: Heya,

Ah! In your config file, the last line needs a semicolon at the end of the line:

PHP Code:
$g_db_ssl true

That may well fix it...

- Ben

Thanks Ben,

Unfortunately, that didn't fix it. Do you see any other errors?

Devern
Reply
#6
Hmm... no, the page looks fine. Could you post _index.php?

- Ben
Reply
#7
(Jul 22nd, 2010, 9:55 AM)Ben Wrote: Hmm... no, the page looks fine. Could you post _index.php?

- Ben

Sure, it looks like this:

<?php



require_once("global/library.php");



// verify setup

ft_verify_setup();

$is_upgraded = ft_upgrade_form_tools();



// default settings

$g_logo = "logo_1.gif";

$g_user_id = "";

$g_css = "";

$g_query_params = "";



$settings = ft_get_settings();

$g_title = $settings['program_name'];

$g_footer = "";



// if an user id is included in the query string, use it to determine the appearance of the

// interface - including logo and footer

if (isset($_GET['id']) && !empty($_GET['id']))

{

$info = ft_get_account_info($_GET['id']);



if (!empty($info))

{

$g_user_id = $_GET['id'];

$g_css = $info['css'];

$g_logo = $info['logo'];

$g_footer = $info['footer_text'];

$g_title = $info['page_titles'];

}



$g_query_params = "?id=$g_user_id";

}



if (isset($_POST['username']) && !empty($_POST['username']))

$error = ft_login($_POST);



$username = (isset($_POST["username"]) && !empty($_POST["username"])) ? $_POST["username"] : "";

$password = (isset($_POST["password"]) && !empty($_POST["password"])) ? $_POST["password"] : "";



?>
Reply
#8
This is especially designed for finding the error mistakes and resolve them like you have used the wrong syntax. In spite of help with dissertation it is used to gives us the syntax's of all the topics that we implement in it.
Reply
#9
It means your query is not correct or also shows the mistake in error, this is a basic thing and if you can't understand the basics then you do not become a good programmer. If I don’t understand the basic writing rules then I can’t become a team member of college essay writers or mistaken I will be become part then not a good writer.
Reply
#10
I hope that it doesnt disappoint me as much as this one.   Check out  one of the most played games on smartphone but also have a pc version now.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)