Jump to content

AdamSteele

New Members
  • Content Count

    4
  • Joined

  • Last visited

Community Reputation

0 Neutral

About AdamSteele

  • Rank
    Newbie
  1. how would i go about linking each individual echo'd out button to the row it was printed out with? I really have no clue im sorry, the code above was my best attempt at doing so
  2. Hello. Im storing them there, so that on a different page (Which the button opens once it is clicked) the choice they picked comes up, and from that they can pick a seat based off that specific production. The Date and Time being picked doe's work in correlation to the button, it shows the title, date and time appropriately to the correct title. However, only for the very bottom of the list. See the attached image. It doesn't display these outputs based on the button that is clicked in terms of the row, however just the bottom of the list. But does display the variables themselves correctly, just not the correct ones.
  3. Hello, sorry im completely new to PHP, i was expecting that the row that the button was printed on would correlate to the $row result, and therefore each button would return the corresponding row's that it was printed with. However i'm not sure how to achieve that past what i tired to do
  4. Hello, i have a query that returns the rows of certain parts of a databse. i made a button on the end of each echo, to make sure that, the button being printed with each echo, correlates to that echo. However, the SESSIONS only return the same varaibles each time. The last in the list. $sql = "SELECT p.Title, p.PerfDate, p.PerfTime FROM performance AS p INNER JOIN production AS r ON p.Title = r.Title"; $result = $conn->query($sql); if ($result->num_rows > 0) { // output data of each row while($row = $result->fetch_assoc()) { echo '<tr> <td>'.$row['Title'].'</td> <td>'.$row['PerfDate'].'</td> <td>'.$row['PerfTime'].'</td> <td><button name="availability" value="'.$row['Title'].'">Availability</button></td> </tr>'; $_SESSION["Title"] = $row['Title']; $_SESSION["PerfDate"] = $row['PerfDate']; $_SESSION["PerfTime"] = $row['PerfTime']; } } else { echo "0 results"; } $_SESSION["name"] = $_GET["name"]; ?> How am i able to make it so each button correlates to each row? There's a screenshot of how it looks for reference
×
×
  • 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.