Jump to content

zohab

Members
  • Posts

    223
  • Joined

  • Last visited

Everything posted by zohab

  1. try following for utf8 header("Content-Type: text/html; charset=utf8\n"); for Windows-1256 header("Content-Type: text/html; charset=Windows-1256\n"); with the help of above it will set charset to Windows-1256 for current page data display. use in the top of the page <?php header("Content-Type: text/html; charset=Windows-1256\n"); ?>
  2. yes i have restarted apache. still i am getting same error message. "You probably tried to upload too large file. Please refer to documentation for ways to workaround this limit." can u tell me how to import 20-50 mb file in mysql DB with "mysqldump" one example
  3. thanks rhodesa i am very happy with u r answer. in u r answer u suggested how to get do processing ajax reurn value from get.php page. i want to get ajax return value in php variable suppose i print echo "test"; in get.php file so i will get "test" with <span name="myspan" id="myspan"></span> how can i get value "test" in some php varibale so that i can put condition like if($test!="") { //do x things } else { //do y things }
  4. hi i have change following settings max_execution_time = 100 ; Maximum execution time of each script, in seconds max_input_time = 100 ; Maximum amount of time each script may spend parsing request data memory_limit = 100M ; Maximum amount of memory a script may consume (16MB) still when i am uploading big file around 20-30mb it is giving following error message "You probably tried to upload too large file. Please refer to documentation for ways to workaround this limit.'
  5. i all I am using following code for ajax related functionality. pls check following code whatever i print in get.php file ,which is called by ajax it print on the page in following <span name="myspan" id="myspan"></span> how can i get this value in some varibale in order to do some processing on it. <script type="text/javascript" language="javascript"> var http_request = false; function makeRequest(url, parameters) { http_request = false; if (window.XMLHttpRequest) { // Mozilla, Safari,... http_request = new XMLHttpRequest(); if (http_request.overrideMimeType) { // set type accordingly to anticipated content type //http_request.overrideMimeType('text/xml'); http_request.overrideMimeType('text/html'); } } else if (window.ActiveXObject) { // IE try { http_request = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { http_request = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} } } if (!http_request) { alert('Cannot create XMLHTTP instance'); return false; } http_request.onreadystatechange = alertContents; http_request.open('GET', url + parameters, true); http_request.send(null); } function alertContents() { if (http_request.readyState == 4) { if (http_request.status == 200) { //alert(http_request.responseText); result = http_request.responseText; document.getElementById('myspan').innerHTML = result; } else { alert('There was a problem with the request.'); } } } function get(obj) { var getstr = "?"; for (i=0; i<obj.childNodes.length; i++) { if (obj.childNodes.tagName == "INPUT") { if (obj.childNodes.type == "text") { getstr += obj.childNodes.name + "=" + obj.childNodes.value + "&"; } if (obj.childNodes.type == "checkbox") { if (obj.childNodes.checked) { getstr += obj.childNodes.name + "=" + obj.childNodes.value + "&"; } else { getstr += obj.childNodes.name + "=&"; } } if (obj.childNodes.type == "radio") { if (obj.childNodes.checked) { getstr += obj.childNodes.name + "=" + obj.childNodes.value + "&"; } } } if (obj.childNodes.tagName == "SELECT") { var sel = obj.childNodes; getstr += sel.name + "=" + sel.options[sel.selectedIndex].value + "&"; } } makeRequest('get.php', getstr); } </script> <input type="button" name="button" value="GET test.html" onclick="javascript:makeRequest('test.html', '');"> <br><br> <input type="button" name="button" value="GET get.php?test=2" onclick="javascript:makeRequest('get.php', '?test=2');"> <br><br> <form action="javascript:get(document.getElementById('myform'));" name="myform" id="myform"> <input type="text" name="myfield" value="teststring"><br> <input type="radio" name="myradio" value="0" checked> 0 <input type="radio" name="myradio" value="1"> 1<br> <input type="checkbox" name="mycheck1" value="1"> 1 <input type="checkbox" name="mycheck2" value="2"> 2 <input type="checkbox" name="mycheck3" value="3"> 3 <input type="checkbox" name="mycheck4" value="4"> 4 <input type="checkbox" name="mycheck5" value="5"> 5 <br> <select name="myselect"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> </select> <br> <input type="button" name="button" value="Submit" onclick="javascript:get(this.parentNode);"> <input type="submit" name="button" value="Normal Submit Button"> </form> <br><br> Server-Response:<br> <span name="myspan" id="myspan"></span> any idea? thanks in advance zohab
  6. i have full access to server can u tell me which setting i have to change/modify i which file i have to do the changes
  7. hi all i have 20 mb sql file. in this file i have all tables and data. i have exported it with phpmyadmin. now when i trying to import it with phpmyadmin it shows me following error messages " You probably tried to upload too large file. Please refer to documentation for ways to workaround this limit. "; where i have do the changes to solve this problem. any ideas? thanks in advance zohaib.
  8. hi all I want to use store procedure in mysql 5 onwards How can i use it. which version of mysql has full support for stored procedures. i had used stored procedures in mssql. can anyone give me example. thanks in advance
  9. hi all i have 2 tables and i need sql query to fetch records as per condition mention below. "table1" /* Following are the column name */ primary_id user_id first_name last_name email phone status "table2" /* Following are the column name */ user_id first_name last_name email phone If record has user_id value then show first_name,last_name,email & phone from "table2" table otherwise show it from "table1" any ideas? thanks in advance.
  10. hi all i am using following query "select * from tmp_table" i have id,col1,col2,col3 columns in my table. i want to select columns except id column. i can do it by "select col1,col2,col3 from tmp_table" but i want to do it without selecting individual column. something like "select * from tmp_table where ---------" any ideas?
  11. hi all i am trying to insert japanese data into mysql table but with the following insert query it insert some garbage value into the database. $details1='あのサン自動車工業製'; $details2='あのサン自動車工業製'; mysql_query("SET NAMES utf8"); $sql = "update products_description set commodity_details1='$commodity_details1' and commodity_details2='$commodity_details2' where products_id=8"; echo"<br>".$sql; $result = mysql_query($sql); mysql_free_result($result); ------------------------------------------------------------------------------------------------- with following code when i am trying to display japanese text from database it displays some garbage values even i enter correct text into database it displays garbage value. $conn = mysql_connect("host", "login","password"); if (!$conn) { echo "Unable to connect to DB: " . mysql_error(); exit; } if (!mysql_select_db("database")) { echo "Unable to select mydbname: " . mysql_error(); exit; } mysql_query("SET NAMES utf8"); //mysql_query("SET CHARACTER SET utf8"); $sql = "select * from products_description where products_id=8"; $result = mysql_query($sql); //echo"<br>".$num_rows = mysql_num_rows($result); while ($row = mysql_fetch_assoc($result)) { echo $row["commodity_details1"]; echo $row["commodity_details2"]; } any ideas? thanks in advance zohab
  12. hi all In my application i am getting data in following format data=>"d9a1d9a1" $msg="d9a1d9a1"; i am converting it into its equivalent format. i am using $s=pack("H*", $msg); to pack data then mssql_query("SET NAMES 'cp1256'"); mssql_query("SET CHARACTER SET 'cp1256'"); inseting $s value in database but i am not getting proper data any ideas?
  13. hi all i have one column in my table(mysql database) varchar(255) and utf8_bin(Collation) now i want to display column data but i is not displying properly.. <?php header('Content-type: text/html; charset=UTF-8') ; include("inc.php"); mysql_query("SET NAMES 'cp1256'"); $qry_keyword = "select * from bs_keyword "; $res_keyword = mysql_query($qry_keyword); // $row_keyword = mysql_fetch_array($res_keyword); ?> any ideas?
  14. hi all i have one script running on iis server http://localhost/pageName.php i want to run this script as service or process, so that it should be running all the time how can i do this? thanks in advanace
  15. Hi all i am using iis and php 5.2 and trying to connect to mssql but i am not able to connect i am getting error message Call to undefined function mssql_connect() i have un-commented php_msssql.dll etc files require and restated server.. but not able to connect to mssql server need help. thanks in advance
  16. yes i have un-commented extension=php_mssql.dll extension=php_pdo_mssql.dll in php.ini file and restated service still i am getting Fatal error: Call to undefined function mssql_connect() in C:\Inetpub\wwwroot\chat.php on line 16 error message
  17. hi all i have installed mysql and mssql on the same machine. when i use php with mysql it works well for me . but if i use php with mssql it does not work. it give me following error message Fatal error: Call to undefined function mssql_connect() in C:\Inetpub\wwwroot\chat.php on line 16 need help? thanks in advance.
  18. hi all i want to add "http://localhost/page.php" as a service on windows(xp,server 2003). so that i can go in control panel and start/stop service. how can i do this? need help? thanks in advance
  19. I have 2 combo box one dependent on other using ajax. i want one more combo box or textfield dependent on second combox and so on more textfield/combo box/radio/ etc in ajax dependent on each other thanks in advace
  20. i have 2 combo box one dependent on other using ajax. i want one more combo box or textfield dependent on second combox and so on more textfield/combo box/radio/ etc in ajax dependent on each other
  21. if i do $_POST['firstboxname']; i am getting first combo box value.(option values in combo box) but if i do $_POST['secondboxname'] with second combo box i am not getting values.
  22. hi all i have used following code in my project.There are 2 combo box first one dependent on other now the problem is i want to perform operation on second combo box i am not able to get value from second combo box. e.g in select box we have values in <option value=""></option> i need option value or other to perform operation dynamicdropdown.php <? include("mysqlconnect.php"); $db='universus'; mysql_select_db($db); ?> <html> <head> <script src="selectcustomer.js"></script> </head> <body> <form> Select a Project Name: <? $sql_sel="select * from prjmaster"; $res=mysql_query($sql_sel); ?> <select name="prjname" onchange="showCustomer(this.value)"> <? while($row1=mysql_fetch_array($res)){ echo "<option " .$select. " value='".$row1['prjID']."'>".$row1['prjName']."</option>"; } echo "</select>"; ?> </form> <p> <div id="txtHint">Task info will be listed here.</div> </p> </body> </html> <script language="javascript"> var xmlHttp function showCustomer(str) { xmlHttp=GetXmlHttpObject(); if (xmlHttp==null) { alert ("Your browser does not support AJAX!"); return; } var url="gettask.php"; url=url+"?q="+str; url=url+"&sid="+Math.random(); xmlHttp.onreadystatechange=stateChanged; xmlHttp.open("GET",url,true); xmlHttp.send(null); } function stateChanged() { if (xmlHttp.readyState==4) { document.getElementById("txtHint").innerHTML=xmlHttp.responseText; //alert(document.getElementById("txtHint").innerHTML); } } function GetXmlHttpObject() { var xmlHttp=null; try { // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); } catch (e) { // Internet Explorer try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } } return xmlHttp; } </script> gettask.php <? include("mysqlconnect.php"); $db='universus'; mysql_select_db($db); $id=$_REQUEST['q']; //echo "$id"; $sql_task="select * from prjtaskdetail where prjID='".$id."'"; $query2=mysql_query($sql_task); echo "<select name='prjtask'>"; while($row2 = mysql_fetch_array($query2)){ echo "<option value='".$row2['taskID']."'>".$row2['Description']."</option>"; } echo "</select>"; ?> need help. 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.