mr.mahon Posted June 21, 2006 Share Posted June 21, 2006 I need to creat a variable from a url like this www.somepage.com/page/?id=43In this example the variable would be 43then I need to query my MySQL database and get a corresponting peice of information from line 43Can anyone help me? Link to comment Share on other sites More sharing options...
dcole.ath.cx Posted June 21, 2006 Share Posted June 21, 2006 use: $data = GET['id'];now $data is 43as for MySQL, I don't know how to get the data out, My Server will not let me put my password in so I haven't learned MySQL... flat files are always good. Link to comment Share on other sites More sharing options...
skym Posted June 21, 2006 Share Posted June 21, 2006 $data = $_GET['id'];SELECT * FROM tb LIMIT $data,1http://dev.mysql.com/doc/refman/4.1/en/select.html Link to comment Share on other sites More sharing options...
justsomeguy Posted June 21, 2006 Share Posted June 21, 2006 It might also beSELECT * FROM tb WHERE id=$data Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now