-
Posts
102 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by haibec
-
-
Okie! thank you very much !In the case of AJAX you could also return the data as an xml-structure and parse it using JS and add to the select/combo box.The JS could look something like thisfunction StateChanged(){ if (XmlHttp.readyState == 4) { var XmlDoc = XmlHttp.responseXML; // Clear the select var sel = document.getElementById('districts'); for (I = 0; I < sel.length; ) { sel.remove( 0 ); } // The the districts (DOM) Districts = XmlDoc.getElementsByTagName("district"); // Loop thru the districts for (var I = 0; I < Districts.length; I++) { // Get the districtname var District = Districts[I].firstChild.nodeValue; var DistrictId = Districts[I].item(0).getAttribute( 'id' ); // Create a new option var elOptNew = document.createElement('option'); elOptNew.text = District; elOptNew.value = DistrictId; // Get the select var elSel = document.getElementById('districts'); // Add the option/district try { elSel.add(elOptNew, null); // standards compliant; doesn't work in IE } catch(ex) { elSel.add(elOptNew); // IE only } } }function GetDistricts( Province ){ XmlHttp = GetXMLHTTPObject(); if (XmlHttp==null) { alert ("Your browser does not support AJAX!!"); return; } XmlHttp.onreadystatechange = StateChanged; var URL = "getdistricts.php"; URL = URL + "?province=" + Province; XmlHttp.open( "GET", URL, true ); XmlHttp.send(null);}function ProvinceSelected() { // Get the number/index (in the select) of the selected province var ProvinceNum = document.getElementById('provinces').selectedIndex; // Get the id of the province var Province = document.getElementById('provinces').options[ ProvinceNum ].value; // Get districts GetDistricts( Province );}.....<select id="provinces" name="provinces" onchange="ProvinceSelected()">{Provinces:<option value="ID">PROVINCE</option>}</select><select id="districts" name="districts"></select>
The getdistricts.php-file could look something like this:
<?php// Open db and so on...$query = "SELECT * FROM District WHERE ProvinceID=".$_GET['province'];$res = mysql_query( $query );echo '<?xml version="1.0"?>'."\n";echo '<province id="'.$_GET['province']."\">\n";while ($row = mysql_fetch_array($res, MYSQL_ASSOC)) { echo ' <district id="'.$row['DistrictId'].'">'; echo $row['DistrictName']; echo " </district>\n";}echo "</province>\n";// Close DB and so on..?>
Hope that helped...Good Luck and Don't Panic!
-
Hi Guys!I making a PHP for register. I have a 2 table . Table Province include ProvinceID,ProvinceName. Table Distrist include : ProvinceID,DistristID,DistristName. In my page have a two combo box : Province and Distrist. I want when User click into combo box province then in combobox distrist will list all values distrist of Province. Please help me
-
Hi guys!I have a form for user register, Include 4 checkbox. I want insert 4 textbox into a filed in my Table (only). Please help me!
-
Okie.Thank you very much!I'm sorry, I am not a spammer and I have no reason to use a bulk email program. You might want to do a search. I don't think any of them are free, as the spam industry is exclusively about making money, and is not exactly supported by the open source industry. -
Please tell me about a bulk email program free! !ThankLol man, ASP is not for spamming a million people. Look into a bulk email program that is optimized to do that. -
I make a page ASP send Email to 1000000 Email .I use CDO.MEssage but process of that pages very low! (To time out. not send full 1000000) . Please help me. I need use CDONTS ? help me
-
Example: I have a table Class include fileds : Name,Class . I want insert 1000 row sameOr perhaps:INSERT INTO table (name) VALUES ('ADARMMMM!'), ('jesh'), ('haibec');
-
I want Insert multi values same same into a table .Please help me
-
Hi Guys!I make a page ASP for sendmail use CDO.Message (Send about 500.000 Email). Now , I have a file .JPG size about 500KB. I Public this file .JPG into a Webserver. When I send mail for 500.000 Email. I want send a HTML email (Purpose, email send for customer size very small.) When Customer open their email will view that file .JPG on Webserver. This is my code:<% Dim MyMail,HTML%><!--#INCLUDE FILE="connect.asp"--><% server.ScriptTimeout=server.ScriptTimeout * 10000000 response.write(Server.ScriptTimeout) sSQL = "select * from Customer order by JID desc" Set rs = Server.CreateObject("ADODB.Recordset") rs.source=sSQL set rs.Activeconnection = conn rs.Open,,1,3,1 do while not rs.eof Set myMail=CreateObject("CDO.Message") myMail.Subject="Hello!" MyMail.From= "Jonh <webmaster@bbc.com>" MyMail.To =rs("Email") myMail.CreateMHTMLBody " " 'Please help me %><% MyMail.Subject = " hello!" MyMail.Send response.Write(rs("Email")&" OK "&"<p>") rs.movenext Loop Set Mymail=nothing rs.close set rs=nothing conn.close set conn=nothingserver.ScriptTimeout=server.ScriptTimeout / 10000000%>
-
Thank you very much !MailEnable is probably the best option, but as you can see, it's not exactly free. There's a free version with limited capabilities and payed ones.If you're looking for totally freeware mail server, then the only one I know is Mercury Mail, but I have no idea how to work with it. It's interface is really not user friendly, at least not in comparrison to Mail Enable. -
Hi Guys!I need a mail server (same as Exchange 2003, MDEAMON,...) free running in win2003 server ! Please help me
-
Hi Guys!I have problem : I have table Lottery include fields: ID,Name,Ticket1,Ticket2,Ticket3 ( With a user have max three ticket). I make a program use for Lottery (with Ticket1,ticket2,ticket3). I user random() function.I Want break up my table folow :I will add 2 field in to my table have name : Ticket and NewID and NewID field is Autocrement. With a user have three ticket .Example : ID Name Ticket1 Ticket2 Ticket3 23 John 001 003 112will Break up: NewID ID Name Ticket 1 23 John 001 2 23 John 003 3 23 John 112And finish : I will dial number in NewID use random() functionPlease help me
-
Hi Guys!I hve two table the same, include :ID,Name,Class . I want merger data two table to a single table. Please help me
-
Hi Guys!I have two table. TB1 have ID,Name,Birthday full data. TB2 have ID,Name,Class have done data but Birthday is null. I want corect my DB. I want insert all data from Birhtday on TB1 into Birthday on TB2. Please help me
-
If you help me . I'm very thank to you!you can't you would have to make it a .aspx page like this.<%@ Page Language="C#" %><script runat="server">private void Page_Load(object sender, EventArgs e){ ensureHttps();}private void ensureHttps(){ string url = Request.ServerVariables["REMOTE_ADDR"].ToString(); string protocol = url.Substring(0,5); if(String.Compare("https",protocol) != 0) { url = url.Split(':')[1].Replace("//",String.Empty); Response.Redirect("https://" + url); }}</script><html><head> <title></title></head><body></body></html>
If you insist it must be done with a .htm page you will have to use JavaScript, but that is unreliable since users can turn it off. If you still want it I can write you a javascript to do this. Would you like me to?
I run it and have error:Exception Details: System.IndexOutOfRangeException: Index was outside the bounds of the array.Source Error: Line 13: if(String.Compare("https",protocol) != 0)Line 14: {Line 15: url = url.Split(':')[1].Replace("//",String.Empty);Line 16: Response.Redirect("https://" + url);Line 17: } help me!you can't you would have to make it a .aspx page like this.<%@ Page Language="C#" %><script runat="server">private void Page_Load(object sender, EventArgs e){ ensureHttps();}private void ensureHttps(){ string url = Request.ServerVariables["REMOTE_ADDR"].ToString(); string protocol = url.Substring(0,5); if(String.Compare("https",protocol) != 0) { url = url.Split(':')[1].Replace("//",String.Empty); Response.Redirect("https://" + url); }}</script><html><head> <title></title></head><body></body></html>
If you insist it must be done with a .htm page you will have to use JavaScript, but that is unreliable since users can turn it off. If you still want it I can write you a javascript to do this. Would you like me to?
-
Hiihhihi!I don't know C# . I wan't make .htm with that function . Help meuse the following function as the first to get executed on each pageprivate void ensureHttps(){ string url = Request.ServerVariables["REMOTE_ADDR"].ToString(); string protocol = url.Substring(0,5); if(String.Compare("https",protocol) != 0) { url = url.Split(':')[1].Replace("//",String.Empty); Response.Redirect("https://" + url); }}
I have not had time to check this so there may be some small logic errors but ti demonstrates the basic idea.
-
Hi Guys!my Webser installed HTTPS. I want when user access my Web. (Exemple :http://myweb) the system auto redirect to https://myweb. My web code by ASPX. Please help me
-
MySQL Error!
in PHP
hi Guys!My Web server installed APACHE,PHP,MySQL running very good!. But today. have ERROR : There seems to have been a problem with the database.Please try again by clicking the Refresh button in your web browser.An E-Mail has been dispatched to our Technical Staff, whom you can also contact if the problem persists.We apologise for any inconvenience.I am running VBB and Kayyako (Code by PHP). Please help me
-
Hi guys!I want update Apache and PHP please tell me a about :How to Update Apache and PHP ?Thank
-
DETAIL :Hi friendsI’m trying to disable the browse directory option on Apache 2.0.43, I don’t want users to list any files, under directories without an index.html .Does anyone know how can I accomplish this?Any help will be really appreciated...Best regardsHi GuyS!My Webserver include two servers are running APACHE. one Server used save Pictures . That server include my code . With server picture . Member can browser folder images! I want not alow user browser folders images.Please help me! -
Hi GuyS!My Webserver include two servers are running APACHE. one Server used save Pictures . That server include my code . With server picture . Member can browser folder images! I want not alow user browser folders images.Please help me!
-
Hi Guy!My web server is running IIS for ASP and APACHE for PHP but when i used APACHE running PHP i must change port in file httpd.conf is 8080. Now, i want running PHP on IIS (not must change port ) . Please help me this problem!
-
Hi all!I have two table USER1 includes field : ID, Username,Password and Table USER2 includes filed : ID ,Username,Name . When user register . Data will save into 2 that table . One reason or other, two filed ID on the two table not same but Username on the 2 table same . I want UPDATE all ID on the User1 = ID on the User2 .Please help meeeeeeeeeeee
-
Okie! please help meHi, Why do you need Trigger for simple update, just write an update query that will do?set Gold = Gold + 1000??If there is some thing that I got incorrect please let me know.Hope this helps.Good LuckHemendra Singh ShaktawatMindfire Solutionswww.mindfiresolutions.com
Restore Data MySQL : The MySQL Server returned this Error:
in PHP
Posted
Hi Guys!I used MySQL Administrator for Backup Shedule MySQL. When I use MySQL Administrator restore mydatabase : The MySQL Server returned this Error:MySQL Error Nr.2013-Lost connection to MySQL server during queryPlease help me!