Jump to content

Bobd314

Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Bobd314's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I have .... $result = mysql_query("select * from Properties"); if that's what you mean.
  2. elseif(isset($_GET['CaseID'])) { $result = mysql_query("SELECT * FROM Cases WHERE CaseID='$_GET[CaseID]'"); while($r=mysql_fetch_array($result)) { $CaseID1 = $r['CaseID']; $PropertyID = $r['PropertyID']; $Issue = $r['Issue']; } ?> <form method="post" action="" enctype="multipart/form-data" name="form1" id="form1"> <table width="500" border="0" cellpadding="0"> <tr> <td width="30%" height="35">Property</td> <td height="35"><select name="PropertyID" multiple size =6> <?php require("../includes/connection.php"); $result = mysql_query("select * from Properties"); while($r = mysql_fetch_array($result)) { $id = $r["PropertyID"]; $StreetAddress = $r["StreetAddress"]; //echo "<option value = \"$id\">$StreetAddress</option>"; //echo "<option value=\""; $sql = "select Cases.PropertyID as CaseID from Cases where Cases.CaseID = '$CaseID1'"; $echo = $sql["CaseID"]; echo "<option value= \"$id\">$StreetAddress $echo</option>\n"; } ?></select> </td> </tr> <tr> <td width="30%" height="35">Issue</td> <td height="35"><INPUT TYPE="TEXT" NAME="Issue" VALUE="<?php echo $Issue1; ?>" size="60"> </td> <input type="hidden" name="CaseID" value="<?php echo $CaseID1; ?>" /> </tr> </table><br /> <INPUT TYPE="submit" name="submit" value="Update!"> </form> <?php } As you can see, that's what I have at the moment. It grabs the CaseID from the url (like ?CaseID=1) and then generates the forms from that. The problem I'm having is with the selection box thing - I want the current value of PropertyID from the Cases table where CaseID = 1... but I don't know how to get that Note: The whole $sql = "bla bla bla" thing was me just trying to get the PropertyID. It didn't work.. only returns the letter s. Hopefully that made some sense, if not, let me know and I'll try to explain it better! I'm not very good at PHP so I hope this isn't too terrible for a first attempt.
  3. Hmm, well I need a way to sort all the things in the MySQL database I made. I have a download\'s category but I want to be able to have a page that lists all the categorys and then the category is a link to a page that has all the download\'s that are in that category. Also if the category is \'font\' on one and \'font\' on another one I dont want it to show 2 links for \'font\'. I have the page to add download\'s and crap but I dont know how to make this. I also have a page now that shows all the downloads just in a list but it doesnt category\'ize them. (Yes I know I posted this in the PHP secion too but I dont know where it would go)
×
×
  • 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.