View Full Version : Getting a variable from the URL

07-27-2007, 04:28 AM
How would you pull something from the URL...I am passing a variable to a url on one page from a link, that code is displayed below.

<a href="?display=indexPage"><img src="home2.gif" alt="Home" />

when it goes to my other page...this error appears
Sorry could not connect to the database SELECT command denied to user 'home'@'localhost' for table 'php'
The get from my previous new page is below.


The code from my select statement is also listed below


$query="select * from $display";

sorry for all of the code I figured that is the easiest way to do it.

07-27-2007, 04:32 AM
Do you ever convert $_GET['display'] into $display? $display must be assigned with the value of $_GET['display'].

Also, it sounds like from the error you got, you don't have correct permissions to access the db...