jamesk Posted March 18, 2009 Share Posted March 18, 2009 Hi, I am trying to create a dropdown menu to navigate to a reference in my database via the id number the code i am using looks like this: <form name="drop"> <select name="list" OnChange="location.href=drop.list.options[selectedIndex].value"> <?php do { ?> <option> <a value="http://localhost/fckdatabase/test.php?pageNum_test=<?php echo $row_edit['id']; ?>&totalRows_test=44"><?php echo $row_edit['Name']; ?></a> <?php } while ($row_edit = mysql_fetch_assoc($edit)); ?> </select> Am i doing something wrong because when i click on the link it will try and take me to the data stored in my "Name" field for example the link in my browser looks like this: http://localhost/private/New%20page and i want it to look like this http://localhost/private/test.php?pageNum_test=3&totalRows_test=44"> the bold 3 should the echo of the id field any hints or better ways of doing this? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/149965-option-select-hyperlink-to-sql-databse/ Share on other sites More sharing options...
fenway Posted March 19, 2009 Share Posted March 19, 2009 There isn't even a query here... are you sure this is a mysql issue? Quote Link to comment https://forums.phpfreaks.com/topic/149965-option-select-hyperlink-to-sql-databse/#findComment-788273 Share on other sites More sharing options...
jamesk Posted March 19, 2009 Author Share Posted March 19, 2009 The queries have already been made $row_edit $edit contain the quires I wish to run in a link. does that make sense? Quote Link to comment https://forums.phpfreaks.com/topic/149965-option-select-hyperlink-to-sql-databse/#findComment-788309 Share on other sites More sharing options...
jamesk Posted March 19, 2009 Author Share Posted March 19, 2009 I've solved that problem however now i have this one: I am trying to make links that are in relation to my database. I am try it make it so that one page shows a lists of links displaying the information in my "Name" field. I have a unique key set up so that each record is identifiable "id". and I want to display my record "data" Any help would be super Quote Link to comment https://forums.phpfreaks.com/topic/149965-option-select-hyperlink-to-sql-databse/#findComment-788323 Share on other sites More sharing options...
fenway Posted March 27, 2009 Share Posted March 27, 2009 Again, if you're talking about using mysql data that has been successfully retrieved, you're in the wrong forum.... Quote Link to comment https://forums.phpfreaks.com/topic/149965-option-select-hyperlink-to-sql-databse/#findComment-795232 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.