Jump to content

freakymitra

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Everything posted by freakymitra

  1. Hi Friends, I have one script, where i need third drop down to be text area on changing second drop down. Check below link http://krishnaetech.com/pc-cost-calculator/Trial/ --- index.php---- <td ><div id="citydiv"><select name="city"> <option>Select State First</option> </select></div></td> --- index.php--- --Head code-- <script language="javascript" type="text/javascript"> function getXMLHTTP() { //fuction to return the xml http object var xmlhttp=false; try{ xmlhttp=new XMLHttpRequest(); } catch(e) { try{ xmlhttp= new ActiveXObject("Microsoft.XMLHTTP"); } catch(e){ try{ xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e1){ xmlhttp=false; } } } return xmlhttp; } function getState(countryId) { var strURL="findState.php?country="+countryId; var req = getXMLHTTP(); if (req) { req.onreadystatechange = function() { if (req.readyState == 4) { // only if "OK" if (req.status == 200) { document.getElementById('statediv').innerHTML=req.responseText; } else { alert("There was a problem while using XMLHTTP:\n" + req.statusText); } } } req.open("GET", strURL, true); req.send(null); } } function getCity(countryId,stateId) { var strURL="findCity.php?country="+countryId+"&state="+stateId; var req = getXMLHTTP(); if (req) { req.onreadystatechange = function() { if (req.readyState == 4) { // only if "OK" if (req.status == 200) { document.getElementById('citydiv').innerHTML=req.responseText; } else { alert("There was a problem while using XMLHTTP:\n" + req.statusText); } } } req.open("GET", strURL, true); req.send(null); } } </script> ------findcity.php ?> <select name="city"> <option>Select City</option> <? while($row=mysql_fetch_array($result)) { ?> <option value><?=$row['city']?></option> <? } ?> But when i change the code in index.php i.e. drop down to text area input.. i get prompt message XMLHTTP header error. I need last drop down should be text area with integer value Guys help me for this... Thanks in advance Ravi
  2. Hi All, I am stuck at one place for chained Drop Down list from Mysql database. When i select first drop down it should change second drop down value (but its blank in my case) and third value depend on second drop down value selection. (Third is also blank) I feel some thing is miss out in the code. i herewith attached my files. Can you please go through it and please prompt me the error.. As always thanks for your support guys.. ...Ravi [attachment deleted by admin]
  3. :D it works I already created all the steps you given, but with not added user to my database and not given enough privilages, also the password was incorrect.. Now it work fine.. Thanks a lot dude.. Really likes this forum.. You guys rocks.. lol
  4. Hi, When i am trying to run one script on my web server, i get following error Cannot connect to the database using the info you provided Access denied for user 'My_Username'@'localhost' (using password: NO) I filled all info like Host(localhost) Database name(created in cpanel) Username(created in cpanel) Password(i kept blank dont know where to find this) You help will highly appreciate Thanks, Ravindra
  5. No error is displaying. it just keep me login even if open the page in new window or clear the page cache.. Thanks for reply
  6. Hi Guys, I got an error- when i click on logout button, it keeps showing log in. No actual logout happen.. Did i miss/incorrect anything in above code Here is my bit code written in php // User authentication if($hduser['logged_in'] && empty($HTTP_GET_VARS)) { // If user logged in, show message & redirect to index die(dialog("You are already logged in.", $page_title, "Index", "index.php", true, true)); } // // User logs out ---------------------------------------------------------------------------------------------------- // if($_GET['action'] == "logout") { // // Check if user logged in, if not show error // if(!$hduser['logged_in']) { die(dialog("You are not logged in.", $page_title, "Index", "index.php", true, true)); } else { setcookie("hd_userdata", "", time()-36000); die(dialog("You are now logged out.", $page_title, "Log In", "login.php", true, true)); } } # Thanks in advance :-\ :-\
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.