Click here to Skip to main content
12,622,715 members (29,482 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: Javascript PHP
I have this script that works very well so far, however; its come to light that I need two values passed along. Not just one. Right Now I am passing the RestID from the tblLocations. I also need the CityID from the same table. How can I pass the two values along?

<?php require('config.php'); ?>

And one of the PHP files

<?php
require('config.php');
 
if($_POST['Lid'])
{
$Lid=$_POST['Lid'];
 
$sql=mysql_query("SELECT tblLocations.RestID as LID, tblAreas.AreaName as name
				FROM tblLocations INNER JOIN tblAreas ON tblLocations.AreaID = tblAreas.AreaID
				WHERE tblLocations.RestID = $Lid
				GROUP BY tblLocations.RestID, tblAreas.AreaName
				ORDER BY tblAreas.AreaName ASC");
 
echo '<option selected="selected">--Select Area--</option>';
while($row=mysql_fetch_array($sql))
{
echo '<option value="'.$row['Lid'].'">'.$row['name'].'</option>';
}
}
 
?>
Posted 17-Jan-13 19:54pm
Updated 17-Jan-13 19:56pm
v2
Comments
Kislay Raj 18-Jan-13 7:22am
   
make it more clear so that i can answer you. what do you want mean to say do call both from same php file? or in same function where do you want to send both data mean from php file to that via ajax or other i am waiting for your reply

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.161128.1 | Last Updated 18 Jan 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100