second selectbox of dynamic

second selectbox of dynamic

hello friends i hava a code like this and could any body help me with editing code and send me code. i am getting city values but i can't location values of city from database.thanks in advance.

<html>
<head>
<title>demo</title>
<body>
<form method="POST" action="http://localhost/vtigercrm/modules/Webforms/
post.php">
<input type="hidden" value="Leads" name="moduleName" />
<table>
<tbody>
<tr>
  <td><label>Last Name</label></td>
  <td><input type="text" name="lastname" value="" /></td>
</tr>
<tr>
  <td><label>First Name</label></td>
  <td><input type="text" name="firstname" value="" /></td>
</tr>
<tr>
  <td><label>Company</label></td>
  <td><input type="text" name="company" value="" /></td>
</tr>
<tr>
  <td><label>email</label></td>
  <td><input type="text" name="email" value="" /></td>
</tr>
<tr><td><label>city</label></td><td colspan=1>
   <select name="city">
    <option>city</option>
<?php
$connect=mysql_connect("localhost","root","venkataz");
if(!$connect) die("access failed");
$select=mysql_select_db("vtigercrm530");
if(!$select) die("select failed");
echo "selected vtigercrm530";
$query="SELECT DISTINCT address_city FROM vtiger_users";
$result=mysql_query($query);
if(!$result) die("database access failed:" . mysql_error());
while($row = mysql_fetch_array($result))
{
echo "<option value>".$row['address_city']."</option>";
}
?>
</select>
</tr>
<tr><td><label>lane</label></td><td colspan=1>
<select id="lane" onselect="show();">
<option>location</option>
<script type="text/javascript">
function show()
{
var lane=document.getElementById["lane"].selectedIndex;
alert(lane);
}
</script>
<?php
$connect1=mysql_connect("localhost","root","venkataz");
if(!$connect1) die("access failed");
$select1=mysql_select_db("vtigercrm530");
if(!$select1) die("select failed");
echo "";
echo "<br/>";
$query1="SELECT address_city FROM vtiger_users";
$result1=mysql_query($query1);
if(!$result1) die("database access failed:" . mysql_error());
$lcity=$_REQUEST["city"];
$rows=mysql_num_rows($result1);
for($j=0;$j<$rows;$j++)
if(mysql_result($result1,$j,"address_city")==$lcity)
{
$query2="SELECT address_street FROM vtiger_users WHERE address_city='".mysql_result($result1,$j,'address_city')."'";
$result2=mysql_query($query2);
while($row= mysql_fetch_array($result2))
{
echo "<option value>".$row['address_street']."</option>";
}
}
?>
</select>
</td></tr>
</tbody>
<table>
<input type="submit" value="Submit" />
</form>
</body>
</head>
</html>
View Answers









Related Tutorials/Questions & Answers:
second selectbox of dynamic
second selectbox of dynamic  hello friends i hava a code like this and could any body help me with editing code and send me code. i am getting city values but i can't location values of city from database.thanks in advance
Second Section
 Second SectionPrev Appendix A. First Appendix Next     Second Section The Sun Certified Business Component Developer (SCBCD) for the Java 2 Platform, Enterprise
