Hi
am new to PHP so please excuse easy question!
On my web server i have created new mysql db called xxxx_zzzz
password is Qwerty
username is xxxx_zzzz
in public_html dir i created dir called testphp and uploaded the below file called phpdbtest.php
<?php $db_host=“localhost”; $db_username = “xxxx_zzzz”; $db_pass=“Qwerty”; $db_name=“xxxx_zzzz”; mysql_connect(“$db_host”,$db_username”,$db_pass”) or die(mysql_error()); mysql_select_db(“$db_name”) or die(“no database that name”); ?>then i created another file in the same dir called phpdbtestfile2 per below
<?php include_once “connect_to_phpdbtest.php”; echo “You are connected to your database”; ?>then i goto google chrome and access website www.xxxx.com.au/testphp/phpdbtestfile2.php
and i get this error on the screen
the web page isnt working
and is currently unable to handle this request.
HTTP ERROR 500
and in the error log i see
[12-Jan-2017 21:21:47 Antarctica/Macquarie] PHP Parse error: syntax error, unexpected ‘are’ (T_STRING), expecting ‘,’ or ‘;’ in /home/*******/public_html/testphp/phpdbtestfile2.php on line 3
can anyone help me please?
thanks
Sue