Thanks!!!!!
I want to put the info after the ? in the url (/test.php?id=2002) into line 11.
I know about <? echo $id?> (and I get the res. 2002 when I put <? echo $id?> as a line 0), but this isn't working when I put this into line 11.
- <?php
- $db_name = "myname";
- $table_name = "redirects";
4.
- $cnx = mysql_connect("host", "myname", "pass")
- or die("Couldn't connect.");
7.
- $db = mysql_select_db($db_name, $cnx)
- or die("Couldn't select database.");
10.
- $id = 2002; //The id we want to get
12.
- $result = mysql_query("SELECT address,label from redirects 14. WHERE id=" . $id) or die("Error! " . $mysql_error($dblink));
- list($myAddress,$myLabel) = mysql_fetch_row($result);
16.
- print "" . $myaddress . "" . $myLabel . "\n";
- ?>
</pre>
What's the solution?
Thanks,
abcd