-
Posts
88 -
Joined
-
Last visited
Profile Information
-
Gender
Not Telling
Recent Profile Visitors
2344 profile views
AzeS's Achievements
-
As soon as i have generated proper income ill donate a little SOLVED BY BARAND BITCHES!
-
Corrected and checked. I want to smash my head in to the keyboard untill it all stops ;-; Error: array(3) { ["lead"]=> string(15) "[email protected]" ["comment"]=> string(5) "send:" ["text"]=> string(4) "text" } PDOException: SQLSTATE[HY093]: Invalid parameter number in /var/www/html/**/**.php: 1732 Stack trace: #0 /var/www/html/**/**.php(1732): PDOStatement->execute(Array) #1 /var/www/html/**/**/**/**.php(23): **->crm(0, 1, Array) #2 /var/www/html/**/**.php(1): require_once('/var/www/html/C...') #3 {main} Fehler bei migration in die Datenbank, bitte informieren Sie einen Administrator. 05-20-2019 09:31:07 Error throwing, Adjusted Code: try { $sql = $this->Db->prepare("UPDATE ** SET data = CASE WHEN data IS NULL THEN :f ELSE (CONCAT(data,:f)) END WHERE lead=:e"); $preset = array(':e' => $data["lead"], ':f' => $data["comment"] . $data["text"]); $sql->execute(array(':e' => $data["lead"], ':f' => $data["comment"] . $data["text"])); } catch (PDOException $e) { $this->report("crm_err: " . $e); return $e . " Fehler bei migration in die Datenbank, bitte informieren Sie einen Administrator. " . $current_date_frep . var_dump($data); } Initiating Code: echo *->crm(0,1,array('lead' => "[email protected]", 'comment' => "send:",'text' => "text")) . "<br>"; echo *->crm(0,1,array('lead' => "[email protected]", 'comment' => "recv:",'text' => "text")) . "<br>"; The strange thing is, that there isnt even a number in transfer to the PDO execution, so where does it get the parameter?!
-
Exception: PDOException: SQLSTATE[HY093]: Invalid parameter number in *.php:1732 Stack trace: #0 *.php(1732): PDOStatement->execute(Array) #1 crm_for.php(23): *->crm(0, 1, Array) #2 *.php(1): require_once('/var/www/html/C...') #3 {main} Hello fellow people, i need a rant. An error is appearing in my new CRM system. there are No Numeric values in transfer on the pdo statement but the compiler isn't on my side. the following SQL Statement is for concating an intitated Null value in the CRM table i have a workaround but its inefficiant and dataconsuming. I would like to estimate if there is an null value and overrite it with general text for later sentiment analysis. Error throwing Code: try { $sql = $this->Db->prepare("UPDATE *** SET data =(CASE WHEN (NULL) THEN :f ELSE (CONCAT(data,:f)) END) WHERE lead=:e"); $preset = array(':e' => $data["lead"], ':f' => $data["comment"] . $data["text"]); $sql->execute(array(':e' => $data["lead"], ':f' => $data["comment"] . $data["text"])); } catch (PDOException $e) { $this->report("crm_err: " . $e); return $e . " Fehler bei migration in die Datenbank, bitte informieren Sie einen Administrator." . $current_date_frep; } return "Ihr Text wurde erfolgreich in die Datenbank migriert, weiter so!" . var_dump($preset); break; Initiating Code: echo *->crm(0,1,array('lead' => "account", 'comment' => "send:",'text' => "text")) . "<br>"; echo *->crm(0,1,array('lead' => "account", 'comment' => "recv:",'text' => "text")) . "<br>";
-
Thanks kicken, that solved it, i will concider to use the json encode
-
I am working on a revision of the product cart in my shop, have found a suitable design and implement the required PHP snippets. So far so good, everything works, but somewhere an unexpected string has crept in. which i dont find because of an lack of experience in js. Shopping lists origin: https://codepen.io/bartveneman/pen/KHxLG?q=Cart%20&order=popularity&depth=everything&show_forks=false Generated HTML code: <script type="text/javascript"> /* jslint browser: true*/ /*global $*/ // https://github.com/jasonmoo/t.js (function(){function c(a){this.t=a}function l(a,b){for(var e=b.split(".");e.length;){if(!(e[0]in a))return!1;a=a[e.shift()]}return a}function d(a,b){return a.replace(h,function(e,a,i,f,c,h,k,m){var f=l(b,f),j="",g;if(!f)return"!"==i?d(c,b):k?d(m,b):"";if(!i)return d(h,b);if("@"==i){e=b._key;a=b._val;for(g in f)f.hasOwnProperty(g)&&(b._key=g,b._val=f[g],j+=d(c,b));b._key=e;b._val=a;return j}}).replace(k,function(a,c,d){return(a=l(b,d))||0===a?"%"==c?(new Option(a)).innerHTML.replace(/"/g,"""): a:""})}var h=/\{\{(([@!]?)(.+?))\}\}(([\s\S]+?)(\{\{:\1\}\}([\s\S]+?))?)\{\{\/\1\}\}/g,k=/\{\{([=%])(.+?)\}\}/g;c.prototype.render=function(a){return d(this.t,a)};window.t=c})(); // end of 't'; Number.prototype.to_$ = function () { return "$" + parseFloat( this ).toFixed(2); }; String.prototype.strip$ = function () { return this.split("$")[1]; }; var app = { shipping : 5.00, products : [ { "name" : "2.4GHz GPS WIFI Drone" "price" : "164.99" "img" : "IMG/COV/SHOP/IMG/REG/2017.10.2815.17.5925474Drone_SML.PNG" "desc" : "Flugzeit: 12 - 15 Minuten Ladezeit: 3- 4h" "pid" : "38" "qua" : "1" }, { "name" : "Dongguan Thermomixer" "price" : "349.89" "img" : "IMG/COV/SHOP/IMG/REG/2017.10.2612.04.3727212China-cheap-food-processor-dough-maker-with.png" "desc" : "Der Thermomixer feiert seit mehr als einem Jahrzehnt herausragende Erfolge. Schneiden, Zermahlen, Garen, Kochen, Mixen und Frittieren alles in einem Gerät, alles bald in Ihrer Küche." "pid" : "37" "qua" : "1" }, ], removeProduct: function () { "use strict"; var item = $(this).closest(".shopping-cart--list-item"); item.addClass("closing"); window.setTimeout( function () { item.remove(); app.updateTotals(); }, 500); // Timeout for css animation }, addProduct: function () { "use strict"; var qtyCtr = $(this).prev(".product-qty"), quantity = parseInt(qtyCtr.html(), 10) + 1; app.updateProductSubtotal(this, quantity); }, subtractProduct: function () { "use strict"; var qtyCtr = $(this).next(".product-qty"), num = parseInt(qtyCtr.html(), 10) - 1, quantity = num <= 0 ? 0 : num; app.updateProductSubtotal(this, quantity); }, updateProductSubtotal: function (context, quantity) { "use strict"; var ctr = $(context).closest(".product-modifiers"), productQtyCtr = ctr.find(".product-qty"), productPrice = parseFloat(ctr.data("product-price")), subtotalCtr = ctr.find(".product-total-price"), subtotalPrice = quantity * productPrice; productQtyCtr.html(quantity); subtotalCtr.html( subtotalPrice.to_$() ); app.updateTotals(); }, updateTotals: function () { "use strict"; var products = $(".shopping-cart--list-item"), subtotal = 0, shipping; for (var i = 0; i < products.length; i += 1) { subtotal += parseFloat( $(products[i]).find(".product-total-price").html().strip$() ); } shipping = (subtotal > 0 && subtotal < (100 / 1.06)) ? app.shipping : 0; $("#subtotalCtr").find(".cart-totals-value").html( subtotal.to_$() ); $("#taxesCtr").find(".cart-totals-value").html( (subtotal * 0.06).to_$() ); $("#totalCtr").find(".cart-totals-value").html( (subtotal * 1.06 + shipping).to_$() ); $("#shippingCtr").find(".cart-totals-value").html( shipping.to_$() ); }, attachEvents: function () { "use strict"; $(".product-remove").on("click", app.removeProduct); $(".product-plus").on("click", app.addProduct); $(".product-subtract").on("click", app.subtractProduct); }, setProductImages: function () { "use strict"; var images = $(".product-image"), ctr, img; for (var i = 0; i < images.length; i += 1) { ctr = $(images[i]), img = ctr.find(".product-image--img"); ctr.css("background-image", "url(" + img.attr("src") + ")"); img.remove(); } }, renderTemplates: function () { "use strict"; var products = app.products, content = [], template = new t( $("#shopping-cart--list-item-template").html() ); for (var i = 0; i < products.length; i += 1) { content[i] = template.render(products[i]); } $("#shopping-cart--list").html(content.join("")); } }; app.renderTemplates(); app.setProductImages(); app.attachEvents(); </script> Internal PHP Code: <script type="text/javascript"> /* jslint browser: true*/ /*global $*/ // https://github.com/jasonmoo/t.js (function(){function c(a){this.t=a}function l(a,b){for(var e=b.split(".");e.length;){if(!(e[0]in a))return!1;a=a[e.shift()]}return a}function d(a,b){return a.replace(h,function(e,a,i,f,c,h,k,m){var f=l(b,f),j="",g;if(!f)return"!"==i?d(c,b):k?d(m,b):"";if(!i)return d(h,b);if("@"==i){e=b._key;a=b._val;for(g in f)f.hasOwnProperty(g)&&(b._key=g,b._val=f[g],j+=d(c,b));b._key=e;b._val=a;return j}}).replace(k,function(a,c,d){return(a=l(b,d))||0===a?"%"==c?(new Option(a)).innerHTML.replace(/"/g,"""): a:""})}var h=/\{\{(([@!]?)(.+?))\}\}(([\s\S]+?)(\{\{:\1\}\}([\s\S]+?))?)\{\{\/\1\}\}/g,k=/\{\{([=%])(.+?)\}\}/g;c.prototype.render=function(a){return d(this.t,a)};window.t=c})(); // end of 't'; Number.prototype.to_$ = function () { return "$" + parseFloat( this ).toFixed(2); }; String.prototype.strip$ = function () { return this.split("$")[1]; }; var app = { shipping : 5.00, products : [ <?php if (isset($_SESSION['cart'])) { foreach ($_SESSION['cart'] as $row) { if ($row > 0) { #var_dump($_SESSION['quant']); #echo $row; $cur_pro_on_car = $Shop->product_get($row); echo "{\n"; echo '"name" : "' . $crud->word($cur_pro_on_car['prdname'], 'UTF-8') . '"' . "\n"; echo '"price" : "' . $crud->word($cur_pro_on_car['price'] / 100, 'UTF-8') . '"' . "\n"; echo '"img" : "' . $crud->word($cur_pro_on_car['prdpicsml'], 'UTF-8') . '"' . "\n"; echo '"desc" : "' . $crud->word($cur_pro_on_car['detailsstr'], 'UTF-8') . '"' . "\n"; echo '"pid" : "' . $crud->word($cur_pro_on_car['PID'], 'UTF-8') . '"' . "\n"; echo '"qua" : "'; if (in_array($cur_pro_on_car['PID'], array_keys($_SESSION['quant']))) { echo $crud->word($_SESSION['quant'][$cur_pro_on_car['PID']], 'UTF-8') . '"' . "\n"; } else { echo "1". '"' . "\n"; } echo "},\n"; } } } ?> ], removeProduct: function () { "use strict"; var item = $(this).closest(".shopping-cart--list-item"); item.addClass("closing"); window.setTimeout( function () { item.remove(); app.updateTotals(); }, 500); // Timeout for css animation }, addProduct: function () { "use strict"; var qtyCtr = $(this).prev(".product-qty"), quantity = parseInt(qtyCtr.html(), 10) + 1; app.updateProductSubtotal(this, quantity); }, subtractProduct: function () { "use strict"; var qtyCtr = $(this).next(".product-qty"), num = parseInt(qtyCtr.html(), 10) - 1, quantity = num <= 0 ? 0 : num; app.updateProductSubtotal(this, quantity); }, updateProductSubtotal: function (context, quantity) { "use strict"; var ctr = $(context).closest(".product-modifiers"), productQtyCtr = ctr.find(".product-qty"), productPrice = parseFloat(ctr.data("product-price")), subtotalCtr = ctr.find(".product-total-price"), subtotalPrice = quantity * productPrice; productQtyCtr.html(quantity); subtotalCtr.html( subtotalPrice.to_$() ); app.updateTotals(); }, updateTotals: function () { "use strict"; var products = $(".shopping-cart--list-item"), subtotal = 0, shipping; for (var i = 0; i < products.length; i += 1) { subtotal += parseFloat( $(products[i]).find(".product-total-price").html().strip$() ); } shipping = (subtotal > 0 && subtotal < (100 / 1.06)) ? app.shipping : 0; $("#subtotalCtr").find(".cart-totals-value").html( subtotal.to_$() ); $("#taxesCtr").find(".cart-totals-value").html( (subtotal * 0.06).to_$() ); $("#totalCtr").find(".cart-totals-value").html( (subtotal * 1.06 + shipping).to_$() ); $("#shippingCtr").find(".cart-totals-value").html( shipping.to_$() ); }, attachEvents: function () { "use strict"; $(".product-remove").on("click", app.removeProduct); $(".product-plus").on("click", app.addProduct); $(".product-subtract").on("click", app.subtractProduct); }, setProductImages: function () { "use strict"; var images = $(".product-image"), ctr, img; for (var i = 0; i < images.length; i += 1) { ctr = $(images[i]), img = ctr.find(".product-image--img"); ctr.css("background-image", "url(" + img.attr("src") + ")"); img.remove(); } }, renderTemplates: function () { "use strict"; var products = app.products, content = [], template = new t( $("#shopping-cart--list-item-template").html() ); for (var i = 0; i < products.length; i += 1) { content[i] = template.render(products[i]); } $("#shopping-cart--list").html(content.join("")); } }; app.renderTemplates(); app.setProductImages(); app.attachEvents(); </script> I hope we can find a solution together and I look forward to your recommendations.
-
ok now ive seen it, im the worst, i assume that i just needed an other pair of eyes, thanks psycho
-
....
-
I have to create an id check. For this, an id is generated and written in a cookie, encrypted by the md5 algorithm and a password phrase.Then the id sent to the page and encrypted with the same process and afterwards written to a variable.Then the cookie is read out and compared with the variabele, all well until the fact that the two strings are not considered equal even though they are. <?php $reference = $_GET['id']; setcookie("meoid", md5($reference . "Password") . " OID:" . $reference,time()+(600)); if (isset($_GET['id'])) { $hash = md5(trim(strip_tags($_GET['id'])) . "Password"); if ($hash == $_COOKIE['meoid']) { echo "yes: hash= " . $hash . "::::meoid: " . $_COOKIE['meoid']; } else { echo "no: hash= " . $hash . "::::meoid: " . $_COOKIE['meoid'] . " GENERATET: " . md5($_GET['id'] . "Password"); } } else { header("Location: ../../../../report.php?x=Abuse of Success"); } ?> what am i doing wrong here
-
I Need to install split() on php7
AzeS replied to AzeS's topic in PHP Installation and Configuration
Done -
I Need to install split() on php7
AzeS replied to AzeS's topic in PHP Installation and Configuration
Ok, ill do it; what will work out the best for me? Sometimes I have: Split("\n", $foo); #and Split("\|", $bar); -
Coundn't get this query to output data in php, Please help !
AzeS replied to vanvoquan's topic in PHP Coding Help
the issue is that you're not adding the mysqli connection. Change the result1 to: $result1 = mysqli_query($connection, $query1); -
I Need to install split() on php7
AzeS replied to AzeS's topic in PHP Installation and Configuration
But, but, i need halp, there are more than 3000 pages of php that i would have to go through and yes i have no life -
I Need to install split() on php7
AzeS replied to AzeS's topic in PHP Installation and Configuration
yes, thank you for that, but id like to change the name for preg_split() to split() in the php lib or install php 5 alongside with 7 without losing 7 as the standart and not to be informed in the fact that its removed/ deprecated -
I moved my website to an server and installed php7, but now 50% of data processing dosnt work anymore because split isnt working, how can i migrate split to php7 ? Or how can i accomplish that older functions still work in php7 ?
-
REQUINIX I FOUND IT http://php.net/manual/en/function.urldecode.php
- 14 replies
-
- utf umlaut %25c3%25b6 problem
- utf %25c3%25b6
-
(and 1 more)
Tagged with:
