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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T05:43:02+00:00 2026-05-13T05:43:02+00:00

My php script is working on localhost but after uploading online it’s showing a

  • 0

My php script is working on localhost but after uploading online it’s showing a blank page.

php installed on localhost version 5.2.6
php installed on production environment version 5.1.4

<?php 
define('INCLUDE_CHECK',true);
require 'connect.php';
session_start();                        
php require 'function.php';    
?>

<html>
<head>
</head>
<body>
session_name('smsapp');
session_start(); 
$fname = mysql_real_escape_string($_POST['fname']);
$name = mysql_real_escape_string($_POST['name']);
$email =mysql_real_escape_string($_POST['email']);
$phone = mysql_real_escape_string($_POST['phone']);
$pass = substr(md5($_SERVER['REMOTE_ADDR'].microtime().rand(1,100000)),0,6);
$str = "INSERT INTO members(fname, name, pass, phone, email, regIP, dt, level)
        VALUES(
               '".$fname."',
               '".$name."',
               '".md5($pass)."',
               '".$phone."',
               '".$email."',
               '".$_SERVER['REMOTE_ADDR']."',
                  1,
                  NOW()
    )" ;
mysql_query($str);

if(mysql_affected_rows($link) == 1 && 
  ($_SESSION['security_code'] == $_POST['security_code']))
{
    echo "Password will be sent to you by sms.";
    $url = "http://sms.kohlihosting.com/sendsmsv2.asp?
            user=username&
            password=12345&
            sender=kohli&
            text=Your+password" . $pass . "&
            PhoneNumber=".$phone;

    $homepage = file_get_contents($url) ;   
}
else if(!($_SESSION['security_code'] == $_POST['security_code']))
{
    echo "Please Input correct letters ";
}
else
{
    echo "Not registered";
}
?>

This is the code which is working on localhost but not online.

  • 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-05-13T05:43:02+00:00Added an answer on May 13, 2026 at 5:43 am

    Another possibility might be, the php.ini in the server has show-warnings disabled. And you are unable to connect to the database for some reason and the warning/errors are not shown.

    In your connect code, you could try having an connect() or die('something') statement. This way if it does fail to connect, you see an error message.

    Even in this is not the case, you should see if warnings/error messages are generated and are not shown due to the settings in php.ini and you might need to change it temporarily.

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

Sidebar

Related Questions

I've finally got this PHP email script working (didn't work on localhost…), but my
I have script which calls zoho api, Its working fine on localhost but when
I have the following PHP script with the working (according to JsonViewer ) JSON
I am working on php script that may involve a long running task. The
I'm working on a PHP script that compiles a JavaScript framework. Right now I'm
I'm working on a PHP script that runs a Python script on the server.
I am working on a site that require a php script running on a
I working in Rails and I need to call to an PHP-script. I can
Okay I'm working in jQuery mobile, and I just put in a PHP script
We currently have a working php mail script, this works fine and as we

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.