Note that there are some explanatory texts on larger screens.

plurals
  1. POCan't get data from the database to show in the fields to update through a form
    primarykey
    data
    text
    <p>I have a table in my database called agendas which is linked with another table called meetings. I would like to edit the agendas table through the form but I want the current information in the agendas fields to appear on the web form.</p> <pre><code> &lt;?php include 'library/connect.php'; $agenda_id = $_GET['agenda_id']; $result = mysql_query("SELECT agenda.*, meetings.meeting_id FROM agenda INNER JOIN meetings ON agenda.meetings = meetings.meeting_id WHERE agenda_id = '$agenda_id'"); $row = mysql_fetch_array($result); $meeting_id = $row['meeting_id']; ?&gt; &lt;form id="form1" name="form1" method="post" action="secretary_agendaSuccesful.php?agenda_id=&lt;?php echo $agenda_id; ?&gt;"&gt; &lt;table width="666" border="1"&gt; &lt;tr&gt; &lt;td width="91"&gt;Subject:&lt;/td&gt; &lt;td width="559"&gt;&lt;span id="sprytextarea1"&gt; &lt;label for="subject"&gt;&lt;/label&gt; &lt;textarea name="subject" id="subject" cols="45" rows="5" value="&lt;? echo $row['subject'] ?&gt;"&gt;&lt;/textarea&gt; &lt;span class="textareaRequiredMsg"&gt;A subject is required.&lt;/span&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Duration:&lt;/td&gt; &lt;td&gt;&lt;span id="sprytextfield1"&gt; &lt;label for="duration"&gt;&lt;/label&gt; &lt;input type="text" name="duration" id="duration" value="&lt;? echo $row['duration'] ?&gt;"/&gt; &lt;span class="textfieldRequiredMsg"&gt;duration in hours&lt;/span&gt;&lt;span class="textfieldInvalidFormatMsg"&gt;Enter duration in hours&lt;/span&gt;&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt; &lt;td&gt;&amp;nbsp;&lt;/td&gt; &lt;td&gt;&lt;input type="submit" name="submitbtn" id="submitbtn" value="Submit" /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/form&gt; </code></pre> <p>Is this the correct way to get information from a database into the fields?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload