Jump to content

gummby8

New Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by gummby8

  1. Yeah pretty much
  2. I am trying to create a dropdown box and save its selected value to SQL (this part I can do so far) But what I would like is to be able to use the URL of the same page to pull saved data back So if I saved project ID#1 the URL would be www.project.com/form.php?ID=1 Now I know how to get the ID and reference all the SQL data already. How do I get all the dropdowns to populate with their saved values from SQL? Or should this have gone in the php forums? Thank you.
  3. Hello I am trying to setup a form of data filtering to display certain users I have 2 tables "Users" and "Assigned_rolls" What I would like to do is display usernames of all users that have role #1 1)So the query would first get all user IDs from the assigned_roles table that have role 1 2)Then pull the names of all the returned use IDs from the users table. 3)Then display the names on a webpage. I am trying to use $result = mysql_query("SELECT ID FROM roles_assigned WHERE role = '1'"); $result1 = mysql_query("SELECT name FROM user WHERE ID = $result "); If I change $result to a single user id that exists in sql, that users name is displayed properly. I don't know how to get the array that is created in the first query to be used as a searchable variable list in the second query so it will return any user id that had a role of 1 assigned to it in the first table. Obviously I am doing something wrong here. Any help is appreciated.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.