Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9150117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:34:12+00:00 2026-06-17T11:34:12+00:00

I have a problem with a website which I never had before on other

  • 0

I have a problem with a website which I never had before on other sites, it’s probably something simple, but can’t seem to get it. Please see and advise.

<!--All Header Elements-->
<?php 
$pageName = "Easy-Quote";
$siteName = "Bloemendal";
include("../Includes/header_non_index.inc"); 
include("../Includes/function12.inc"); 
?> <?php error_reporting (E_ALL ^ E_NOTICE); ?>
<!--All Header Elements-->
<body>
<script type="text/javascript">

var total = 0;

var allVenues = "";
var allVenuePricing = "";
var allTents = "";
var allTentPricing = "";
var allDFPricing = "";
var allMenus = "";
var allMenuPricing = "";
var allSF = "";

var venueName = "";
var venuePrice = 0;
var tentName = "";
var tentPrice = 0;
var DF = "";
var DFPrice = 0;
var menuName = "";
var menuPrice = 0;
var serviceFee = 0;

var getGuests = null;
var totalField = null;
var venueField = null;
var tentField = null;
var DFField = null;
var menuField = null;

//Get Fields
function getFields()
{
     getGuests = document.getElementById('Guests');
     totalField = document.getElementById('TotalField');
     depositField = document.getElementById('DepositField');
     venueField = document.getElementById('getValue');
     tentField = document.getElementById('getTent');
     DFField = document.getElementById('getDF');
     menuField = document.getElementById('getMenu');
     serviceField = document.getElementById('getServiceCharge');
}

function convertAllArrays()
{
    <?php
    $allVenues=getVenues(); 
    $allVenuePricing=getVenuePricing();
    $allTents=getTents(); 
    $allTentPricing=getTentPricing();
    $allDFPricing=getDFPricing();
    $allMenus=getMenus(); 
    $allMenuPricing=getMenuPricing();
    $allSF=getServiceFee(); 

    //##################Declaring All Arrays###########################\\
        echo "allVenues = ". json_encode($allVenues) . ";\n"; //All the Venue Names
        echo "allVenuePricing = ". json_encode($allVenuePricing) . ";\n"; //All the Venue Pricing
        echo "allTents = ". json_encode($allTents) . ";\n"; //All the Tent Names
        echo "allTentPricing = ". json_encode($allTentPricing) . ";\n"; //All the Tent Pricing 
        echo "allDFPricing = ". json_encode($allDFPricing) . ";\n"; //All the Dance Floors
        echo "allMenus = ". json_encode($allMenus) . ";\n"; //All the Menu Names
        echo "allMenuPricing = ". json_encode($allMenuPricing) . ";\n"; //All the Menu Pricing
        echo "allSF = ". json_encode($allSF) . ";\n"; //All the Service Fees
    ?>
}

function activeControl()
{

    //Check Venue Field
    if(getGuests.value > 0)
    {
        venueField.disabled = false;
    }else{
        venueField.options[0].selected = true;
        venuePrice = 0;
        venueName = "";
        venueField.disabled = true; 
    }

    //Check Tent Field
    if(venueField.selectedIndex == 1)
    {
        tentField.disabled = false;
    }else{  
        tentPrice = 0;
        tentName = "";
        tentField.options[1].selected = true;
        tentField.disabled = true;
    }

    //Check Menu Field
    if(venueField.selectedIndex > 0)
    {
        menuField.disabled = false;
    }else{
        menuPrice = 0;
        menuName = "";
        menuField.options[0].selected = true;
        menuField.disabled = true;  
    }

    //Check Dance Floor Field
    if(venueField.selectedIndex == 1)
    {
        DFField.disabled = false;
    }else{
        DFField.checked = false;
        DF = "No";
        DFPrice = 0;
        DFField.disabled = true;    

    }

    updateTotal();
}

