0

what am i doing wrong here? I am trying to upload in 000webhost.com. I know my db=test, password=******* and mysql_select_db=test. still... Please help my with my problem. By the way I am learning PHP still. This is my side project. Plain english pease.....

my 000webhost database name

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /storage/h5/612/897612/public_html/dbc.php:3 Stack trace: #0 /storage/h5/612/897612/public_html/login.php(5): require() #1 {main} thrown in /storage/h5/612/897612/public_html/dbc.php on line 3

Suhang
  • 1
  • 1

2 Answers2

0

You are missing php mysql extension. If this is a shared hosting, you won't be able to install it.

I suppose this module is not presented because it is deprecated. Use mysqli or PDO_MySQL instead.

More info : http://php.net/manual/en/intro.mysql.php

dsmatilla
  • 107
  • 3
0

You do not have the mysql extension installed, if you are using a recent version of PHP then this will be because its now been removed, and you should be using mysqli instead See Docs

This question may also provide some useful info on this: Why shouldn't I use mysql_* functions in PHP?

If this still doesn't work, then you may need to install the extension - you should provide more info on your environment before I could offer advice on this.

Community
  • 1
  • 1
Theo
  • 1,567
  • 1
  • 8
  • 15