<td>Event</td>
			<td>
				<input type="text" name="event" value="<?php echo $event; ?>"/>
				<input type="hidden" name="id" value="<?php echo $id; ?>"/>
			</td>
		</tr>
		<tr>
			<td>Tempat</td>
			<td><input type="text" name="tempat" value="<?php echo $tempat; ?>"/></td>
		</tr>
		<tr>
			<td>Mulai</td>
			<td>
				<input type="text" name="mulai" id="mulai"  value="<?php echo readDateJs($mulai); ?>" size="8"/>
				<script type="text/jsdemo" charset="utf-8" class="demojs">
				$('#mulai').datepicker({showOn: 'both', showOtherMonths: true, 
					showWeeks: true, firstDay: 1, changeFirstDay: false,
					buttonImageOnly: true, buttonImage: 'js/datepicker/calendar.gif'});	
				</script>
			</td>
		</tr>
		<tr>
			<td>Selesai</td>
			<td>
				<input type="text" name="selesai" id="selesai"  value="<?php echo readDateJs($selesai); ?>" size="8"/>
				<script type="text/jsdemo" charset="utf-8" class="demojs">
				$('#selesai').datepicker({showOn: 'both', showOtherMonths: true, 
					showWeeks: true, firstDay: 1, changeFirstDay: false,
					buttonImageOnly: true, buttonImage: 'js/datepicker/calendar.gif'});	
				</script>
			</td>
		</tr>
		<tr>
			<td valign="top">Keterangan</td>
			<td><textarea name="keterangan" cols="40" rows="6"><?php echo $keterangan; ?></textarea></td>
		</tr>
		<tr>
			<td colspan="2"><input type="submit" name="simpan" value="Simpan"/></td>
		</tr>
	</table>
	</form>

Each form field is filled with errors:

<br /><b>Notice</b>: Undefined variable: event in <b>C:\xampp\htdocs\php_template2\event_manager.php</b> on line <b>173</b><br />

<br /><b>Notice</b>: Undefined variable: tempat in <b>C:\xampp\htdocs\php_template2\event_manager.php</b> on line <b>179</b><br />

Line 173: <input type="text" name="event" value="<?php echo $event; ?>"/>

Line 179: <input type="text" name="tempat" value="<?php echo $tempat; ?>"/></td>

Those are just two of them, there are three more that are alike.

Also why each form field are filled with unnecessary errors, these errors appears before I fill in the form field with data.

Recommended Answers

All 3 Replies

I just define the variables. Now this is the new error:

Unknown column 'keterangan' in 'field list'

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.