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 9016585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:01:56+00:00 2026-06-16T04:01:56+00:00

So i am working on the following script, just a ‘simple’ gathering of form

  • 0

So i am working on the following script, just a ‘simple’ gathering of form data – popping it into the database then happy days! for some reason I am just getting a blank page – despite having error reporting turned on – its driving me crazy! – any ideas? Thank you so much in advance for your help.

<?php
error_reporting(E_ALL & ~E_NOTICE);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);

function isLoggedIn()
{
    if(isset($_SESSION['valid']) && $_SESSION['valid'])
        return true;
    return false;
}





session_start();
//if the user has not logged in
if(!isLoggedIn())
{
    header('Location: ../main');

    die();
}


    //! Checks if the user type is admin full

 if ($_SESSION['type'] === 'admin-full') 
    {



    $comp_name = $_POST['comp_name'];
    $comp_number = $_POST['comp_number'];
    $vat_number = $_POST['vat_number'];
    $add1 = $_POST['add1'];
    $add2 = $_POST['add2'];
    $city = $_POST['city'];
    $postcode = $_POST['postcode'];
    $branch_name = $_POST['branch_name'];
    $contact_name = $_POST['contact_name'];
    $contact_number = $_POST['contact_number'];


    //! Real_escape the form data

    $comp_name =        mysql_real_escape_string($comp_name);
    $comp_number =      mysql_real_escape_string($comp_number);
    $vat_number =       mysql_real_escape_string($vat_number);
    $add1 =             mysql_real_escape_string($add1);
    $add2 =             mysql_real_escape_string($add2);
    $city =             mysql_real_escape_string($city);
    $postcode =         mysql_real_escape_string($postcode);
    $branch_name =      mysql_real_escape_string($branch_name);
    $contact_name =     mysql_real_escape_string($contact_name);
    $contact_number=    mysql_real_escape_string($contact_number);

    //! MySQL Query

    require_once('../Connections/PropSuite.php');
    mysql_select_db($database_PropSuite, $PropSuite);

    $query = "INSERT INTO franchises 

    (comp_name, comp_number, vat_number, add1, add2, city, postcode, branch_name, contact_name, contact_number )

    VALUES 
    ('$comp_name', '$comp_number', '$vat_number', '$add1', '$add2', '$city', '$postcode', '$branch_name', '$contact_name', '$contact_number');";



    mysql_query($query) or die(mysql_error());

        mysql_close();


    header(location:'franchise-new.php?success');




}

else {
    echo('You need to be an admin user to do that!, If you are seeing this message in error, please contact the system administrator.');
}


?>
  • 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-16T04:01:57+00:00Added an answer on June 16, 2026 at 4:01 am

    At the end of your successful MySQL command, you have this command:

    header(location:'franchise-new.php?success');
    

    This should be quoted entirely. Otherwise nothing will load, but you will not be redirected.

    header('location: franchise-new.php?success');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey I just wanted to find out the working of the following script as
I just fiddled following script. It's not working. <SCRIPT> function kin() { var kobj
I have the following bash script (.sh) that's working just fine in Unix. I'd
I had following script for comment system working nicely until I put parameters into
I have the following form working just fine in Chrome, but doesn't seem to
Edit: Originally I had a simple form Ajax script that wasn't working, turns out
Following Script isn't working in CHROME browser, IE is Fine. I've changed opener.document ...
I have the following script, which is working for the most part Link to
The following java-script is working fine (Jquery) $(document).ready(function(){ $('#c_area').load($('.m_top:first').attr('href')) }); $('.m_top').click( function(){ $(#myDiv).html('<img src=images/loading.gif
I have the following PHP script with the working (according to JsonViewer ) JSON

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.