Quantcast
Channel: Adobe Community : All Content - All Communities
Viewing all articles
Browse latest Browse all 290743

localhost db testing

$
0
0

I am trying to test locally with some sql/php code.  I am familiar with php/sql, but not with using workbench, or local hosting.  so I set up a site called localhost, and i set "connect using:" to local/network.  i set the web url to 127.0.0.1/.  I wrote up some simple php to connect to my local db that I have created and running:

 

<?php

mysql_connect("localhost", "root", "password") or die(mysql_error());

echo "Connected to MySQL";

mysql_select_db("movies") or die(mysql_error());

echo "Connected to Database";

?>

 

I view the page in Firefox, and nothing shows up.  I even try to echo something before the connection, still nothing.  I view the source code, and everything looks right.  What am I missing?


Viewing all articles
Browse latest Browse all 290743

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>