# My website is not working

**URL:** <https://forum.infinityfree.com/t/my-website-is-not-working/85927>\
**Category:** Hosting Support\
**Created:** [November 9, 2023, 4:43am UTC](https://forum.infinityfree.com/t/my-website-is-not-working/85927 "2023-11-09T04:43:01Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![indertiwana](https://forum.infinityfree.com/letter_avatar/indertiwana/32/5_5575768a8748004e209b776fc1b2916d.png) [@indertiwana](https://forum.infinityfree.com/u/indertiwana)\
**Post date:** [November 9, 2023, 4:43am UTC](https://forum.infinityfree.com/t/my-website-is-not-working/85927/1 "2023-11-09T04:43:01Z")

</div>

### Website URL

([trp.lovestoblog.com](http://trp.lovestoblog.com))

### Error Message

(showing white nil page)

### Other Information

(my website is not working, just showing white page)

---

<div class="post-metadata">

**Author:** ![ChrisPAR](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/chrispar/32/8743_2.png) [@ChrisPAR](https://forum.infinityfree.com/u/ChrisPAR)\
**Post date:** [November 9, 2023, 5:06am UTC](https://forum.infinityfree.com/t/my-website-is-not-working/85927/2 "2023-11-09T05:06:43Z")

</div>

Not for me:

 ![Screenshot_20231109_070457_Chrome](https://infinityfree-forum-uploads.s3.dualstack.eu-central-1.amazonaws.com/original/3X/1/4/148a74acd3428fd33dd59197a14eea913b5dc508.jpeg)

If you are still facing the issue, try enabling `Display Errors`:

> [@Http error 500](https://forum.infinityfree.com/t/http-error-500/49352):
>
> When trying to access your website, you may see a page which returns the status code “500”. In Google Chrome, you’ll see a page with the error code HTTP ERROR 500. There are typically two reasons which can cause this error: The PHP code has crashed. The .htaccess file contains invalid rules. Here are some things you can try to debug and fix this. Fixing crashing PHP code A HTTP ERROR 500 simply tells you that the PHP code has crashed, but gives no information as to why it has crashed. Gett…

---

<div class="post-metadata">

**Author:** ![indertiwana](https://forum.infinityfree.com/letter_avatar/indertiwana/32/5_5575768a8748004e209b776fc1b2916d.png) [@indertiwana](https://forum.infinityfree.com/u/indertiwana)\
**Post date:** [November 9, 2023, 5:07am UTC](https://forum.infinityfree.com/t/my-website-is-not-working/85927/3 "2023-11-09T05:07:35Z")

</div>

after login not working

---

<div class="post-metadata">

**Author:** ![KangJL](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/kangjl/32/12130_2.png) [@KangJL](https://forum.infinityfree.com/u/KangJL)\
**Post date:** [November 9, 2023, 5:13am UTC](https://forum.infinityfree.com/t/my-website-is-not-working/85927/4 "2023-11-09T05:13:28Z")

</div>

Saying

> [@indertiwana](#):
>
> not working

is not helpful at all

You need to learn to debug your code

![image](https://forum-cdn.infinityfree.net/original/3X/4/8/48211d0c384216d5034b1574b12ffe131d90e4a1.png)

---

<div class="post-metadata">

**Author:** ![anon95807532](https://forum.infinityfree.com/letter_avatar/anon95807532/32/5_5575768a8748004e209b776fc1b2916d.png) [@anon95807532](https://forum.infinityfree.com/u/anon95807532)\
**Post date:** [November 10, 2023, 5:26pm UTC](https://forum.infinityfree.com/t/my-website-is-not-working/85927/5 "2023-11-10T17:26:50Z")

</div>

Hi indertiwana,

Post your code content from file `login_process.php` for us to take a look for you. Thanks.

Cheers!

---

<div class="post-metadata">

**Author:** ![indertiwana](https://forum.infinityfree.com/letter_avatar/indertiwana/32/5_5575768a8748004e209b776fc1b2916d.png) [@indertiwana](https://forum.infinityfree.com/u/indertiwana)\
**Post date:** [November 13, 2023, 4:20am UTC](https://forum.infinityfree.com/t/my-website-is-not-working/85927/6 "2023-11-13T04:20:34Z")

</div>

\<?php session\_start(); require\_once 'dbconfiglogin.php'; if(isset($\_POST['btn-login'])) { //$user\_name = $\_POST['user\_name']; $user\_email = trim($\_POST['user\_email']); $user\_password = trim($\_POST['password']); $password = md5($user\_password); try { $stmt = $db\_con-\>prepare("SELECT \* FROM user\_data WHERE email=:email"); $stmt-\>execute(array(":email"=\>$user\_email)); $row = $stmt-\>fetch(PDO::FETCH\_ASSOC); $count = $stmt-\>rowCount(); if($row['password']==$password){ echo "ok"; // log in $\_SESSION['user\_session'] = $row['email']; } else{ echo "Email or password does not exist."; // wrong details } } catch(PDOException $e){ echo $e-\>getMessage(); } } ?\>

---

<div class="post-metadata">

**Author:** ![anon95807532](https://forum.infinityfree.com/letter_avatar/anon95807532/32/5_5575768a8748004e209b776fc1b2916d.png) [@anon95807532](https://forum.infinityfree.com/u/anon95807532)\
**Post date:** [November 13, 2023, 9:26am UTC](https://forum.infinityfree.com/t/my-website-is-not-working/85927/7 "2023-11-13T09:26:08Z")

</div>

Hi indertiwana,

Please format your code when pasting here, as it’s not possible to interpret the line number as the same as the one shown in the error message.

```php
<?php 
session_start();
require_once 'dbconfiglogin.php';
if (isset($_POST['btn-login'])) {
	//$user_name = $_POST['user_name'];
	$user_email = trim($_POST['user_email']);
	$user_password = trim($_POST['password']);
	$password = md5($user_password);
	try {
		$stmt = $db_con->prepare("SELECT * FROM user_data WHERE email=:email");
		$stmt->execute(array(":email" => $user_email));
		$row = $stmt->fetch(PDO::FETCH_ASSOC);
		$count = $stmt->rowCount();
		if ($row['password'] == $password) {
			echo "ok";
			// log in $_SESSION['user_session'] = $row['email'];
		} else {
			echo "Email or password does not exist.";
			// wrong details
		}
	} catch (PDOException $e) {
		echo $e->getMessage();
	}
}

```

The error should be regarding the line:

```php
if ($row['password'] == $password) {

```

The value for the password in $row simply isn’t there, could be either there is no such column, or there are no rows returned. Check if you have the column in your database, or is there are any records. When nothing is returned, $row stores null.

Some improvement suggestions:

- Add more validation, even for database retrieves.
- Replace md5 with a more secure hashing method.

Cheers!

---

<div class="post-metadata">

**Author:** ![indertiwana](https://forum.infinityfree.com/letter_avatar/indertiwana/32/5_5575768a8748004e209b776fc1b2916d.png) [@indertiwana](https://forum.infinityfree.com/u/indertiwana)\
**Post date:** [November 13, 2023, 11:28am UTC](https://forum.infinityfree.com/t/my-website-is-not-working/85927/8 "2023-11-13T11:28:05Z")

</div>

```auto
<?php include'dbconfig1.php';
?>
<?php
session_start();
$email= mysql_real_escape_string($_POST['email']);
$res=mysql_query("SELECT * FROM user_data WHERE email='$email'");
$row=mysql_fetch_array($res);
if(isset($_POST['btn-submit']))
{

$query="select * from user_data where email='$email'";
$result=mysql_query($query) or die(mysql_error());
if(mysql_num_rows($result))
{
   $_SESSION['email'] = $row['email'];
  header("Location: getemailid.php");
}
else
{
?>
<script>alert("No user exist with this email id");</script>

<?php }
}
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Forget Password</title>
	<link rel="icon" href="images/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1">

  <!-- Font Awesome -->
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
  <!-- Ionicons -->
  <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="css/adminlte.min.css">
  
  <!-- Google Font: Source Sans Pro -->
  <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
	<link href="css/login_style.css" rel="stylesheet">
	

<style>
body, html {
    height: 100%;
    margin: 0;
	
	background-image: url(images/material-design-1080p-wallpaper_1.jpg);
	width:100%; 
   background-repeat:no-repeat;/*we want to have one single image not a repeated one*/  
   background-size:cover;/*this sets the image to fullscreen covering the whole screen*/  
	 background-attachment: fixed;
}
hr
	{
	 background-color: #fff;
	}
.bgimg {
    
    height: 100%;
    
    background-size: cover;
    
    color: white;
   
    font-size: 24px;
	
   
			
  
}

.topleft {
    position: absolute;
    top: 10px;
    left: 16px;
}

.bottomleft {
    position: absolute;
    bottom: 0;
    left: 16px;
}

.middle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
	
	
}

hr {
    margin: auto;
    width: 30%;
}
	.center-block {
  display: block;
  margin-right: auto;
  margin-left: auto;
		width: 100%;
			max-width: 300px;
    height: auto;	
			margin-bottom:10px;
			
}
.form-group:focus {
  border-color: inherit;
  -webkit-box-shadow: none;
  box-shadow: none;
	outline: none;
	
}	
	::placeholder
	{
		color: peachpuff;
		text-align: center;
		font-size: 20px;
		font-family: "open sans";
	}
	input[type='email']{
		font-size: 18px;
		width: 100%;
		height: 30px;
	}

::-webkit-scrollbar {
    width: 01px;
    height: 01px;

}

::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 01px rgba(0,0,0,0.5);
    border-radius:01px;
    -webkit-border-radius: 01px;

}

::-webkit-scrollbar-thumb {
    background-color: #0c85d0;
    outline: 01px solid slategrey;
    -webkit-box-shadow: inset 0 0 1px rgba(0,0,0,0.5);
    border-radius:01px;
    -webkit-border-radius: 1px;

}
</style>
<body>

<div class="bgimg">
  <div class="topleft">
    <a href="index.php"><img src="images/logo (1).png" class="center-block img-rounded" ></a>
  </div>
  <div class="middle">
	  <h1>Forget Password</h1>
	  <hr>
	  <br>
    <form class="form-group" name="getemail" method="post" >
	  <input type="email" autocomplete="off" autofocus class="form-group form-group-lg rounded-0" name="email" id="email" required="" style="background-color: transparent; border: 0; border-bottom:solid 1px #fff; color: #fff; outline: none;" placeholder="Enter Your Email">
	  
    <button class=" btn btn-primary" type="submit" name="btn-submit">
     Next &nbsp; <i class="fa fa-angle-double-right"></i> 
    </button>
	  </form>
  </div>
  
</div>

</body>
</html>

```

---

<div class="post-metadata">

**Author:** ![anon42008019](https://forum.infinityfree.com/letter_avatar/anon42008019/32/5_5575768a8748004e209b776fc1b2916d.png) [@anon42008019](https://forum.infinityfree.com/u/anon42008019)\
**Post date:** [November 13, 2023, 11:36am UTC](https://forum.infinityfree.com/t/my-website-is-not-working/85927/9 "2023-11-13T11:36:26Z")

</div>

Please provide more information.

---

<div class="post-metadata">

**Author:** ![indertiwana](https://forum.infinityfree.com/letter_avatar/indertiwana/32/5_5575768a8748004e209b776fc1b2916d.png) [@indertiwana](https://forum.infinityfree.com/u/indertiwana)\
**Post date:** [November 13, 2023, 11:40am UTC](https://forum.infinityfree.com/t/my-website-is-not-working/85927/10 "2023-11-13T11:40:51Z")

</div>

Just showing white blank page. Please help.

---

<div class="post-metadata">

**Author:** ![anon95807532](https://forum.infinityfree.com/letter_avatar/anon95807532/32/5_5575768a8748004e209b776fc1b2916d.png) [@anon95807532](https://forum.infinityfree.com/u/anon95807532)\
**Post date:** [November 13, 2023, 2:44pm UTC](https://forum.infinityfree.com/t/my-website-is-not-working/85927/11 "2023-11-13T14:44:20Z")

</div>

Hi indertiwana,

Your code corresponds to an older version of PHP, which is no longer supported here, you need to update the code according to PHP 8.2 standards. Specificially, the mysql\_\* functions to mysqli\_\* functions.

(notice the crossline)

 ![image](https://forum-cdn.infinityfree.net/original/3X/0/b/0bf12f60bf59052f81f1064d0c5a127d608954f6.png)

An example is as follows:

```php
<?php
include'dbconfig1.php';

session_start();

$mysql = new mysqli('hostname', 'username', 'password', 'database', 3306);
$email = mysqli_real_escape_string($mysql, $_POST['email']);
$res = mysqli_query($mysql, "SELECT * FROM user_data WHERE email='$email'");
$row = mysqli_fetch_array($res);
if(isset($_POST['btn-submit']))
{

$query = "select * from user_data where email='$email'";
$result = mysqli_query($mysql, $query) or die(mysqli_error($mysql));

if(mysqli_num_rows($result)){
  $_SESSION['email'] = $row['email'];
  header("Location: getemailid.php");
}else{
?>
<script>alert("No user exist with this email id");</script>
<?php }
}
?>
<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>Forget Password</title>
  <link rel="icon" href="images/favicon.ico">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
  <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
  <link rel="stylesheet" href="css/adminlte.min.css">
  <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
  <link href="css/login_style.css" rel="stylesheet">
  <style>
  body, html{height:100%;margin:0;background-image:url(images/material-design-1080p-wallpaper_1.jpg);width:100%;background-repeat:no-repeat;background-size:cover;background-attachment:fixed;}
  hr{background-color:#fff;}
  .bgimg{height:100%;background-size:cover;color:white;font-size:24px;}
  .topleft{position:absolute;top:10px;left:16px;}
  .bottomleft{position:absolute;bottom:0;left:16px;}
  .middle{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);text-align:center;}
  hr{margin:auto;width:30%;}
  .center-block{display:block;margin-right:auto;margin-left:auto;width:100%;max-width:300px;height:auto;	margin-bottom:10px;}
  .form-group:focus{border-color:inherit;-webkit-box-shadow:none;box-shadow:none;outline:none;}
  ::placeholder{color:peachpuff;text-align:center;font-size:20px;font-family:"open sans";}
  input[type='email']{font-size:18px;width:100%;height:30px;}
  ::-webkit-scrollbar{width:01px;height:01px;}
  ::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 01px rgba(0,0,0,0.5);border-radius:01px;-webkit-border-radius:01px;}
  ::-webkit-scrollbar-thumb{background-color:#0c85d0;outline:01px solid slategrey;-webkit-box-shadow:inset 0 0 1px rgba(0,0,0,0.5);border-radius:01px;-webkit-border-radius:1px;}
  </style>
<body>

<div class="bgimg">
  <div class="topleft">
    <a href="index.php"><img src="images/logo (1).png" class="center-block img-rounded" ></a>
  </div>
  <div class="middle">
	  <h1>Forget Password</h1>
	  <hr>
	  <br>
    <form class="form-group" name="getemail" method="post" >
	  <input type="email" autocomplete="off" autofocus class="form-group form-group-lg rounded-0" name="email" id="email" required="" style="background-color: transparent; border: 0; border-bottom:solid 1px #fff; color: #fff; outline: none;" placeholder="Enter Your Email">
    <button class=" btn btn-primary" type="submit" name="btn-submit">
     Next &nbsp; <i class="fa fa-angle-double-right"></i> 
    </button>
	  </form>
  </div>
  
</div>

</body>
</html>

```

Cheers!

---

<div class="post-metadata">

**Author:** ![system](https://infinityfree-forum-uploads.s3.dualstack.eu-central-1.amazonaws.com/original/3X/b/0/b024fd3fa88bae093c9576e55c2c94e33f890206.svg) [@system](https://forum.infinityfree.com/u/system)\
**Post date:** [November 20, 2023, 2:44pm UTC](https://forum.infinityfree.com/t/my-website-is-not-working/85927/12 "2023-11-20T14:44:47Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
