Internal Server Error - updating data types

Issues related to forms.
Post Reply
BethlehemOffice
 
 
Posts: 23
Joined: Wed Sep 06, 2017 3:08 pm

Internal Server Error - updating data types

Post by BethlehemOffice » Mon Oct 22, 2018 4:20 pm

My user form was working and now it's not. I was working on changing some data types so I'm assuming somewhere I have a mis-match.

Using MySQL.

Is there an easy way to see the data types from within WYSIWYG for all the fields on a form instead of going into the properties field on each one? Or have the page return the field(s) that is mis-matching?

If you want to visit the page - here is the log in page http://bethlehemvinton.org/Testing/Members.php
and here's the form - http://bethlehemvinton.org/Testing/ProfileInfo.php
UN - 111Test
PW - Stopitnow123
There's no real data in there now so I'm not worried about security.

I did not change anything on the log in form or those fields. After signing in and manually navigating to a protected page I can visit that page so log in actually works just not the jump/profile page. So it has to be when it's trying to load the profile page and the server can't reconcile the data????

I may be updating the pages so you may get a different jump to page than profileinfo just so I can test some other functionality instead of waiting to get this fixed.

User avatar
Pablo
 
Posts: 14503
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Internal Server Error - updating data types

Post by Pablo » Mon Oct 22, 2018 4:55 pm

"Internal Server Error" usually means that there is an error in the settings.
What is the PHP code of the page (Page->Page HTML)?

BethlehemOffice
 
 
Posts: 23
Joined: Wed Sep 06, 2017 3:08 pm

Re: Internal Server Error - updating data types

Post by BethlehemOffice » Mon Oct 22, 2018 5:26 pm

From the profile page?

It's a lot of php code so I just put it on a webpage - http://bethlehemvinton.org/Testing/BLECphpcode.html That appears as the first thing on the page.

Then there's this script in the <head> section of the page which is where I think the error actually resides. I can remove the validation requirements if that's the issue.

Code: Select all

