Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Kyle Hudson MCP CCNA CIW

Members
  • Joined

  • Last visited

Everything posted by Kyle Hudson MCP CCNA CIW

  1. Hi mynot, to pick up the referring page you can <?php $ref = $_SERVER['HTTP_REFERER']; ?> , however I am not sure if this will work with the form. Another solution would be to go through the site and add a hidden form input but that could be a pain. Hope this helped a little. Kyle
  2. Hi All, I am having issues with IE (6, 7 & . I am using the Simple AJAX Code-Kit (SACK) v1.6.1 which works fine in FF, GC, Opera and Safiri. In IE it throws the error: System error: -1072896658. [DESC] Breaking on JS error on line 157 (self.response = self.xmlhttp.responseText;). I have no ideas, please help. [code] /* Simple AJAX Code-Kit (SACK) v1.6.1 */ /* �2005 Gregory Wild-Smith */ /* www.twilightuniverse.com */ /* Software licenced under a modified X11 licence, see documentation or authors website for more details */ function sack(file) { this.xmlhttp = null; this.resetData = function() { this.method = "POST"; this.queryStringSeparator = "?"; this.argumentSeparator = "&"; this.URLString = ""; this.encodeURIString = true; this.execute = false; this.element = null; this.elementObj = null; this.requestFile = file; this.vars = new Object(); this.responseStatus = new Array(2); }; this.resetFunctions = function() { this.onLoading = function() { }; this.onLoaded = function() { }; this.onInteractive = function() { }; this.onCompletion = function() { }; this.onError = function() { }; this.onFail = function() { }; }; this.reset = function() { this.resetFunctions(); this.resetData(); }; this.createAJAX = function() { try { this.xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e1) { try { this.xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e2) { this.xmlhttp = null; } } if (! this.xmlhttp) { if (typeof XMLHttpRequest != "undefined") { this.xmlhttp = new XMLHttpRequest(); } else { this.failed = true; } } }; this.setVar = function(name, value){ this.vars[name] = Array(value, false); }; this.encVar = function(name, value, returnvars) { if (true == returnvars) { return Array(encodeURIComponent(name), encodeURIComponent(value)); } else { this.vars[encodeURIComponent(name)] = Array(encodeURIComponent(value), true); } } this.processURLString = function(string, encode) { encoded = encodeURIComponent(this.argumentSeparator); regexp = new RegExp(this.argumentSeparator + "|" + encoded); varArray = string.split(regexp); for (i = 0; i < varArray.length; i++){ urlVars = varArray[i].split("="); if (true == encode){ this.encVar(urlVars[0], urlVars[1]); } else { this.setVar(urlVars[0], urlVars[1]); } } } this.createURLString = function(urlstring) { if (this.encodeURIString && this.URLString.length) { this.processURLString(this.URLString, true); } if (urlstring) { if (this.URLString.length) { this.URLString += this.argumentSeparator + urlstring; } else { this.URLString = urlstring; } } // prevents caching of URLString this.setVar("rndval", new Date().getTime()); urlstringtemp = new Array(); for (key in this.vars) { if (false == this.vars[key][1] && true == this.encodeURIString) { encoded = this.encVar(key, this.vars[key][0], true); delete this.vars[key]; this.vars[encoded[0]] = Array(encoded[1], true); key = encoded[0]; } urlstringtemp[urlstringtemp.length] = key + "=" + this.vars[key][0]; } if (urlstring){ this.URLString += this.argumentSeparator + urlstringtemp.join(this.argumentSeparator); } else { this.URLString += urlstringtemp.join(this.argumentSeparator); } } this.runResponse = function() { eval(this.response); } this.runAJAX = function(urlstring) { if (this.failed) { this.onFail(); } else { this.createURLString(urlstring); if (this.element) { this.elementObj = document.getElementById(this.element); } if (this.xmlhttp) { var self = this; if (this.method == "GET") { totalurlstring = this.requestFile + this.queryStringSeparator + this.URLString; this.xmlhttp.open(this.method, totalurlstring, true); } else { this.xmlhttp.open(this.method, this.requestFile, true); try { this.xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=ISO-8859-1;") this.xmlhttp.setRequestHeader('User-agent' , 'Mozilla/4.0 (compatible) Naruki'); } catch (e) { } } this.xmlhttp.onreadystatechange = function() { switch (self.xmlhttp.readyState) { case 1: self.onLoading(); break; case 2: self.onLoaded(); break; case 3: self.onInteractive(); break; case 4: if(self.xmlhttp.status==200){ self.response = self.xmlhttp.responseText; //console.log(self.xmlhttp.responseText); self.responseXML = self.xmlhttp.responseXML; self.responseStatus[0] = self.xmlhttp.status; self.responseStatus[1] = self.xmlhttp.statusText; } else{alert("Problem retrieving XML data")} if (self.execute) { self.runResponse(); } if (self.elementObj) { elemNodeName = self.elementObj.nodeName; elemNodeName.toLowerCase(); if (elemNodeName == "input" || elemNodeName == "select" || elemNodeName == "option" || elemNodeName == "textarea") { self.elementObj.value = self.response; } else { self.elementObj.innerHTML = self.response; } } if (self.responseStatus[0] == "200") { self.onCompletion(); } else { self.onError(); } self.URLString = ""; /* These lines were added by Alf Magne Kalleland ref. info on the sack home page. It prevents memory leakage in IE */ delete self.xmlhttp['onreadystatechange']; self.xmlhttp=null; self.responseStatus=null; self.response=null; self.responseXML=null; break; } }; this.xmlhttp.send(this.URLString); } } }; this.reset(); this.createAJAX(); } Thanks, Kyle
  3. Ben, can you confirm: 1. You have opened a connection to MySQL. 2. You have selected the DB. Try: $linkname = //mysql connect $data = mysql_query("SELECT * FROM users WHERE username = '($this->username)' AND password = '($this->password)'", $linkname); if(mysql_num_rows($data) > 0) { $row = mysql_fetch_array($data); //line 68 $this->id = $row['id']; return true; } else { return false; } Another idea would be to use MySQLi or even PDO. Kyle
  4. Hi akinleke, It really depends on how much data your wanting to display, your hosting setup etc.
  5. Is it just me or does it appear every Dixons Group website is down? www.dixons.co.uk, www.dixons.com, www.pcservice.co.uk, www.pcworld.co.uk, www.dixons-business.co.uk, www.pcwbd.co.uk, http://y2k.dixons.com and www.partmaster.co.uk? Kyle
  6. I work alongside Skyte Media and they are always very friendly and reliable - 10/10.
  7. Come on! Someone must be interested a little bit? Maybe you need something custom creating let us know and we will see what we can do. Kyle
  8. Hi Guys and Gals, Well its been two months in the making and testing and here it comes. We need 5 beta testers to test out our new SMS (text message) registration service, each tester will be given 10 free credits (ten messages) to use. We are looking for feedback on what you think of the system and if it would be right for you. We will also be running a competition where we will be giving away 200 free credits. We would like your input both on the service and pricing. To test the service please either email me at kyle.hudson@diskhub.co.uk or post below. I will then contact you with your API access details and implimentation code. If anyone has any comments in general please feel free to post below and I will look into your comments and suggestions. Please note: this is only open to the first 5 replies and open to UK based sites only. Kyle
  9. It doesn't work, I am not sure exactly what you are trying to do but if you have PHP5 you can use "simple_xml_loadfile". Example: <?php $xml = simplexml_load_file('http://www.culturenorthernireland.org/rss/Belfast.xml'); echo "<ul>\n"; foreach ($xml->channel->item as $item){ echo "<li><a href=\"$item->link\">$item->title</a></li>\n"; } echo "</ul>"; ?> Hope this helped, Kyle
  10. It uses jquery Link Fader by Cedric Dugas - http://www.position-absolute.com
  11. 914, come on ppl only 999086 to go
  12. Hi Tel, It makes sense now, I am not sure how you would do it. Sorry. Kyle
  13. Hi, Can you explain in more details? I presume you will need to sent the content type as "application/vnd.ms-powerpoint" which is MS Powerpoint's MIME type I am not sure many people will be able to assist you with this, have you googled it? Sorry, that I wasn't more helpful. Kyle
  14. Not a problem. Kyle
  15. Hi, I have totally rewritten your code and tested it. <?php header("Expires: Mon, 20 Dec 1998 01:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); $message = $_REQUEST["enquiry"]; $name = $_REQUEST["name"]; $phone = $_REQUEST["phone"]; $email = $_REQUEST["email"]; // optional $contents = <<<EOD Name: $name Phone: $phone Message: $message EOD; if (empty($phone) || empty($message) || empty($name)) { header("Location: http://www.garethgillman.co.uk/contact.php"); } else { if(!isset($email)) { $email = "webform@sglettings.co.uk"; } $headers = "From: $name <$email>\r\n" . "Reply-To: $email\r\n"; if(mail("info@sglettings.co.uk", "Contact Form Results", $contents, $headers)) { header("Location: /sent.php"); exit; } else { header("Location: /error.php"); exit; } } ?> Any issues let me know, Kyle
  16. Hi, I have a PHP (OOP) contact form processing script on a secure (SSL) server, you can use if your interested. Upon success or failure we can redirect the users back to any location you wish. PM me if you interested. Kyle
  17. Hi Sash 007, They is a certificate called an EV (extended validation), basically it places the green bar in the browser. However to get a EV certificate they is extended vetting, including company background etc. And they are not cheap either. General rule of thumb is to get a SSL cert of atleast 128 bits encryption. I am a security consulant by trade and if you need any further assistance please PM me. Kyle
  18. Hi Ben, Maybe its just me being tired or summot but not all of that made sense to me, can you please break it down into sections what it is your looking to do. Kyle
  19. Thanks Zoonder. Worked like a treat.
  20. Hiya guys, I have a problem which I cant figure out. I need to take a UK mobile number say 07890123456 and change it to 447890123456. I have been working on it for a few days now and can't figure it out. Tried strpos, str_replace, regex etc. Only problem is with stuff like str_replace if the numbers: 07000007070 it will become 447000044440. Any help would be appriciated. Thanks, Kyle

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.