ramjai
-
Posts
9 -
Joined
-
Last visited
Never
Posts posted by ramjai
-
-
hi everybody,I am having two frames and the button is available in the first frame,when i click the button the datas in both frames should be saved.....Any one can help me...Thanks in advance
-
hi everybody,
I want to fetch the maximum value of a field called type from the table named type but i am not getting the result any one can help me.
Coding$type1=pg_query("select max(type) from type where layerid=$lay AND categoryid='$cat3'"); $type2=pg_num_rows($type1); $typ=pg_fetch_object($type1); echo $typ->type;
-
Hai EverybodyThanks for ur reply, when i am fetching the values from combo box the related items must be selected in the next combo box then i am having one text field which will generate automatically the value from the comparision of the combo boxes.For Example, if i am selecting the value from combo box1 and the combo box2 then the type must be 001. if again i am selecting the value from combo box1 and combo box2 then the text field must have the automated value of 002.Can any one help me regarding this.Since i am new to PHP i am unable to do itWith regards,Thanks once again
-
Thanks for ur reply, when i am fetching the values from combo box the related items must be selected in the next combo box then i am having one text field which will generate automatically the value from the comparision of the combo boxes.For Example, if i am selecting the value from combo box1 and the combo box2 then the type must be 001. if again i am selecting the value from combo box1 and combo box2 then the text field must have the automated value of 002.Can any one help me regarding this.Since i am new to PHP i am unable to do itWith regardsThanks once again
-
]Hai All,
I am working with combo boxes. When a user selects an item in a combo box, how do i identify whether an item is selected or not. when an item is selected the flag should be set to true if not it should be false. Which event handler should i use?
-
Hi everybosy,
Any one can help me how to alter the column datatype which is set as primary key for one table and foreign for the second table
-
Hi all,
I have three combo boxes, when i select a value in the first combo box, the second combo box should populate automatically and depending upon the second combo box the third should populate automatically.
But i am getting the following error:
lay[0] = "rawmaterial"; cat[0] = [ "IC"scat[0] = [
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /opt/lampp/htdocs/combo.php on line 30
]; , "MOSFET"scat[0] = [
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /opt/lampp/htdocs/combo.php on line 30
]; ]; lay[1] = "Semi finished Product"; cat[1] = [];
Choose a layer
Choose a category
Choose a subcategory:
can u rectify my error in the following code..............
<?php
?>
<html>
<head>
<script language="JavaScript">
var lay = new Array();
var cat = new Array();
var scat = new Array();</script>
<?php
$con = mysql_connect("localhost","root","jairam") or die('Could not connect');
mysql_select_db("ERP");
$makes = mysql_query("SELECT * FROM layer");
$make_count = 0;
while($make_row = mysql_fetch_array($makes, MYSQL_ASSOC))
{
echo "lay[".$make_count."] = \"".$make_row["layername"]."\";\n";
$models = mysql_query("SELECT categoryname FROM category WHERE layerid=".$make_row["layerid"]);
$model_count = 0;
$num_models = mysql_num_rows($models);
echo "cat[".$make_count."] = [";
while($model_row = mysql_fetch_array($models, MYSQL_ASSOC))
{
echo " \"".$model_row["categoryname"]."\"";
$bittis = mysql_query("SELECT subcategoryname FROM subcategory WHERE categoryid=".$model_row["categoryid"]);
$bitti_count=0;
echo "scat[".$bitti_count."] = [";
while($bitti_row = mysql_fetch_array($bittis, MYSQL_ASSOC))
{
echo "\"".$bitti_row["subcategoryname"]."\"";
$bitti_count++;
}
echo "];\n";
$model_count++;
if($model_count < $num_models)
echo ", ";
}
echo "];\n";
$make_count++;
}
mysql_close($con);
?>
<script>
function populateMakes() {
var makeSel = document.getElementById("layername");
makeSel.length = 0;
for(var i=0; i<lay.length; i++) {
makeSel.options = new Option(lay, lay);
}
}
function doChangeOptions() {
var modelSel = document.getElementById("categoryname");
modelSel.length = 0;
var sel = document.getElementById("layername").selectedIndex;
alert(sel);
var currArr = cat[sel];
alert(currArr);
for(var i=0; i<currArr.length; i++) {
modelSel.options = new Option(currArr, currArr);
}
}
function doChangeOptions1() {
var bittiSel = document.getElementById("subcategoryname");
bittiSel.length = 0;
var sel = document.getElementById("categoryname").selectedIndex;
alert(sel);
var currArr = scat[sel];
alert(currArr);
for(var i=0; i<currArr.length; i++) {
bittiSel.options = new Option(currArr, currArr);
}
}
</script>
</head>
<body onload="populateMakes();doChangeOptions();doChangeOptions1();">
<P>Choose a layer
<select id="layername" onchange="doChangeOptions()">
</select>
</p>
<p>Choose a category
<select id="categoryname" onchange="doChangeOptions1()">
</select>
</p>
<p>Choose a subcategory:
<select id="subcategoryname">
</select>
</p>
</body>
</html>
-
Warning: pg_connect() [function.pg-connect]: Unable to connect to PostgreSQL server: could not translate host name "localhost,dbname=userlog,user=jeyanthi,password=jairam" to address: Name or service not known in /var/www/logins/abcd_bank/admin.php on line 12
can't connect
how to save data in two frames using single button
in PHP Coding Help
Posted