Advertisements
how to implement ajax in struts2 to operate on selectbox in jsp
how to implement ajax in struts2 to operate on selectbox in jsp  I am doing a project on struts2 in which i have a jsp page which has 2 select boxes like </s:form>` ` now i want that when i select a district
selectbox - Framework
ModuleNotFoundError: No module named 'second'
ModuleNotFoundError: No module named 'second'  Hi, My Python... 'second' How to remove the ModuleNotFoundError: No module named 'second'... to install padas library. You can install second python with following command
One-Millionth of a second is referred as
One-Millionth of a second is referred as  One-Millionth of a second is referred as -? 1. Microsecond 2. Millisecond 3. Hour 4. Minute 5. All of the above   Answer: 1. Microsecond
One-thousand of a second is called
One-thousand of a second is called  One-thousand of a second is called- 1. Microsecond 2. Millisecond 3. Hour 4. Minute 5. All of the above   Answer: 1. Microsecond
DYNAMIC BINDING
DYNAMIC BINDING  WHAT IS DYNAMIC BINDING
Second level cache
Second level cache  Hi, I have been asked one question which I have no idea about. It's like I have enabled second level caching and the data has... and how do I refresh( reload) my second level cache. Please advise, and ignore my
select employee name based on his/her designation in selectbox
selectbox in jsp it is possible? if it is possible pls send me that code urgent
dynamic report
dynamic report  i need complete code for generating dynamic report in jsp
ModuleNotFoundError: No module named 'second_open.py'
ModuleNotFoundError: No module named 'second_open.py'  Hi, My... named 'second_open.py' How to remove the ModuleNotFoundError: No module named 'second_open.py' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'second-repo'
ModuleNotFoundError: No module named 'second-repo'  Hi, My Python... 'second-repo' How to remove the ModuleNotFoundError: No module named 'second-repo' error? Thanks   Hi, In your python environment
dynamic polymorphism
dynamic polymorphism  Develop with suitable hierarchy, classes for Point, Shape, Rectangle, Square, Circle, Ellipse, Triangle, Polygon, etc. Design a simple test application to demonstrate dynamic polymorphism
how to select second combobox value .
how to select second combobox value .  I requirement is , i have two combo box, i am selected first combo box value then automatically second combo box value show ,But this both combo box value i retrieves in database. please
Dynamic keyword
Dynamic keyword  hi....... What is the dynamic keyword used for in flex? give me the answer ASAP Thanks  Ans: Dynamic keyword-> Specifies that instances of a class may possess dynamic properties added
dynamic form
dynamic form  I need to make a dynamic form using php, for example, i... dropdown, the states belong to that countries will get displayed in second dropdown from database. And when the user select state from the second dropdown
dynamic jquery statement
dynamic jquery statement  dynamic jquery statement
dynamic polymorphism
dynamic polymorphism  give an example for dynamic polymorphism?   Dynamic polymorphism is where a class overrides a superclass method... seen at runtime, so they are considered dynamic. Here is an example
PHP Dynamic CheckBox
PHP Dynamic CheckBox  Help with Dynamic Checkbox in PHP
php dynamic array checking
php dynamic array checking  php dynamic array checking
php dynamic array checking
php dynamic array checking  php dynamic array checking
create dynamic array in javascript
create dynamic array in javascript  How to create dynamic array in javascript
Second Normal Form (2NF)
Second Normal Form (2NF)       Second Normal Form (2NF) The concept of remove the delicacy of data comes in the Second Normal Form (2NF).ADS_TO_REPLACE_1 A. 
dynamic textfields
dynamic textfields  Hi, I am a fresher and joined recently in one company. they gave me a desktop application project using swings.here is my detailed spec Screen 1 - The user enters the ingredients from a food product, saves
Dynamic form
Dynamic form  I need to make a dynamic form using jsp for example, i will need a list of items which when we select one option another list is modified ( like 2 lists of countries and citys ), and also a radio button wich once
problem in selecting second arraylist from mysql database
, but i want second list to be dynamic from database. Please, help me out. Thank...problem in selecting second arraylist from mysql database  Hi...', it should give list of that selected one in second list, BUT THAT list should be stored
ModuleNotFoundError: No module named 'aio-throttle-to-next-second'
ModuleNotFoundError: No module named 'aio-throttle-to-next-second'  ...: No module named 'aio-throttle-to-next-second' How to remove the ModuleNotFoundError: No module named 'aio-throttle-to-next-second' error? Thanks
ModuleNotFoundError: No module named 'aio-throttle-to-next-second'
ModuleNotFoundError: No module named 'aio-throttle-to-next-second'  ...: No module named 'aio-throttle-to-next-second' How to remove the ModuleNotFoundError: No module named 'aio-throttle-to-next-second' error? Thanks
ModuleNotFoundError: No module named 'aio-throttle-to-next-second'
ModuleNotFoundError: No module named 'aio-throttle-to-next-second'  ...: No module named 'aio-throttle-to-next-second' How to remove the ModuleNotFoundError: No module named 'aio-throttle-to-next-second' error? Thanks
ModuleNotFoundError: No module named 'aio-throttle-to-next-second'
ModuleNotFoundError: No module named 'aio-throttle-to-next-second'  ...: No module named 'aio-throttle-to-next-second' How to remove the ModuleNotFoundError: No module named 'aio-throttle-to-next-second' error? Thanks
ModuleNotFoundError: No module named 'leap-second-client'
ModuleNotFoundError: No module named 'leap-second-client'  Hi, My... named 'leap-second-client' How to remove the ModuleNotFoundError: No module named 'leap-second-client' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'my_second_module'
ModuleNotFoundError: No module named 'my_second_module'  Hi, My... named 'my_second_module' How to remove the ModuleNotFoundError: No module named 'my_second_module' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'odoo10-addon-partner-second-lastname'
ModuleNotFoundError: No module named 'odoo10-addon-partner-second-lastname...: ModuleNotFoundError: No module named 'odoo10-addon-partner-second-lastname' How to remove the ModuleNotFoundError: No module named 'odoo10-addon-partner-second
ModuleNotFoundError: No module named 'odoo10-addon-partner-second-lastname'
ModuleNotFoundError: No module named 'odoo10-addon-partner-second-lastname...: ModuleNotFoundError: No module named 'odoo10-addon-partner-second-lastname' How to remove the ModuleNotFoundError: No module named 'odoo10-addon-partner-second
ModuleNotFoundError: No module named 'odoo11-addon-partner-second-lastname'
ModuleNotFoundError: No module named 'odoo11-addon-partner-second-lastname...: ModuleNotFoundError: No module named 'odoo11-addon-partner-second-lastname' How to remove the ModuleNotFoundError: No module named 'odoo11-addon-partner-second
ModuleNotFoundError: No module named 'odoo11-addon-partner-second-lastname'
ModuleNotFoundError: No module named 'odoo11-addon-partner-second-lastname...: ModuleNotFoundError: No module named 'odoo11-addon-partner-second-lastname' How to remove the ModuleNotFoundError: No module named 'odoo11-addon-partner-second
ModuleNotFoundError: No module named 'odoo12-addon-partner-second-lastname'
ModuleNotFoundError: No module named 'odoo12-addon-partner-second-lastname...: ModuleNotFoundError: No module named 'odoo12-addon-partner-second-lastname' How to remove the ModuleNotFoundError: No module named 'odoo12-addon-partner-second
ModuleNotFoundError: No module named 'odoo8-addon-partner-second-lastname'
ModuleNotFoundError: No module named 'odoo8-addon-partner-second-lastname' ...: ModuleNotFoundError: No module named 'odoo8-addon-partner-second-lastname' How to remove the ModuleNotFoundError: No module named 'odoo8-addon-partner-second
ModuleNotFoundError: No module named 'odoo8-addon-partner-second-lastname'
ModuleNotFoundError: No module named 'odoo8-addon-partner-second-lastname' ...: ModuleNotFoundError: No module named 'odoo8-addon-partner-second-lastname' How to remove the ModuleNotFoundError: No module named 'odoo8-addon-partner-second
ModuleNotFoundError: No module named 'second_hand_songs_wrapper'
ModuleNotFoundError: No module named 'second_hand_songs_wrapper'  Hi...: No module named 'second_hand_songs_wrapper' How to remove the ModuleNotFoundError: No module named 'second_hand_songs_wrapper' error? Thanks  
ModuleNotFoundError: No module named 'aio-throttle-to-next-second'
ModuleNotFoundError: No module named 'aio-throttle-to-next-second'  ...: No module named 'aio-throttle-to-next-second' How to remove the ModuleNotFoundError: No module named 'aio-throttle-to-next-second' error? Thanks
ModuleNotFoundError: No module named 'dfantasy-second-time-script'
ModuleNotFoundError: No module named 'dfantasy-second-time-script'  ...: No module named 'dfantasy-second-time-script' How to remove the ModuleNotFoundError: No module named 'dfantasy-second-time-script' error? Thanks
dynamic calender
dynamic calender  hi i need the code to "insert date using GUI"   Hi Friend, Try the following code:ADS_TO_REPLACE_1 import java.awt.*; import java.awt.event.*; import javax.swing.*; class DatePicker{ int month
How to enable second level cache in Hibernate 5?
How to enable second level cache in Hibernate 5?  Hi, I want to enable the secondary level caching in Hibernate 5. How to enable second level cache in Hibernate 5? Thanks
dynamic query
dynamic query  DECLARE QUERY VARCHAR2(32767); FIN_QUERY VARCHAR2(32767); CURSOR C IS (select distinct PORTFOLIO from MPE_TEST1); CURSOR C2 IS SELECT DISTINCT PORTFOLIO_LEVEL, PORTFOLIO FROM MPE_TEST1 ORDER
how to add dynamic data
how to add dynamic data  how to add dynamic data to an existing web application
dynamic web pages in html
dynamic web pages in html  How to create Dynamic web pages in HTML
static page and dynamic pages?
static page and dynamic pages?  what is the static page and dynamic pages
static page and dynamic pages?
static page and dynamic pages?  what is the diff between static page and dynamic pages

Ads