Can't log into my MySQL database

Hello,

I am trying to set up a squeeze page where I request the user’s first name and email address.
I am trying to have the data sent to my MySQL database using PHP, but I am having problems. I am using a format that I saw watching several Youtube videos. My database name is bestfibr_FibroidSolutions, and my table name is Fibroid Health.
Here is the format that I came up with:

test

Enter Your First Name

Your Best Email Address

<?php

define (‘DB_NAME’ , ‘bestfibr_FibroidSolutions’);

define (‘DB_USER’ , ’ ');

define (‘DB_PASSWORD’ , ’ ');

define (‘DB_HOST’ , ‘localhost’);

$link=mysql_connect ( DB_HOST, DB_USER, DB_PASSWORD);

$db_selected=mysql_select_db(DB_NAME, $link);

$value=$_POST [‘first_name’];

$value2=$_POST [‘email_address’];

$sql=“INSERT INTO Fibroid_Health (first_name, email_address)
VALUES (’$value’, ‘$value2’)”;

?>

But when I insert the information into the forms I get an error message that says:

NOT FOUND
The requested URL /Fibroid_Health.php was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

And this database and table are in my cPanel on my webhost

Any help that I can get to fix this will be greatly appreciated!

Thank you

Wherever you are learning from stop going there. The code is obsolete and dangerous and has been completely removed from Php. You need to use PDO.

https://phpdelusions.net/pdo

Sponsor our Newsletter | Privacy Policy | Terms of Service