Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Add New Record - works on my machine, but not for my client

Enthusiast ,
Oct 06, 2010 Oct 06, 2010

This is odd - I basically have a page to add a database record, which as far as I know worked just as it should.

But my client is saying it doesn't work on her machine - apparently when she hits 'add record' instead of going to the page confirming the record has been added, its just reloading a blank form on the add record page.

I've just double checked on my machine, and it definitely works for me.

She's definitely using the correct the URL.

Its just using mySQL / PHP / phpMyAdmin

Is there any reason at all that this should be the case, or any ideas what is causing it and what a solution might be?

Thanks.

TOPICS
Server side applications
677
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 06, 2010 Oct 06, 2010

Despite how much fun it is to shoot theories in the dark it's obviously easier to spot a problem when you supply the page code!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 06, 2010 Oct 06, 2010

Touche!

The code is ADDT code for adding a record (I've now posted in that forum too.)

// Make an insert transaction instance

$ins_clients = new tNG_insert($conn_connLinguistica);

$tNGs->addTransaction($ins_clients);

// Register triggers

$ins_clients->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Insert1");

$ins_clients->registerTrigger("BEFORE", "Trigger_Default_FormValidation", 10, $formValidation);

$ins_clients->registerTrigger("END", "Trigger_Default_Redirect", 99, "clientAdded.php");

// Add columns

$ins_clients->setTable("clients");

$ins_clients->addColumn("name", "STRING_TYPE", "POST", "name");

$ins_clients->addColumn("company", "STRING_TYPE", "POST", "company");

$ins_clients->addColumn("website", "STRING_TYPE", "POST", "website");

$ins_clients->addColumn("tel", "STRING_TYPE", "POST", "tel");

$ins_clients->addColumn("mobile", "STRING_TYPE", "POST", "mobile");

$ins_clients->addColumn("email", "STRING_TYPE", "POST", "email");

$ins_clients->addColumn("enquirydate", "STRING_TYPE", "POST", "enquirydate");

$ins_clients->addColumn("business", "STRING_TYPE", "POST", "business");

$ins_clients->addColumn("future", "STRING_TYPE", "POST", "future");

$ins_clients->addColumn("potential", "STRING_TYPE", "POST", "potential");

$ins_clients->addColumn("callback", "STRING_TYPE", "POST", "callback");

$ins_clients->addColumn("notes", "STRING_TYPE", "POST", "notes");

$ins_clients->setPrimaryKey("clientID", "NUMERIC_TYPE");

// Execute all the registered transactions

$tNGs->executeTransactions();

// Get the transaction recordset

$rsclients = $tNGs->getRecordset("clients");

$row_rsclients = mysql_fetch_assoc($rsclients);

$totalRows_rsclients = mysql_num_rows($rsclients);

?>

And the form action line is :

<form method="post" id="form1" action="<?php echo KT_escapeAttribute(KT_getFullUri()); ?>">

Although I wondered if it actually is the code, as the code works fine for me, on three different machines....

Have done this plenty of times before, but not had this issue before.

Again, surely it should work, or not work, rather than be picky about which machines it works on and doesn't

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 06, 2010 Oct 06, 2010

I wondered if it actually is the code, as the code works fine for me, on three different machines....

Again, surely it should work, or not work, rather than be picky about which machines it works on and doesn't

If your database is setup locally on the three machines it's working on then it will work on them but not others that don't have the local database setup. Any other unmentioned contributing factor may cause the issue you're describing. Details matter; a lack of which results in speculation.

Form validation on the page? Perhaps the user is not completing all the form fields which is resulting in a reload of the same page. You may not have validation messages on your page so the user does not know why the form page is being reloaded without database insertion. These are all shots in the dark here due to lack of details.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 06, 2010 Oct 06, 2010

You're right, of course, and I appreciate you taking the time to look.

It does just seem an odd one though.

The database sits on regular third party hosting, and the connection is by way of a standard Dreamweaver created PHP include file :

<?php

# FileName="Connection_php_mysql.htm"

# Type="MYSQL"

# HTTP="true"

$hostname_connLinguistica = "localhost";

$database_connLinguistica = "database_name";

$username_connLinguistica = "username";

$password_connLinguistica = "password";

$connLinguistica = mysql_pconnect($hostname_connLinguistica, $username_connLinguistica, $password_connLinguistica) or trigger_error(mysql_error(),E_USER_ERROR);

?>

There is validation, but there should be messages.

Its currently in a password protected folder, but I'll remove the password and make it public..... two mins.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 06, 2010 Oct 06, 2010

OK - the page is here -

http://www.linguistica-international.com/admin/addClient.php

Can you maybe try adding something quickly, and see what happens?

Thanks.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 06, 2010 Oct 06, 2010
LATEST

Well, apparently its working for her now in Firefox, so looks like it may have something to do with IE8. I noticed on her screenshot there was something called Internet | Protected Mode : On - so maybe that's being over zealous in some way.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines