Jump to content

daltman1967

New Members
  • Posts

    3
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

daltman1967's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Well, actually, the referencing was working precisely as desired... I just didn't realize it. I checked my variables, and they were correct; however, the data in the TABLE was wrong (which was why I was getting diddly). There are a few bugs to iron out, but I can handle that. Thanks for your help anyway.
  2. $piccurr is defined earlier, starting with "Picture01" and then progressing to "Picture10". However, the contents "Picture01" produces diddly squat. If I specify $nt2[Picture01], I get the contents of the Picture01 column for that record. If I specify instead $nt2[$piccurr], I get nothing. Am I doing something wrong?
  3. Here's where I am thus far: $link = mysql_connect($connection, $username, $password) or die(mysql_error()); mysql_select_db($database) or die( "Unable to select database"); $query2 = "SELECT * FROM inventory_temp WHERE VehID='$VehID'"; $result2 = mysql_query($query2) or die(mysql_error()); $nt2 = mysql_fetch_array($result2); ... echo $nt2[username]; echo $nt2[address]; echo $nt2[city]; What I need to do is access a range of pictures (Picture01 ... Picture10) that are columns in this database, the information for which is stored in the array $nt2. I've assigned the current picture # (starting at Picture01) to the variable $piccurr, and I'd like to access the array like this: $nt2[$piccurr] ... However, I get absolutely nothing. Is it possible to reference the array like this, where the contents of the variable in the brackets is the name of the column I need? If so, what is the correct coding process?
×
×
  • 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.