i create a form for update. there are 8 columns in my mysql table. on my main page all the data is retrieve from db and displayed on the page. after every row there is a link edit. when user click that link it goes to a form where all the required fields are displayed. the user may only change one column or two. so my question is how we will know in website which column is to be updated. ofcourse we know the column with modified value will have to be change in db but how we can implement this in php.
my code is my form which is a long one
Code: [Select]<form name="form1" method="post" action="jobsReview.php">
<p align="left">Fill the Following Form</p>
<table width="702" height="486" border="0">
<tr>
<td width="315" height="24"><div align="left">Job Title:</div></td>
<td width="377"><select name="title" id="title">
<option value="Computer Lecturer">Computer Lecturer</option>
<option value="Management Lecturer">Management Lecturer</option>
<option value="English Lecturer">English Lecturer</option>
<option value="Islamyat Lecturer">Islamyat Lecturer</option>
<option value="Electronics Lecturer">Electronics Lecturer</option>
<option value="Economics Lecturer">Economics Lecturer</option>
<option value="Mathematics Lecturer">Mathematics Lecturer</option>
</select></td>
</tr>
<tr>
<td height="26"><div align="left">University:</div></td>
<td><label>
<input type="text" name="university" id="university">
</label></td>
</tr>
<tr>
<td height="24"><div align="left">Minimum Education Required:</div></td>
<td><label>
<input type="text" name="education" id="education">
</label></td>
</tr>
<tr>
<td height="24"><div align="left">Experience Required:</div></td>
<td><label>
<input type="text" name="req_experience" id="req_experience">
</label></td>
</tr>
<tr>
<td height="21">Post On:</td>
<td><select name="day" id="day">
<?php while( $row = mysql_fetch_array($resultday) ) { ?>
<option value="<?php echo $row['id']; ?>"><?php echo $row['day']; ?></option>
<?php } ?>
</select>
-
<select name="month" id="month">
<?php while( $row = mysql_fetch_array($resultmonth) ) { ?>
<option value="<?php echo $row['id']; ?>"><?php echo $row['month']; ?></option>
<?php } ?>
</select>
-
<select name="year" id="year">
<?php while( $row = mysql_fetch_array($resultyear) ) { ?>
<option value="<?php echo $row['id']; ?>"><?php echo $row['year']; ?></option>
<?php } ?>
</select></td>
</tr>
<tr>
<td height="21">Apply By:</td>
<td><select name="days" id="days">
<?php while( $row = mysql_fetch_array($resultdays) ) { ?>
<option value="<?php echo $row['id']; ?>"><?php echo $row['day']; ?></option>
<?php } ?>
</select>
-
<select name="months" id="months">
<?php while( $row = mysql_fetch_array($resultmonths) ) { ?>
<option value="<?php echo $row['id']; ?>"><?php echo $row['month']; ?></option>
<?php } ?>
</select>
-
<select name="years" id="years">
<?php while( $row = mysql_fetch_array($resultyears) ) { ?>
<option value="<?php echo $row['id']; ?>"><?php echo $row['year']; ?></option>
<?php } ?>
</select></td>
</tr>
<tr>
<td height="325" valign="top"><div align="left">Job Description:</div></td>
<td valign="top"><label>
<textarea name="description" id="description" cols="60" rows="20"></textarea>
</label></td>
</tr>
<tr>
<td height="26"> </td>
<td><input type="submit" name="submit" id="button" value="Edit Job"></td>
</tr>
</table>
<p> </p>
</form>
and here is my php
Code: [Select]<?php
if(isset($_POST['submit']))
{
$id = $_GET["id"];
$db = mysql_connect("localhost");
mysql_select_db("jobolicious", $db);
$quizquery = "UPDATE jobs_uni SET column='{$data}' WHERE id='{$id}'" or die(mysql_error());
//echo $query;
$result = mysql_query($query) or die(mysql_error());
}
?>
cURL and Sessions
Ohai.So, I'm trying to cURL a bunch of things off of a page, and put them into a session. I've added all of the items so they look like $_SESSION['fur'] = ge_item(6814)Now I just need to figure out
Move array index to end
Hey guys, Quick question: I have an array that looks like this:Code: [Select]$var = array( 'name' => 'thename', 'title' => 'thetitle', 'media'
unexpected T_VARIABLE error
Hey all! I'm getting an unexpected T_VARIABLE with the following function:function getHighestParentName($id = $this->cid){ $cat = mysql_fetch_assoc(fsquery('getParentCategories', $id));
How to convert this array to string
I am having problems converting this array to a stringusing print_r($val[1]); I get: Code: [Select]Array( [0] => Array ( [name] => John ) [1] =>
Using Windows message as a Handle
Hi,
calendar dates and hours compare problem
i have a calendar in wordpress, everything works great except that i can make 2 meetings at the same date, time and room without receiving any error i don't know where to start to compare the days
socket makes browser hang...
I have a socket server, and I am having a problem at the moment...A browser sends a http header request to the server, but... some browsers send one request for one file, and others want 2. For
CHMOD script
Hi,I need a script to read all files in a folder and set to 777.Can anyone help out please?
Multipe Dynamic Controls & AutoPostback Issue
I currently have a need to create many dynamic controls (Example Textboxes) that need to do a PostBack upon the data in the control changing (Autopostback = true). The following sample code
SQl num_rows problem
when i try to count rows from an SQL select i get an warningCode: [Select]$countviews = mysql_query("SELECT * FROM viewed WHERE sfw = '0' AND cookieid = $id");$num_rows_viewed =