getting post individual string
I have a query which is not getting result.
- $(document).ready(function(e) {
$('.edit').click(function(){
$.post("selected_record.php", {company: $company},
function(data) {
});
});
});
above query send company name to php page.
- $company = $_POST['company'];
$selectedcompany = mysql_query("SELECT * FROM employees where emp_company = '".$company."'");
$comps = mysql_fetch_array($selectedcompany);
$name = $comps['emp_name'];
$designation = $comps['emp_designation'];
$company = $comps['emp_company'];
$email = $comps['emp_email'];
$contact = $comps['emp_contact'];
$city = $comps['emp_city'];
$vehicle = $comps['emp_vehicle'];
above mysql query select record depending upon company.
all i want to get all these strings in my first page where i cant assign $name to an input field's value.
hope my query is not defficult or i m doing it totally wrong.
please advice and help.