-
Replied To a Post in import csv pdo msql
Hi, try to add `errorInfo()`, for example: if (!$import) { echo "<p>Prepared statement error:</p>"; echo "<pre>" .print_r($dbh->errorInfo(), true) . "</pre>"; } while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) { … -
Replied To a Post in Merge Several Images
For completeness, you can also use the `montageImage()` method: <?php $list = array( './i/001.jpg', './i/002.jpg', './i/003.jpg', './i/004.jpg' ); $im = new Imagick($list); $draw = new ImagickDraw(); $result = $im->montageImage($draw, "4x1+0+0", … -
Replied To a Post in Problem in PHP form
First problem: <p>Budget<br /> <input id="subject" name="subject" class="text" /> </p> <p>Nature of Business<br /> <input id="subject" name="subject" class="text" /> </p> Here you have two input fields with same **id** and … -
Replied To a Post in Merge Several Images
Try with `appendImages()`, like in this example: <?php $list = array( './i/001.jpg', './i/002.jpg', './i/003.jpg', './i/004.jpg' ); # first image to start Imagick() $im = new Imagick($list[0]); $ilist = array(); # … -
Replied To a Post in Two Seperate Search Results, Same Table/Page
Ok, I'm not sure this is the best approach but it can be done creating two variables in MySQL (**@have** and **@wish**) that will stack the player names into separated … -
Gave Reputation to Dani in Awake and in pain
I'm not entirely positive I kicked the garbage can. I wasn't looking down. I was simply turning the corner into my kitchen to head to the sink when suddenly I … -
Replied To a Post in Two Seperate Search Results, Same Table/Page
So, no matter what you choose from the first form (created from the **armor** table), you search all the columns of the **gearowned** table? And then you want to match … -
Stopped Watching Jquery Autocomplete.
I have medium skills does anybody know an Autocomplete jquery script? -
Replied To a Post in Jquery Autocomplete.
With local sources, to match only the beginnings of the terms, use this method: $(function() { var availableTags = <?php echo json_encode($result); ?> $( "#tags" ).autocomplete({ source: function( request, response … -
Replied To a Post in Two Seperate Search Results, Same Table/Page
Try with the flow control function `CASE`: * http://dev.mysql.com/doc/refman/5.5/en/control-flow-functions.html#operator_case I don't know your table structure, so here's an example: * http://sqlfiddle.com/#!2/a9e87/3 Bye! -
Replied To a Post in Awake and in pain
It's not cool to kick trashcans Dani :p I hope you'll get better soon! -
Replied To a Post in How to replace text from a template on the fly
You're welcome, you could try PHPWord: * https://github.com/PHPOffice/PHPWord Which is a library to generate docx, odt, rtf and pdf files. But I didn't tested yet. -
Replied To a Post in How to replace text from a template on the fly
Hi, if you choose PHP then use variables, for example: <p>Client Name: <?php echo "$firstname $lastname"; ?></p> To assign the values to the variables `$firstname` and `$lastname` you can use … -
Began Watching Jquery Autocomplete.
I have medium skills does anybody know an Autocomplete jquery script? -
Replied To a Post in Jquery Autocomplete.
Hi, have you tried this? * http://jqueryui.com/autocomplete/ * http://api.jqueryui.com/autocomplete/ -
Replied To a Post in Is it possible to get current Time from the local client PC in PHP
You can save the datetime as UTC in the `posts` table, and then convert it to the user timezone, basing on his profile preferences. For example: <?php $times = DateTimeZone::listIdentifiers(); … -
Began Watching Having issues sending to yahoo.
Hi there im having a issue sending to yahoo aol ect. but can send to icloud. below is the code any idea what im doing worng. Like i said it … -
Replied To a Post in Binary (image) storage in DB v.s. File Storage
In addition read this thread: * http://www.daniweb.com/web-development/databases/threads/473598/is-better-store-images-in-a-blob-or-in-directories -
Gave Reputation to diafol in Modify password issue
Maybe check out a post here, using the new-ish `password_hash()` and `password_verify()`: http://www.daniweb.com/web-development/php/threads/478882/changing-pass-in-php-mysql#post2092388 PHP 5.5+ required. If you're not on 5.5+ yet, think about upgrading. If your host isn't on … -
Replied To a Post in Modify password issue
Sorry for the late update, but I realized I wrote something very wrong in my last post. I wrote: > On line 31 you wrote: if(crypt($_POST["curpassword"], $row["hash"]) != $row["hash"])) > … -
Replied To a Post in Forgot user password not updating user db
The salt is just an extra string used to change the output of the hash function, you can store this as a plain text string, or you can use an … -
Replied To a Post in Simple $_POST validation question
If the condition doesn't match then redirect with an error message, for example: <?php session_start(); if($_POST['submit']) { $db = /* connection to database */ $stmt = $db->prepare("SELECT username FROM users … -
Replied To a Post in MySql Query - First Order Date per customer
Sorry for the mistake, in my previous example I was referring to `orders.id_customer`, but nevermind: I exported the schema from the workbench file and I saw a `date_add` column in … -
Replied To a Post in MySql Query - First Order Date per customer
Ok, then remove `customer.id_customer = ?` and the limit clause, and try to use `GROUP BY`: SELECT customer.id_customer, customer.firstname, customer.lastname, orders.id_order, order_history.date_add FROM customer, orders, order_history WHERE customer.id_customer = orders.id_customer … -
Replied To a Post in MySql Query - First Order Date per customer
Hi, here you can see the database schema: * http://doc.prestashop.com/display/PS14/Fundamentals And you can also download the MySQL Workbench file. Maybe you can try something like this: SELECT customer.id_customer, customer.firstname, customer.lastname, … -
Replied To a Post in form action is on a different page
Place `session_start()` on top of this script otherwise `$_SESSION` won't be loaded and the IF statement will return false. Bye! -
Replied To a Post in Wordpress little help required
> not working Can you explain what and why it doesn't work? If you don't give us details, we cannot help much. -
Replied To a Post in Codeigniter resize image not working
> you might have to set GD2 to lowercase, not sure if that makes any difference? Good suggestion, but no, the `initialize()` method uses `strotolower()` to rewrite the **image_library** value: … -
Replied To a Post in Codeigniter resize image not working
Hi, what does returns from: echo $this->image_lib->display_errors(); -
Replied To a Post in Forgot user password not updating user db
**@accra** A part Hiroshe's suggestion which I would strongly consider, to explain the pratical issue with your script, the problem is this: $salt = uniqid(mt_rand()+microtime(true), true); $password=hash('sha256',$password.$salt); // Encrypted password … -
Replied To a Post in Forgot user password not updating user db
On line `13` you're creating the hash without the salt: $hashed = hash('sha256',$password); So, it cannot generate the same hash, if you're going to use random salts for each user, … -
Replied To a Post in want to unfavorite and item from the user's favorite list through php
Hi, the query at line `18` is not correct because you're going to set `1` to the `unfavorite` column, no matter what is the value of `$_REQUEST['favorite']`. Try to avoid … -
Replied To a Post in Converting Java hash method to PHP
Hi, can you paste an output hash? For example, I tried this: * http://runnable.com/U7VgPEukzj4rsw6n/java-hash-test And it returns the same hash of `md5()` in PHP: echo md5("hello"); // 5d41402abc4b2a76b9719d911017c592 But I … -
Gave Reputation to iamthwee in Web design for noobs
**Introduction** Today we are going to go over the very basics of web design and getting it right. I see a lot of web developers who say they are programmers … -
Began Watching Join five tables
I have five tables as listed below. Question: is it possible to join all five tables and output the result as show below? <table> <tr> <th>Subject</th> <th>Last update (date from … -
Replied To a Post in Forgot user password not updating user db
Ok, then try: <?php # initialize the variable $code = ''; # check if it exists and if it is alpha-numeric if(array_key_exists('code', $_GET) && ctype_alnum($_GET['code']) === true) { $code = … -
Replied To a Post in Parse Error i can't fix PHP
Remove all the spaces at the left side of `EOF;` and then go to a new line, so remove also any spaces after `EOF;`, so: <?php require_once 'config.php'; $title = … -
Replied To a Post in Forgot user password not updating user db
Hi, try to append the query string to the action of the form: <form method="post" action="receiving.php?<?php echo $_SERVER['QUERY_STRING']; ?>"> Or use an hidden input field: <input type="hidden" name="code" value="<?php echo … -
Replied To a Post in FOR EACH incorrect output
Ok, change your javascript to: element1.name="chk[]"; element2.name="txt[]"; element3.name="qty[]"; that will generate this structure: Array ( [chk] => Array ( [0] => on [1] => on [2] => on ) [txt] … -
Replied To a Post in FOR EACH incorrect output
Hi, can you show the form? Looking at the array output, it seems most of the values are under the index key `txtbox` while only the first is under `txt` … -
Replied To a Post in Get data from two tables and join
Look at `group_concat()` in MySQL: * http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html#function_group-concat To create a query like this: select s.name, group_concat(sa.artist order by sa.artist) as artists from songs s, songartists sa where s.id = sa.sid … -
Replied To a Post in update or insert in a single query
> could you explain how the unique key definition works? A unique index is like a primary key, in both cases it can be composed by a single column or … -
Replied To a Post in update or insert in a single query
The unique index works on the combination of all four columns, so it's the equivalent of the select query proposed by Ancient Dragon, if the key combination does not exists … -
Replied To a Post in update or insert in a single query
Otherwise use `INSERT ... ON DUPLICATE KEY UPDATE`, you have to create a unique key index: ALTER TABLE tablename ADD UNIQUE KEY(pg_name,mem_id,ct_year,ct_month); Then your insert query becomes: INSERT INTO tablename … -
Replied To a Post in problem while uploading songs
Do you have write permissions on `songs` directory? -
Replied To a Post in change name of file in linux
Try by adding a backslash: mv Abhishek\�_xyz.docx newname.docx Or with double quotes: mv "Abhishek�_xyz.docx" newname.docx Or by using a wildcard: mv Abhish* newname.docx By the way which kind of shell … -
Replied To a Post in Mysql databases
It's probably due to this: > If you are using MySQL 3.23 or later, you can copy the .frm, .MYI, and .MYD files for MyISAM tables between different architectures **that … -
Replied To a Post in Wordpress little help required
It seems possible by adding a filter, read the documentation: * http://codex.wordpress.org/Custom_Queries * http://codex.wordpress.org/Function_Reference/add_filter * http://codex.wordpress.org/Plugin_API/Filter_Reference * http://codex.wordpress.org/Plugin_API/Filter_Reference/posts_orderby -
Replied To a Post in how to inserting files on mysql using LARAVEL
You're welcome and, please, mark the thread as solved. Bye! :) -
Replied To a Post in how to inserting files on mysql using LARAVEL
> why is it that i cant anymore upload file. Hi, it can depend on many factors. **How big are these files?** The default file size limit for the uploads …
The End.