function updateTotal()
{   

    //Get Venue Details 
    var getSelectedVenue = venueField.selectedIndex;
    if(getSelectedVenue > 0)
    {
        venueName = allVenues[getSelectedVenue];
        venuePrice = allVenuePricing[getSelectedVenue]
    }

    //Get Tent Details  
    var getSelectedTent = tentField.selectedIndex;
    if(getSelectedTent > 1)
    {
        tentName = allTents[getSelectedTent-1];
        tentPrice = allTentPricing[getSelectedTent-1]
    }else if(getSelectedTent == 1)
    {
        tentName = "";
        tentPrice = 0;
    }

    //Get DF Details    
    if(DFField.checked)
    {
        DF = "Yes";
        DFPrice = allDFPricing[1];
    }else
    {
        DF = "No";
        DFPrice = 0;
    }

    //Get Menu Details  
    var getSelectedMenu = menuField.selectedIndex;
    if(getSelectedMenu > 0)
    {
        menuName = allMenus[getSelectedMenu];
        menuPrice = allMenuPricing[getSelectedMenu]
    }

    //Get Service Fee Details   
    var getSelectedSF =serviceField.selectedIndex;
    if(getSelectedSF > 0)
    {
        serviceFee = allSF[getSelectedSF];
    }

    venuePrice = parseFloat(venuePrice,10);
    tentPrice = parseFloat(tentPrice,10);
    DFPrice = parseFloat(DFPrice,10);
    menuPrice = parseFloat(menuPrice,10);
    serviceFee = parseFloat(serviceFee,10);


    //Update Total Field
    total = venuePrice + tentPrice +DFPrice + (menuPrice*getGuests.value);
    total = total + (total*serviceFee);
    totalField.value = "R"+total;

    //Update Deposit Fee
    depositField.value = "R"+(total*0.3);
}



</script>
<!--Global Elements-->

That is the first 196 lines of the site. Offline it loads, but when uploaded to the webserver, it only uploads up to:

function convertAllArrays()
{

PS: I know that calling php variables in javascript is not ideal, but it should suffice for my purpose.

!!EDIT!!
Website Link: http://bloemendal.co.za/Easy-Quote/

!!EDIT!!
The first few line of code in the function12.inc include. the getVenues() etc functions are declared in this include:

<?php
//############################Venues###############################\\
function getVenues()
{
    include("../Includes/db_bloem_01_logon.inc");             
                $cxn = mysqli_connect($host,$user,$passwd,$dbname);
                $query = "SELECT VenueName FROM venues WHERE ID < 5";
                $results = mysqli_query($cxn, $query) or die ("Could't execute query");

      $allVenues= array();

        $counter = 1;
        while($row = mysqli_fetch_assoc($results))
        {
              extract ($row);
              $allVenues[$counter] = "$VenueName";
              $counter++;
        }     
    return $allVenues;
}

function getVenuePricing()
{
    include("../Includes/db_bloem_01_logon.inc");             
                $cxn = mysqli_connect($host,$user,$passwd,$dbname);
                $query = "SELECT Price FROM venues WHERE ID < 5";
                $results = mysqli_query($cxn, $query) or die ("Could't execute query");

      $allVenuePricing= array();

        $counter = 1;
        while($row = mysqli_fetch_assoc($results))
        {
              extract ($row);
              $allVenuePricing[$counter] = "$Price";
              $counter++;
        }     
    return $allVenuePricing;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T11:34:13+00:00Added an answer on June 17, 2026 at 11:34 am

    When you have php in a script and the php throws an error the error prints in the script tag, so it’s not going to show up on your browser. Chances are there’s a problem with the php inside your javascript. Move the php outside the script tag to make sure that it runs without error.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have NEVER had this problem before and i am completely stumped. the site
For my website, I'm considering using Less . Can I have some problem of
I've never had a problem with aligning divs side by side but for some
I have a problem with my CSS on a website I'm working on .
I have some problem with my cfml website. I have used the below code
I have a problem with maintenance of my php based website. My website is
I have a problem when using jsonp to API HTTPS website. it will return
I have a problem consistently displaying Facebook Comments on my AJAX driven website. Each
i have a problem i am developing an asp.net mvc project. Website is in
I am working on creating website with Yii framework and I have a problem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.