---- Newbie Question - Php, Mysql, Meta Tags and retrieving the data
Skorpios - 6:53 pm on Mar 8, 2013 (gmt 0)
I started what should have been a fairly basic exercise yesterday. I have a mysql DB set up, I have the connection script and I have a SELECT query. With the help from someone else I have got to the stage where the data for the fields is being delivered to the page however it is not dynamic. Meaning I am only getting 1 record.
Now I need to get the number in the select statement to be dynamic so that it chooses the right record from the DB according to what page is being displayed.
My code for the home page is
<!DOCTYPE HTML> <html> <head> <link rel="apple-touch-icon" href="apple_touch_icon.png"/> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <?php include_once('../includes/fetchmetadata.php'); ?> <link rel="shortcut icon" href="favicon.ico" type="image/icon" /> <!-- favicon for browser, the image is .ico file in root directory--> <title></title> </head>
I just want to get this working before putting any effort into the site itself.
I have been advised that I should
You would typically use the URL query string to specify the id, then use $_GET to get it.
Although that may give me an answer, I do not know how to do this, can anyone help please as although this in itself is not of major importance once I have it working it will help me learn a little about php.