xxreenaxx1 Posted October 20, 2010 Share Posted October 20, 2010 Hey... I was going through this sample that was given in the class, but got confused at the first point "//change this to include your own database connect script. include "../../dbconnect.php";" and the database connection code is " <?php if ($_POST['submit']) { // connect to your database $connection = pg_connect("port=5432 dbname=rr_ds user=nobody"); if (!$connection) { die("Connection has failed: " . pg_last_error()); }?> " the database connection code is from a previous assignment which i did, but that was for a login page. The current assignment is to connect to the database and have data on it. Link to comment https://forums.phpfreaks.com/topic/216408-database-connect-script-helppp/ Share on other sites More sharing options...
Pikachu2000 Posted October 20, 2010 Share Posted October 20, 2010 So, do you have an actual question? Link to comment https://forums.phpfreaks.com/topic/216408-database-connect-script-helppp/#findComment-1124677 Share on other sites More sharing options...
xxreenaxx1 Posted October 21, 2010 Author Share Posted October 21, 2010 Actually I do, My question is how do you connect pgAdmin database through PHP Link to comment https://forums.phpfreaks.com/topic/216408-database-connect-script-helppp/#findComment-1124942 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.