How can you help me please

Thank’s right now I want to connect with the data base

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /storage/ssd1/595/5532595/public_html/connect.php:16 Stack trace: #0 {main} thrown in /storage/ssd1/595/5532595/public_html/connect.php on line 16

connect.php contents please?

<?php $DBServer = 'localhost'; // e.g 'localhost' or '192.168.1.100' $DBUser = 'id5532595_root'; $DBPass = '*******'; $DBName = 'id5532595_mabase'; $link= mysql_connect("localhost","$DBUser","$DBPass","$DBName"); ?>

Use mysqli instead of mysql

I use mysqli same thing

Parse error: syntax error, unexpected ‘or’ (T_LOGICAL_OR), expecting end of file in /storage/ssd1/595/5532595/public_html/connect.php on line 14

Help me with this code

or should be right after the dbconnection parenthesis )
Remove the semicolon ;

what does it give you when trying to establish a connection with php here is the site altidorronexmultiservices.000webhostapp.com/connect.php

It should give nothing if it succeeds :slight_smile:

but how to display the information of the database

Error code

MySQL uses certain commands such as SELECT, DELETE, DROP, UPDATE, etc to manage the database content and extract information from it.

PHP uses MySQLi extension, a library which has dedicated functions for communicating with the MySQL database at server side level.

I advise you to start with the most basic tutorials from BitDegree/learn. All you need to know about basic MySQL data manipulation is covered there. :wink:

2 Likes

<? php define ('DBServer', "127.0.0.1"); // e.g 'localhost' or '192.168.1.100' define ('DBUser', "id5532595_root"); define ('DBPass' "*******"); define ('DBName', "id5532595_mabase") $connexion = mysql_connect( DB Server, DBUser, DBPass, DBName); if(!$connexion) { echo "impossible de se connecter" exit; } if(!mysql_select_db (DBName, $connexion)){ echo "impossible de connecter a la bdd" exit; } $resultat= mysql_query("select *From Form ", $connexion); if($resultat) { while ($Form = mysql_fetch_array ($resultat)){ echo $Form ["nom"]."". $Form ["e-mail"]. "
"; } } else { echo "le resultat de la requète ""; echo "le message d'erreur est:". mysql_error($connexion); ?>

Help me please for display data base

@Tdjwenex I’ve fixed it for you in a most basic way. :slight_smile:
I suggest get some basic grip on this subject before stepping in.
image

1 Like

thank you very much so I will try to enter the data into the database using a form

Hello thanks for the help provided last time, I have another problem with my code. I created a form called Questionnaire.php so I appealed to this form in the html page, when a user enters the data in the form then sends in submit, at this moment the me as administrator I have not received any email from the user can you help me please please

1 Like