<script>   
   function Validateeditprofileform()
   {
      var regexp;
      var Editbox4 = document.getElementById('Editbox4');
      if (!(Editbox4.disabled || Editbox4.style.display === 'none' || Editbox4.style.visibility === 'hidden'))
      {
         regexp = /^[A-Za-zÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ]*$/;
         if (!regexp.test(Editbox4.value))
         {
            alert("You must enter the 2 letter state abbreviation");
            Editbox4.focus();
            return false;
         }
         if (Editbox4.value == "")
         {
            alert("You must enter the 2 letter state abbreviation");
            Editbox4.focus();
            return false;
         }
         if (Editbox4.value.length > 2)
         {
            alert("You must enter the 2 letter state abbreviation");
            Editbox4.focus();
            return false;
         }
      }
      var Editbox5 = document.getElementById('Editbox5');
      if (!(Editbox5.disabled || Editbox5.style.display === 'none' || Editbox5.style.visibility === 'hidden'))
      {
         regexp = /^[-+]?\d*\.?\d*$/;
         if (!regexp.test(Editbox5.value))
         {
            alert("Please enter the 5 digit zip code");
            Editbox5.focus();
            return false;
         }
         if (Editbox5.value == "")
         {
            alert("Please enter the 5 digit zip code");
            Editbox5.focus();
            return false;
         }
         if (Editbox5.value.length < 5)
         {
            alert("Please enter the 5 digit zip code");
            Editbox5.focus();
            return false;
         }
         if (Editbox5.value.length > 5)
         {
            alert("Please enter the 5 digit zip code");
            Editbox5.focus();
            return false;
         }
      }
      var Editbox8 = document.getElementById('Editbox8');
      if (!(Editbox8.disabled || Editbox8.style.display === 'none' || Editbox8.style.visibility === 'hidden'))
      {
         regexp = /^[A-Za-zÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ]*$/;
         if (Editbox8.value.length != 0 && !regexp.test(Editbox8.value))
         {
            alert("Please enter a valid city");
            Editbox8.focus();
            return false;
         }
      }
      var Editbox9 = document.getElementById('Editbox9');
      if (!(Editbox9.disabled || Editbox9.style.display === 'none' || Editbox9.style.visibility === 'hidden'))
      {
         regexp = /^[A-Za-zÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ]*$/;
         if (!regexp.test(Editbox9.value))
         {
            alert("Please enter the 2 letter state abbreviation");
            Editbox9.focus();
            return false;
         }
         if (Editbox9.value == "")
         {
            alert("Please enter the 2 letter state abbreviation");
            Editbox9.focus();
            return false;
         }
         if (Editbox9.value.length < 2)
         {
            alert("Please enter the 2 letter state abbreviation");
            Editbox9.focus();
            return false;
         }
         if (Editbox9.value.length > 2)
         {
            alert("Please enter the 2 letter state abbreviation");
            Editbox9.focus();
            return false;
         }
      }
      var Editbox10 = document.getElementById('Editbox10');
      if (!(Editbox10.disabled || Editbox10.style.display === 'none' || Editbox10.style.visibility === 'hidden'))
      {
         regexp = /^[-+]?\d*\.?\d*$/;
         if (!regexp.test(Editbox10.value))
         {
            alert("Please enter the 5 digit zip code");
            Editbox10.focus();
            return false;
         }
         if (Editbox10.value == "")
         {
            alert("Please enter the 5 digit zip code");
            Editbox10.focus();
            return false;
         }
         if (Editbox10.value.length < 5)
         {
            alert("Please enter the 5 digit zip code");
            Editbox10.focus();
            return false;
         }
         if (Editbox10.value.length > 5)
         {
            alert("Please enter the 5 digit zip code");
            Editbox10.focus();
            return false;
         }
      }
      var Editbox11 = document.getElementById('Editbox11');
      if (!(Editbox11.disabled || Editbox11.style.display === 'none' || Editbox11.style.visibility === 'hidden'))
      {
         regexp = /(0[1-9]|[12][0-9]|3[01])[- \/.](0[1-9]|1[012])[- \/.](19|20)[0-9]{2}/;
         if (Editbox11.value.length != 0 && !regexp.test(Editbox11.value))
         {
            alert("The date you have entered is not valid");
            Editbox11.focus();
            return false;
         }
      }
      var Editbox12 = document.getElementById('Editbox12');
      if (!(Editbox12.disabled || Editbox12.style.display === 'none' || Editbox12.style.visibility === 'hidden'))
      {
         regexp = /(0[1-9]|[12][0-9]|3[01])[- \/.](0[1-9]|1[012])[- \/.](19|20)[0-9]{2}/;
         if (Editbox12.value.length != 0 && !regexp.test(Editbox12.value))
         {
            alert("The date you have entered is not valid");
            Editbox12.focus();
            return false;
         }
      }
      var Editbox13 = document.getElementById('Editbox13');
      if (!(Editbox13.disabled || Editbox13.style.display === 'none' || Editbox13.style.visibility === 'hidden'))
      {
         regexp = /(0[1-9]|[12][0-9]|3[01])[- \/.](0[1-9]|1[012])[- \/.](19|20)[0-9]{2}/;
         if (Editbox13.value.length != 0 && !regexp.test(Editbox13.value))
         {
            alert("The date you have entered is not valid");
            Editbox13.focus();
            return false;
         }
      }
      var Editbox14 = document.getElementById('Editbox14');
      if (!(Editbox14.disabled || Editbox14.style.display === 'none' || Editbox14.style.visibility === 'hidden'))
      {
         regexp = /(0[1-9]|[12][0-9]|3[01])[- \/.](0[1-9]|1[012])[- \/.](19|20)[0-9]{2}/;
         if (Editbox14.value.length != 0 && !regexp.test(Editbox14.value))
         {
            alert("The date you have entered is not valid");
            Editbox14.focus();
            return false;
         }
      }
      var Editbox19 = document.getElementById('Editbox19');
      if (!(Editbox19.disabled || Editbox19.style.display === 'none' || Editbox19.style.visibility === 'hidden'))
      {
         regexp = /^[-+]?\d*\.?\d*$/;
         if (Editbox19.value.length != 0 && !regexp.test(Editbox19.value))
         {
            alert("Please enter a phone number in the following format xxx-xxx-xxxx");
            Editbox19.focus();
            return false;
         }
      }
      var Editbox20 = document.getElementById('Editbox20');
      if (!(Editbox20.disabled || Editbox20.style.display === 'none' || Editbox20.style.visibility === 'hidden'))
      {
         regexp = /^[-+]?\d*\.?\d*$/;
         if (Editbox20.value.length != 0 && !regexp.test(Editbox20.value))
         {
            alert("Please enter a phone number in the following format xxx-xxx-xxxx");
            Editbox20.focus();
            return false;
         }
      }
      var Editbox21 = document.getElementById('Editbox21');
      if (!(Editbox21.disabled || Editbox21.style.display === 'none' || Editbox21.style.visibility === 'hidden'))
      {
         regexp = /^[-+]?\d*\.?\d*$/;
         if (Editbox21.value.length != 0 && !regexp.test(Editbox21.value))
         {
            alert("Please enter a phone number in the following format xxx-xxx-xxxx");
            Editbox21.focus();
            return false;
         }
      }
      var Editbox23 = document.getElementById('Editbox23');
      if (!(Editbox23.disabled || Editbox23.style.display === 'none' || Editbox23.style.visibility === 'hidden'))
      {
         regexp = /^[A-Za-zÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ]*$/;
         if (Editbox23.value.length != 0 && !regexp.test(Editbox23.value))
         {
            alert("The date you have entered is not valid");
            Editbox23.focus();
            return false;
         }
      }
      return true;
   }
</script>
I do have the page showing the username in the body with this code.

Code: Select all

<span id="LoginName1">Welcome <?php
if (isset($_SESSION['username']))
{
   echo $_SESSION['username'];
}
else
{
   echo 'Not logged in';
}
?>!</span>

User avatar
Pablo
 
Posts: 14503
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Internal Server Error - updating data types

Post by Pablo » Mon Oct 22, 2018 5:37 pm

Did you manually edit the code?

The line
$db_altaddress1 = $data['extra14']
is missing a semi-column

BethlehemOffice
 
 
Posts: 23
Joined: Wed Sep 06, 2017 3:08 pm

Re: Internal Server Error - updating data types

Post by BethlehemOffice » Mon Oct 22, 2018 5:49 pm

yes I did. SMH THANKS!!!!! That fixed it.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests